Bump dep reqwest in binstalk-downloader from 0.11.26 to 0.12.0 (#1655)

* Bump dep reqwest in binstalk-downloader from 0.11.26 to 0.12.0

reqwest 0.11.27 is still used in gix, but it will be upgraded in
next gix release.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix feature selection: Forward tls feature to `simple-git`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-04-03 07:26:39 +10:00 committed by GitHub
parent 8de3ec8fb7
commit 397fa7200f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 355 additions and 96 deletions

View file

@ -11,8 +11,22 @@ license = "Apache-2.0 OR MIT"
[dependencies]
async-trait = "0.1.68"
async-compression = { version = "0.4.4", features = ["gzip", "zstd", "xz", "bzip2", "tokio"] }
async_zip = { version = "0.0.16", features = ["deflate", "deflate64", "bzip2", "lzma", "zstd", "xz", "tokio"] }
async-compression = { version = "0.4.4", features = [
"gzip",
"zstd",
"xz",
"bzip2",
"tokio",
] }
async_zip = { version = "0.0.16", features = [
"deflate",
"deflate64",
"bzip2",
"lzma",
"zstd",
"xz",
"tokio",
] }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
bytes = "1.4.0"
bzip2 = "0.4.4"
@ -21,7 +35,12 @@ flate2 = { version = "1.0.28", default-features = false }
futures-util = "0.3.30"
futures-io = "0.3.30"
httpdate = "1.0.2"
reqwest = { version = "0.11.25", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
reqwest = { version = "0.12.0", features = [
"stream",
"gzip",
"brotli",
"deflate",
], default-features = false }
percent-encoding = "2.2.0"
serde = { version = "1.0.163", features = ["derive"], optional = true }
serde-tuple-vec-map = "1.0.1"
@ -33,12 +52,19 @@ serde_json = { version = "1.0.107", optional = true }
tar = { package = "binstall-tar", version = "0.4.39" }
tempfile = "3.5.0"
thiserror = "1.0.52"
tokio = { version = "1.35.0", features = ["macros", "rt-multi-thread", "sync", "time", "fs"], default-features = false }
tokio = { version = "1.35.0", features = [
"macros",
"rt-multi-thread",
"sync",
"time",
"fs",
], default-features = false }
tokio-tar = "0.3.0"
tokio-util = { version = "0.7.8", features = ["io"] }
tracing = "0.1.39"
hickory-resolver = { version = "0.24.0", optional = true, features = ["dnssec-ring"] }
hyper = { version = "0.14.27", optional = true }
hickory-resolver = { version = "0.24.0", optional = true, features = [
"dnssec-ring",
] }
once_cell = { version = "1.18.0", optional = true }
url = "2.3.1"
@ -83,14 +109,17 @@ native-tls = [
]
# Enable hickory-resolver so that features on it will also be enabled.
hickory-dns = ["hickory-resolver", "default-net", "ipconfig", "hyper", "once_cell"]
hickory-dns = ["hickory-resolver", "default-net", "ipconfig", "once_cell"]
# Deprecated alias for hickory-dns, since trust-dns is renamed to hickory-dns
trust-dns = ["hickory-dns"]
# HTTP3 is temporarily disabled by reqwest.
#
# Experimental HTTP/3 client, this would require `--cfg reqwest_unstable`
# to be passed to `rustc`.
http3 = ["reqwest/http3"]
#http3 = ["reqwest/http3"]
http3 = []
zstd-thin = ["zstd/thin"]

View file

@ -1,9 +1,8 @@
use std::{net::SocketAddr, sync::Arc};
use hickory_resolver::TokioAsyncResolver;
use hyper::client::connect::dns::Name;
use once_cell::sync::OnceCell;
use reqwest::dns::{Addrs, Resolve};
use reqwest::dns::{Addrs, Name, Resolve, Resolving};
use tracing::{debug, instrument, warn};
#[cfg(windows)]
@ -15,7 +14,7 @@ type BoxError = Box<dyn std::error::Error + Send + Sync>;
pub struct TrustDnsResolver(Arc<OnceCell<TokioAsyncResolver>>);
impl Resolve for TrustDnsResolver {
fn resolve(&self, name: Name) -> reqwest::dns::Resolving {
fn resolve(&self, name: Name) -> Resolving {
let resolver = self.clone();
Box::pin(async move {
let resolver = resolver.0.get_or_try_init(new_resolver)?;

View file

@ -13,7 +13,9 @@ license = "Apache-2.0 OR MIT"
[dependencies]
async-trait = "0.1.68"
base16 = "0.2.1"
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = ["json"] }
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = [
"json",
] }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
cargo-toml-workspace = { version = "5.0.0", path = "../cargo-toml-workspace" }
compact_str = { version = "0.7.0", features = ["serde"] }
@ -28,18 +30,26 @@ sha2 = "0.10.7"
simple-git = { version = "0.2.4", optional = true }
tempfile = "3.5.0"
thiserror = "1.0.52"
tokio = { version = "1.35.0", features = ["rt", "sync"], default-features = false }
tokio = { version = "1.35.0", features = [
"rt",
"sync",
], default-features = false }
tracing = "0.1.39"
url = "2.3.1"
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
toml_edit = { version = "0.22.4", features = ["serde"] }
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = ["rustls"] }
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = [
"rustls",
] }
[features]
git = ["simple-git"]
rustls = ["simple-git?/rustls"]
native-tls = ["simple-git?/native-tls"]
crates_io_api = []
[package.metadata.docs.rs]

View file

@ -11,14 +11,20 @@ license = "GPL-3.0-only"
[dependencies]
binstalk-bins = { version = "0.4.0", path = "../binstalk-bins" }
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = ["gh-api-client"] }
binstalk-fetchers = { version = "0.4.0", path = "../binstalk-fetchers", features = ["quickinstall"] }
binstalk-downloader = { version = "0.10.1", path = "../binstalk-downloader", default-features = false, features = [
"gh-api-client",
] }
binstalk-fetchers = { version = "0.4.0", path = "../binstalk-fetchers", features = [
"quickinstall",
] }
binstalk-registry = { version = "0.7.0", path = "../binstalk-registry" }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
cargo-toml-workspace = { version = "5.0.0", path = "../cargo-toml-workspace" }
command-group = { version = "5.0.1", features = ["with-tokio"] }
compact_str = { version = "0.7.0", features = ["serde"] }
detect-targets = { version = "0.1.15", path = "../detect-targets", features = ["tracing"] }
detect-targets = { version = "0.1.15", path = "../detect-targets", features = [
"tracing",
] }
either = "1.8.1"
itertools = "0.12.0"
jobslot = { version = "0.2.11", features = ["tokio"] }
@ -31,7 +37,11 @@ strum = "0.26.1"
target-lexicon = { version = "0.12.11", features = ["std"] }
tempfile = "3.5.0"
thiserror = "1.0.52"
tokio = { version = "1.35.0", features = ["rt", "process", "sync"], default-features = false }
tokio = { version = "1.35.0", features = [
"rt",
"process",
"sync",
], default-features = false }
tracing = "0.1.39"
url = { version = "2.3.1", features = ["serde"] }
@ -46,8 +56,8 @@ pkg-config = ["binstalk-downloader/pkg-config"]
zlib-ng = ["binstalk-downloader/zlib-ng"]
rustls = ["binstalk-downloader/rustls"]
native-tls = ["binstalk-downloader/native-tls"]
rustls = ["binstalk-downloader/rustls", "binstalk-registry/rustls"]
native-tls = ["binstalk-downloader/native-tls", "binstalk-registry/native-tls"]
trust-dns = ["binstalk-downloader/trust-dns"]