[PR #2094] [MERGED] Remove generic Error from DnsHandle #2807

Closed
opened 2026-03-16 11:09:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2094
Author: @bluejekyll
Created: 11/21/2023
Status: Merged
Merged: 11/26/2023
Merged by: @bluejekyll

Base: mainHead: use-protoerror-for-dnshandle


📝 Commits (2)

  • 053fe17 Remove generic Error from DnsHandle
  • c24d6b2 cleanup error DnsHandle error changes

📊 Changes

28 files changed (+470 additions, -560 deletions)

View changed files

📝 bin/tests/server_harness/mut_message_client.rs (+0 -1)
📝 crates/async-std-resolver/src/tests.rs (+2 -3)
📝 crates/client/src/client/async_client.rs (+2 -3)
📝 crates/client/src/client/async_secure_client.rs (+0 -1)
📝 crates/client/src/client/client.rs (+1 -1)
📝 crates/client/src/client/memoize_client_handle.rs (+0 -2)
📝 crates/proto/src/error.rs (+172 -2)
📝 crates/proto/src/xfer/dns_exchange.rs (+0 -1)
📝 crates/proto/src/xfer/dns_handle.rs (+1 -4)
📝 crates/proto/src/xfer/dnssec_dns_handle.rs (+37 -43)
📝 crates/proto/src/xfer/mod.rs (+0 -1)
📝 crates/proto/src/xfer/retry_dns_handle.rs (+7 -12)
📝 crates/recursor/src/error.rs (+3 -5)
📝 crates/recursor/src/recursor_pool.rs (+1 -1)
📝 crates/resolver/src/async_resolver.rs (+3 -3)
📝 crates/resolver/src/caching_client.rs (+44 -44)
📝 crates/resolver/src/dns_lru.rs (+31 -40)
📝 crates/resolver/src/error.rs (+14 -207)
📝 crates/resolver/src/lookup.rs (+23 -26)
📝 crates/resolver/src/lookup_ip.rs (+41 -56)

...and 8 more files

📄 Description

While working on #2084, there was a huge amount of type golf with DnsHandle that seemed really pointless and had very little gain. I've simplified that by making DnsHandle always return ProtoError which should make inter-crate implementations of DnsHandle simpler.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2094 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 11/21/2023 **Status:** ✅ Merged **Merged:** 11/26/2023 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `use-protoerror-for-dnshandle` --- ### 📝 Commits (2) - [`053fe17`](https://github.com/hickory-dns/hickory-dns/commit/053fe170eb3e37848308eaff318551ae22873a69) Remove generic Error from DnsHandle - [`c24d6b2`](https://github.com/hickory-dns/hickory-dns/commit/c24d6b23f5f84b1413b3b1c605b5cc5f100c73e7) cleanup error DnsHandle error changes ### 📊 Changes **28 files changed** (+470 additions, -560 deletions) <details> <summary>View changed files</summary> 📝 `bin/tests/server_harness/mut_message_client.rs` (+0 -1) 📝 `crates/async-std-resolver/src/tests.rs` (+2 -3) 📝 `crates/client/src/client/async_client.rs` (+2 -3) 📝 `crates/client/src/client/async_secure_client.rs` (+0 -1) 📝 `crates/client/src/client/client.rs` (+1 -1) 📝 `crates/client/src/client/memoize_client_handle.rs` (+0 -2) 📝 `crates/proto/src/error.rs` (+172 -2) 📝 `crates/proto/src/xfer/dns_exchange.rs` (+0 -1) 📝 `crates/proto/src/xfer/dns_handle.rs` (+1 -4) 📝 `crates/proto/src/xfer/dnssec_dns_handle.rs` (+37 -43) 📝 `crates/proto/src/xfer/mod.rs` (+0 -1) 📝 `crates/proto/src/xfer/retry_dns_handle.rs` (+7 -12) 📝 `crates/recursor/src/error.rs` (+3 -5) 📝 `crates/recursor/src/recursor_pool.rs` (+1 -1) 📝 `crates/resolver/src/async_resolver.rs` (+3 -3) 📝 `crates/resolver/src/caching_client.rs` (+44 -44) 📝 `crates/resolver/src/dns_lru.rs` (+31 -40) 📝 `crates/resolver/src/error.rs` (+14 -207) 📝 `crates/resolver/src/lookup.rs` (+23 -26) 📝 `crates/resolver/src/lookup_ip.rs` (+41 -56) _...and 8 more files_ </details> ### 📄 Description While working on #2084, there was a huge amount of type golf with `DnsHandle` that seemed really pointless and had very little gain. I've simplified that by making `DnsHandle` always return `ProtoError` which should make inter-crate implementations of DnsHandle simpler. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:09:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2807
No description provided.