mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #2498] [MERGED] Make serde use RFC names for enum variants #3087
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#3087
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/2498
Author: @jcgruenhage
Created: 10/8/2024
Status: ✅ Merged
Merged: 2/18/2025
Merged by: @djc
Base:
main← Head:serde_tsig_algorithm_names📝 Commits (2)
de8ac44Make serde use RFC names for enum variantsbe2834eRename TLSA certificate usages based on RFC 7218📊 Changes
9 files changed (+100 additions, -32 deletions)
View changed files
📝
bin/tests/integration/txt_tests.rs(+1 -1)📝
crates/proto/src/dnssec/algorithm.rs(+1 -0)📝
crates/proto/src/dnssec/mod.rs(+13 -8)📝
crates/proto/src/dnssec/nsec3.rs(+1 -0)📝
crates/proto/src/dnssec/rdata/tsig.rs(+10 -0)📝
crates/proto/src/rr/rdata/caa.rs(+3 -0)📝
crates/proto/src/rr/rdata/sshfp.rs(+2 -0)📝
crates/proto/src/rr/rdata/svcb.rs(+14 -0)📝
crates/proto/src/rr/rdata/tlsa.rs(+55 -23)📄 Description
Right now, when using
hmac-sha256and loading it from a config file using the serde interface automatically derived for these, I need to writeHmacSha256instead of the name used in the RFC. This is unexpected and potentially confusing to users.This PR makes it so that the old names based on the enum variants don't work anymore, and the names specified in the RFC start working. Alternatively, we could use
serde(alias = "<name here>")instead ofserde(rename = "<name here>"), which would allow the RFC names to work but wouldn't break existing users.In my opinion, we should push for correct names, and as long as hickory isn't at a 1.0, breaking changes like this should potentially be expected.
I'll be looking through the code base some more to see if I find more occurrences of this and will put it into this PR as well, but I thought I should probably open this PR early so that discussion on
aliasvsrenamecan start already.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.