Skip to content

Fix generic derive output and document HexDebug secrecy - #49

Merged
HDauven merged 2 commits into
mainfrom
fix/generic-derive-output
Aug 25, 2026
Merged

HDauven merged 2 commits into
mainfrom
fix/generic-derive-output

Conversation

@HDauven

@HDauven HDauven commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve generics and where clauses in Hex and HexDebug implementations
  • use absolute ::core paths in generated code
  • document that HexDebug exposes the complete serialized value

Closes #44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates derive-hex derives to support generic types safely, use hygienic absolute paths, and document HexDebug value exposure.

Changes:

  • Preserve generics and where clauses.
  • Use absolute ::core paths.
  • Add generic derive tests and security documentation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Summary
derive-hex/tests/hex_test.rs Adds bounded generic derive coverage.
derive-hex/src/lib.rs Updates generated implementations and documents HexDebug secrecy implications. Nit (4 votes): add the related [Unreleased] changelog entry linked to issue #44.
Suppressed comments (1)

derive-hex/src/lib.rs:61

  • This warning is only in the proc-macro item's rustdoc, while the published derive-hex documentation is sourced from README.md and the dusk-bytes README also documents HexDebug without this warning. Please add the secrecy guidance to the user-facing README documentation so users following the package examples see it.
/// Do not derive `HexDebug` for types containing secrets. Formatting such a
/// value exposes its complete serialized representation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread derive-hex/src/lib.rs Outdated
@HDauven
HDauven force-pushed the fix/generic-derive-output branch from 97e4460 to 4566ed6 Compare August 23, 2026 02:19
@HDauven
HDauven force-pushed the fix/generic-derive-output branch 2 times, most recently from c1a8c63 to 4b0c12b Compare August 23, 2026 03:07
Comment thread derive-hex/README.md Outdated
Comment thread derive-hex/README.md Outdated
@HDauven
HDauven force-pushed the fix/generic-derive-output branch from 4b0c12b to e150a59 Compare August 25, 2026 10:45
@HDauven
HDauven requested a review from d-sonuga August 25, 2026 10:46
@HDauven
HDauven force-pushed the fix/generic-derive-output branch 2 times, most recently from 1090f30 to c6171d0 Compare August 25, 2026 12:27
@HDauven
HDauven force-pushed the fix/generic-derive-output branch from c6171d0 to b6893d7 Compare August 25, 2026 12:58
@HDauven
HDauven merged commit ef533eb into main Aug 25, 2026
1 check passed
@HDauven
HDauven deleted the fix/generic-derive-output branch August 25, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix generic proc-macro output and document HexDebug secrecy implications

4 participants