Make `DecodeFixedLengthBytesError` semver-trickable back to 0.2.x and 0.3.x
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design
Research direction
Start by comparing the 1.x DecodeFixedLengthBytesError variants with the 0.2.x and 0.3.x HexToArrayError API, then inspect the decode_to_array method and <[u8; LEN]>::from_hex entry point. Done means the deprecated invalid_char method and non-exhaustive InvalidLengthError fields are available with compatible behavior, with the compatibility path covered by tests.
Written by the indexing model from the issue text.
Description
There are very few changes we need to make to the 1.x DecodeFixedLengthBytesError type to make it semver-compatible with the HexToArrayError type from 0.2.x and 0.3.x.
In particular, each of its two variants has suffered a small API break that we could revert in a new 1.3.0 release:
- We would need to put back
InvalidCharError::invalid_char()(though we should deprecated it; see https://github.com/rust-bitcoin/hex-conservative/issues/100 which proposes deprecating it) - We would need to re-expose the
expectedandinvalidfields ofInvalidLengthError; the original struct was#[non_exhaustive]so we would retain that, and the ability to later add more fields. Meanwhile, these fields have sensible names and it's hard to imagine us ever wanting to remove them.
These changes both seem pretty reasonable, and it would mean that we could release a 0.2.3 which re-exported DecodeFixedLengthBytesError as HexToArrayError. (We would need to replace the body of <[u8; LEN]>::from_hex with a passthrough to the new decode_to_array method but that's it.)
This in turn would make all the hash types in bitcoin_hashes 0.14 semver-compatible with the hash types in 1.0, which in turn would make rust-miniscript 12.x/13.x/14.x kinda-compatible with hashes 1.0.
- Dominant language
- Rust
- Stars
- 11
- Forks
- 16
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-bitcoin/hex-conservative
-
Use `MaybeUninit` in place of 0-initialized u8 arraysPossibly taken @tcharding claimed this 233 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rust-bitcoin/hex-conservative#146 · 4 comments ·
-
Return `char` instead of `u8` from `InvalidCharError::invalid_char`May be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rust-bitcoin/hex-conservative#100 · 15 comments ·
All issues in rust-bitcoin/hex-conservative
Similar issues
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
area: engine bug needs milestone
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Mudcrab-Team/mudcrab#1197 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
zeabur-oss/builder#304 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
prometheion/ares#159 ·
Maintainers usually reply within 1 day
-
Multi-select question chips show no picked state; on touch the last tap looks like the only pickOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
eliasstravik/herdr-projects#1710 · 1 comment ·