Skip to content

Patch sub-errors to make them backwards compatible - #257

Merged
apoelstra merged 2 commits into
rust-bitcoin:masterfrom
tcharding:push-snvuzlswppqm
Aug 7, 2026
Merged

Patch sub-errors to make them backwards compatible#257
apoelstra merged 2 commits into
rust-bitcoin:masterfrom
tcharding:push-snvuzlswppqm

Conversation

@tcharding

@tcharding tcharding commented Aug 6, 2026

Copy link
Copy Markdown
Member

We would like to alias the DecodeFixedLengthBytesError back into 0.2 and 0.3 as HexToArrayError [0].

During the 1.0 dev cycle we made a few minor API breaks. Turns out we were probably overly savage and the benefits of re-instating the previous API outweigh the maintenance risks we were attempting to mitigate.

Put the InvalidLengthError and InvalidCharError back to how they were when in the 0.3 release.

Done as part of #254

[0] See issue #254 for full context and justification.

@tcharding

Copy link
Copy Markdown
Member Author

This PR needs to be API addition only, please review accordingly.

We would like to alias the `DecodeFixedLengthBytesError` back into
`0.2` and `0.3` as `HexToArrayError` [0].

During the 1.0 dev cycle we made a few minor API breaks. Turns out we
were probably overly savage and the benefits of re-instating the
previous API outweigh the maintenance risks we were attempting to
mitigate.

Put the `InvalidLengthError` and `InvalidCharError` back to how they
were when in the `0.3` release.

[0] See issue rust-bitcoin#254 for full context and justification.
@apoelstra

Copy link
Copy Markdown
Member

We have API files here -- can you patch those to make CI happy?

@apoelstra

Copy link
Copy Markdown
Member

Ah, I see, it needs a specific old version of cargo-rbmt. I'll just do it.

You now need to ACK because Github thinks the PR is mine.

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 828b93d; successfully ran local tests

@tcharding

tcharding commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I'll just do it.

Thanks. For my understanding. The only way to do this is grab the commit hash from rbmt-version, jump to the maintainer repo, co the commit hash, and install cargo-rbmt. Right? Then unwind it once done. I had to do it on another PR yesterday too so just checking you don't have a better process?

lol, I'm a goose. I will set up a bunch of cargo-rbmt binaries of different versions.

@tcharding

Copy link
Copy Markdown
Member Author

ACK 828b93d

@apoelstra
apoelstra merged commit 08c6c4a into rust-bitcoin:master Aug 7, 2026
15 checks passed
@apoelstra

Copy link
Copy Markdown
Member

Just needs a release PR now :).

lol, I'm a goose. I will set up a bunch of cargo-rbmt binaries of different versions.

You can just run cargo install cargo-rbmt --git https://git.rust-bitcoin.org/rust-bitcoin/rust-bitcoin-maintainer-tools --rev af3c2868415b17eedc808da6d0589e10b7482660 and then repeat the command with the rust-bitcoin version to "go back".

@tcharding

Copy link
Copy Markdown
Member Author

Nice, thanks.

@apoelstra

Copy link
Copy Markdown
Member

@tcharding are you willing to make a release PR off master? Then we can double-back and do a new 0.2.x release with the semver trick. This should all be straightforward now that CI is passing there.

@tcharding

Copy link
Copy Markdown
Member Author

Yep can do.

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.

2 participants