From 9b8ba9902d4338ea8e1fe70d4318f70aa6c5d519 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:54:04 +1100 Subject: [PATCH] Upgrade hickory-resolver to 0.25.0-alpha.5 (#2038) * Upgrade hickory-resolver to 0.25.0-alpha.5 Update dependencies Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix compilation for hickory-resolver Cleanup use of removed feature Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix resolver.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Pin hickory-resolver to avoid breakage Cargo considers 0.25.0-alpha.* to be compatible while they can contain breaking changes between alpha versions. Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/binstalk-downloader/Cargo.toml | 3 +-- crates/binstalk-downloader/src/remote/resolver.rs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/binstalk-downloader/Cargo.toml b/crates/binstalk-downloader/Cargo.toml index 2d43104d..df5d8493 100644 --- a/crates/binstalk-downloader/Cargo.toml +++ b/crates/binstalk-downloader/Cargo.toml @@ -61,7 +61,7 @@ tokio = { version = "1.35.0", features = [ tokio-tar = "0.3.0" tokio-util = { version = "0.7.8", features = ["io"] } tracing = "0.1.39" -hickory-resolver = { version = "0.25.0-alpha.3", optional = true, features = [ +hickory-resolver = { version = "=0.25.0-alpha.5", optional = true, features = [ "dnssec-ring", ] } once_cell = { version = "1.18.0", optional = true } @@ -111,7 +111,6 @@ native-tls = [ "__tls", "native-tls-crate", "reqwest/native-tls", - "hickory-resolver?/dns-over-native-tls", ] # Enable hickory-resolver so that features on it will also be enabled. diff --git a/crates/binstalk-downloader/src/remote/resolver.rs b/crates/binstalk-downloader/src/remote/resolver.rs index 4a7b64bc..5982d309 100644 --- a/crates/binstalk-downloader/src/remote/resolver.rs +++ b/crates/binstalk-downloader/src/remote/resolver.rs @@ -2,7 +2,7 @@ use std::{net::SocketAddr, sync::Arc}; use hickory_resolver::{ config::{LookupIpStrategy, ResolverConfig, ResolverOpts}, - system_conf, TokioAsyncResolver, + system_conf, TokioResolver as TokioAsyncResolver, }; use once_cell::sync::OnceCell; use reqwest::dns::{Addrs, Name, Resolve, Resolving}; @@ -50,8 +50,6 @@ fn get_configs() -> Result<(ResolverConfig, ResolverOpts), BoxError> { protocol, tls_dns_name: None, trust_negative_responses: false, - #[cfg(feature = "rustls")] - tls_config: None, bind_addr: None, http_endpoint: None, })