mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: upgrade trust-dns-resolver and friends (#24108)
To avoid duplicate winreg crate in #24056 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
566adb7c0a
commit
c7894447eb
5 changed files with 99 additions and 52 deletions
116
Cargo.lock
generated
116
Cargo.lock
generated
|
@ -2341,6 +2341,15 @@ dependencies = [
|
|||
"text_lines",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "drain"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d105028bd2b5dfcb33318fd79a445001ead36004dd8dffef1bdd7e493d8bc1e"
|
||||
dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dsa"
|
||||
version = "0.6.3"
|
||||
|
@ -2462,14 +2471,14 @@ checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca"
|
|||
|
||||
[[package]]
|
||||
name = "enum-as-inner"
|
||||
version = "0.5.1"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
|
||||
checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
|
||||
dependencies = [
|
||||
"heck 0.4.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.58",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3409,17 +3418,6 @@ version = "1.0.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
|
||||
dependencies = [
|
||||
"matches",
|
||||
"unicode-bidi",
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "0.3.0"
|
||||
|
@ -3990,12 +3988,6 @@ version = "0.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
|
||||
|
||||
[[package]]
|
||||
name = "matches"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
|
||||
|
||||
[[package]]
|
||||
name = "md-5"
|
||||
version = "0.10.6"
|
||||
|
@ -5740,6 +5732,15 @@ dependencies = [
|
|||
"syn 2.0.58",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.7.1"
|
||||
|
@ -6890,6 +6891,40 @@ dependencies = [
|
|||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.19.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower"
|
||||
version = "0.4.13"
|
||||
|
@ -6993,19 +7028,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "trust-dns-client"
|
||||
version = "0.22.0"
|
||||
version = "0.23.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c408c32e6a9dbb38037cece35740f2cf23c875d8ca134d33631cec83f74d3fe"
|
||||
checksum = "14135e72c7e6d4c9b6902d4437881a8598f0145dbb2e3f86f92dbad845b61e63"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"data-encoding",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"radix_trie",
|
||||
"rand",
|
||||
"thiserror",
|
||||
"time",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"trust-dns-proto",
|
||||
|
@ -7013,9 +7047,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "trust-dns-proto"
|
||||
version = "0.22.0"
|
||||
version = "0.23.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26"
|
||||
checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"cfg-if",
|
||||
|
@ -7024,9 +7058,9 @@ dependencies = [
|
|||
"futures-channel",
|
||||
"futures-io",
|
||||
"futures-util",
|
||||
"idna 0.2.3",
|
||||
"idna 0.4.0",
|
||||
"ipnet",
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"rand",
|
||||
"serde",
|
||||
"smallvec",
|
||||
|
@ -7039,16 +7073,17 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "trust-dns-resolver"
|
||||
version = "0.22.0"
|
||||
version = "0.23.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe"
|
||||
checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
"ipconfig",
|
||||
"lazy_static",
|
||||
"lru-cache",
|
||||
"once_cell",
|
||||
"parking_lot 0.12.1",
|
||||
"rand",
|
||||
"resolv-conf",
|
||||
"serde",
|
||||
"smallvec",
|
||||
|
@ -7060,13 +7095,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "trust-dns-server"
|
||||
version = "0.22.1"
|
||||
version = "0.23.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99022f9befa6daec2a860be68ac28b1f0d9d7ccf441d8c5a695e35a58d88840d"
|
||||
checksum = "c540f73c2b2ec2f6c54eabd0900e7aafb747a820224b742f556e8faabb461bc7"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
"cfg-if",
|
||||
"drain",
|
||||
"enum-as-inner",
|
||||
"futures-executor",
|
||||
"futures-util",
|
||||
|
@ -7074,9 +7110,8 @@ dependencies = [
|
|||
"thiserror",
|
||||
"time",
|
||||
"tokio",
|
||||
"toml",
|
||||
"toml 0.7.8",
|
||||
"tracing",
|
||||
"trust-dns-client",
|
||||
"trust-dns-proto",
|
||||
]
|
||||
|
||||
|
@ -7817,6 +7852,15 @@ version = "0.52.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.50.0"
|
||||
|
@ -7833,7 +7877,7 @@ version = "0.1.12"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
|
||||
dependencies = [
|
||||
"toml",
|
||||
"toml 0.5.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -21,5 +21,5 @@ rustls-tokio-stream.workspace = true
|
|||
serde.workspace = true
|
||||
socket2.workspace = true
|
||||
tokio.workspace = true
|
||||
trust-dns-proto = "0.22"
|
||||
trust-dns-resolver = { version = "0.22", features = ["tokio-runtime", "serde-config"] }
|
||||
trust-dns-proto = "0.23"
|
||||
trust-dns-resolver = { version = "0.23", features = ["tokio-runtime", "serde-config"] }
|
||||
|
|
|
@ -587,7 +587,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
let resolver = AsyncResolver::tokio(config, opts)?;
|
||||
let resolver = AsyncResolver::tokio(config, opts);
|
||||
|
||||
let lookup_fut = resolver.lookup(query, record_type);
|
||||
|
||||
|
@ -781,9 +781,15 @@ mod tests {
|
|||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use trust_dns_proto::rr::rdata::a::A;
|
||||
use trust_dns_proto::rr::rdata::aaaa::AAAA;
|
||||
use trust_dns_proto::rr::rdata::caa::KeyValue;
|
||||
use trust_dns_proto::rr::rdata::caa::CAA;
|
||||
use trust_dns_proto::rr::rdata::mx::MX;
|
||||
use trust_dns_proto::rr::rdata::name::ANAME;
|
||||
use trust_dns_proto::rr::rdata::name::CNAME;
|
||||
use trust_dns_proto::rr::rdata::name::NS;
|
||||
use trust_dns_proto::rr::rdata::name::PTR;
|
||||
use trust_dns_proto::rr::rdata::naptr::NAPTR;
|
||||
use trust_dns_proto::rr::rdata::srv::SRV;
|
||||
use trust_dns_proto::rr::rdata::txt::TXT;
|
||||
|
@ -794,7 +800,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_a() {
|
||||
let func = rdata_to_return_record(RecordType::A);
|
||||
let rdata = RData::A(Ipv4Addr::new(127, 0, 0, 1));
|
||||
let rdata = RData::A(A(Ipv4Addr::new(127, 0, 0, 1)));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::A("127.0.0.1".to_string()))
|
||||
|
@ -804,7 +810,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_aaaa() {
|
||||
let func = rdata_to_return_record(RecordType::AAAA);
|
||||
let rdata = RData::AAAA(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
|
||||
let rdata = RData::AAAA(AAAA(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::Aaaa("::1".to_string()))
|
||||
|
@ -814,7 +820,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_aname() {
|
||||
let func = rdata_to_return_record(RecordType::ANAME);
|
||||
let rdata = RData::ANAME(Name::new());
|
||||
let rdata = RData::ANAME(ANAME(Name::new()));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::Aname("".to_string()))
|
||||
|
@ -842,7 +848,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_cname() {
|
||||
let func = rdata_to_return_record(RecordType::CNAME);
|
||||
let rdata = RData::CNAME(Name::new());
|
||||
let rdata = RData::CNAME(CNAME(Name::new()));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::Cname("".to_string()))
|
||||
|
@ -889,7 +895,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_ns() {
|
||||
let func = rdata_to_return_record(RecordType::NS);
|
||||
let rdata = RData::NS(Name::new());
|
||||
let rdata = RData::NS(NS(Name::new()));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::Ns("".to_string()))
|
||||
|
@ -899,7 +905,7 @@ mod tests {
|
|||
#[test]
|
||||
fn rdata_to_return_record_ptr() {
|
||||
let func = rdata_to_return_record(RecordType::PTR);
|
||||
let rdata = RData::PTR(Name::new());
|
||||
let rdata = RData::PTR(PTR(Name::new()));
|
||||
assert_eq!(
|
||||
func(&rdata).unwrap(),
|
||||
Some(DnsReturnRecord::Ptr("".to_string()))
|
||||
|
|
|
@ -57,8 +57,8 @@ serde.workspace = true
|
|||
test_util.workspace = true
|
||||
tokio.workspace = true
|
||||
tower-lsp.workspace = true
|
||||
trust-dns-client = "=0.22.0"
|
||||
trust-dns-server = "=0.22.1"
|
||||
trust-dns-client = "=0.23.2"
|
||||
trust-dns-server = "=0.23.2"
|
||||
url.workspace = true
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
zeromq.workspace = true
|
||||
|
|
|
@ -4011,11 +4011,8 @@ async fn test_resolve_dns() {
|
|||
)
|
||||
.unwrap();
|
||||
let lexer = Lexer::new(&zone_file);
|
||||
let records = Parser::new().parse(
|
||||
lexer,
|
||||
Some(Name::from_str("example.com").unwrap()),
|
||||
None,
|
||||
);
|
||||
let records =
|
||||
Parser::new().parse(lexer, Some(Name::from_str("example.com").unwrap()));
|
||||
if records.is_err() {
|
||||
panic!("failed to parse: {:?}", records.err())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue