mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #473] [CLOSED] Migrate proto from error-chain to failure #1463
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#1463
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/473
Author: @silwol
Created: 5/18/2018
Status: ❌ Closed
Base:
master← Head:dev/326📝 Commits (1)
3ca2b82Migrate proto from error-chain to failure📊 Changes
53 files changed (+1261 additions, -831 deletions)
View changed files
📝
client/Cargo.toml(+1 -1)📝
client/src/client/client.rs(+3 -1)📝
client/src/error/client_error.rs(+133 -64)📝
client/src/error/dnssec_error.rs(+132 -45)📝
client/src/error/lexer_error.rs(+101 -69)📝
client/src/error/mod.rs(+6 -10)📝
client/src/error/parse_error.rs(+175 -59)📝
client/src/lib.rs(+1 -1)📝
client/src/rr/dnssec/mod.rs(+1 -2)📝
client/src/serialize/txt/master.rs(+2 -2)📝
client/src/serialize/txt/master_lex.rs(+1 -1)📝
integration-tests/src/authority.rs(+17 -8)📝
integration-tests/tests/client_future_tests.rs(+2 -5)📝
integration-tests/tests/client_tests.rs(+2 -6)📝
proto/Cargo.toml(+1 -1)📝
proto/src/error.rs(+272 -208)📝
proto/src/lib.rs(+1 -1)📝
proto/src/op/message.rs(+4 -21)📝
proto/src/op/op_code.rs(+1 -1)📝
proto/src/rr/dnssec/digest_type.rs(+3 -7)...and 33 more files
📄 Description
Closes: #326
I finished the migration to failure. All tests pass on my Linux machines, but I have no other machines to test with.
My implementation tries to imitate what was available in the error-chain implementation as far as the available error kinds are affected. I did however throw some errors away that seemed to be no longer used, but were present in the error-chain implementation, either because they were needed in the past, or because they were copied over from one error implementation to another.
One significant difference is, that I added a
Timeouterror kind wherever appropriate, which gets mapped whenever possible (fromstd::io::Errorto trust-dns error types, as well as from one trust-dns error type to another). From the user perspective, it seems to me that it make sense to always be able to easily check on the occurrence of timeouts.I did implement the errors as heavy-weight as it seemed appropriate for the functionality, so maybe extra work needs to be done for #318 in a separate commit.
I stumbled upon one occurrence of a test affected by this change that has an
#[ignore]flag attached, so I did my best to test what I would expect to work, but I couldn't test. This is inresolver/src/resolver_future.rs:519.I hope my commit lives up to the expected format and quality, and would be happy about feedback if you find any problems with my changes, so I can update them accordingly. I would love to see this migration done in one of the upcoming releases.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.