mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2511] feat(serde-config)[proto]: Message is not deriving Serialize/Deserialize #1008
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#1008
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?
Originally created by @ArjixWasTaken on GitHub (Oct 16, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2511
About
One would expect having the feature
serde-configenabled, would make all important structs be serializable/deserializable.Sadly that is not the reality, the following types do not derive the needed macros.
MessageHeaderEdnsQueryMessageTypeOpCodeResponseCodeReproduction
Attempt to serialize a
Messageusing serde.Expected behavior
For serde to be able to serialize
Message.Version:
Crate: proto
Version: 0.24.1
@ArjixWasTaken commented on GitHub (Oct 16, 2024):
For now I can sort-off go around this issue by having a 1:1 clone of those structs, and implement conversion functions.

It ain't pretty
--
@djc commented on GitHub (Oct 16, 2024):
Well, these types really don't fit the mold of
-configspecifically. Perhaps we should generalize to aserdeflag more broadly, but your use case seems pretty niche.@ArjixWasTaken commented on GitHub (Oct 16, 2024):
Could you entertain me as to what the postfix
-configmeans in the project?@djc commented on GitHub (Oct 16, 2024):
AIUI
serde-configis mainly used to enable TOML configuration in the main hickory-dns binary crate.@ArjixWasTaken commented on GitHub (Oct 16, 2024):
I see, that makes a lot of sense.
A general
serdefeature would be nice to have.