mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
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:
parent
8de3ec8fb7
commit
397fa7200f
5 changed files with 355 additions and 96 deletions
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue