Remove unstable hex dep from public API of primitives - #5213
Merged
Conversation
nyonson
reviewed
Oct 28, 2025
| extern crate serde; | ||
|
|
||
| #[cfg(feature = "hex")] | ||
| pub extern crate hex_stable as hex; |
Contributor
There was a problem hiding this comment.
Is there a technical reason to use the extern crate syntax over pub use hex_stable as hex;?
Member
There was a problem hiding this comment.
No, it's just about how they get categorized in the docs.rs output. (I guess that's sorta a technical reason.)
Member
|
In the OP you meant to link to #4808 which is merged now. |
tcharding
force-pushed
the
push-snnrmosxyktx
branch
from
October 28, 2025 23:25
a9dfd2c to
a4c6511
Compare
We don't want `hex v0.3.0` to appear in the public API of `primitives 1.0.0`. Add a dep on `hex v1.0.0` and use it for anything that appears in the public API. And it seems we do not need the `serde` feature of `hex-unstable` so remove it.
tcharding
force-pushed
the
push-snnrmosxyktx
branch
from
October 28, 2025 23:31
a4c6511 to
b7f7782
Compare
tcharding
marked this pull request as ready for review
October 28, 2025 23:45
Member
|
Nice. Good call naming the old one |
nyonson
approved these changes
Oct 30, 2025
tcharding
added a commit
to tcharding/rust-bitcoin
that referenced
this pull request
Feb 20, 2026
When I added the `hex` feature (rust-bitcoin#5213) I forgot to tie it into CI. Test the feature both with and without `std` enabled.
apoelstra
added a commit
that referenced
this pull request
Mar 5, 2026
771ebf2 primitives: Unit test hex feature (Tobin C. Harding) Pull request description: When I added the `hex` feature (#5213) I forgot to tie it into CI. Test the feature both with and without `std` enabled. ACKs for top commit: apoelstra: ACK 771ebf2; successfully ran local tests Tree-SHA512: 9ada3f1af9282977587aecbde076052205ea19036e615b49262f75cb324370a1f344e9a77c4f85547ac9a5466a63d3f1c4f41344664a52fd75af0d554cd3bd2a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a dep on
hex v1.0.0and uses it everywhere required so thathex v0.3.0does not appear in the public API.Note in the
serdestuff we use the unstable hex crate still even though we are decoding because we need access to the inners of the errors. This is the exact reason we added that functionality tohexand then during the 1.0.0 saga it was not included.With this applied we can see from grepping the API text files that only the
v1.0.0error types are in the public API.Fix: #5211