Skip to content

Conversation

@tcharding
Copy link
Member

@tcharding tcharding commented Oct 27, 2025

During the removal of the context from the public API I brashly deleted a bunch of impls on the Secp256k1 type when we could have just deprecated them. This means that when upgrading downstream crates the upgrade is way more painful than it is if we deprecate.

Add back in the context impls. Call through to the new API.

@tcharding
Copy link
Member Author

tcharding commented Oct 27, 2025

EDIT: I was off my head yesterday.

Also, at first I cloned a new repo and moved the head back to right before #844 but there was some code missing from previous work so instead of digging more I just started using docsrs and clicking source.

@tcharding
Copy link
Member Author

Tested using rust-bitcoin/rust-bitcoin#5169

@tcharding
Copy link
Member Author

tcharding commented Oct 27, 2025

EDIT: I was off my head yesterday.

> Sorry for the pain in reviewing this, I'm not entirely sure how you are supposed to convince yourself that the code is exactly as it was?

Hilarabad, these functions can just call through to the stand alone ones instead of having all this code - face palm.

During the removal of the context from the public API I brashly
deleted a bunch of impls on the `Secp256k1` type when we could have
just deprecated them. This means that when upgrading downstream crates
the upgrade is way more painful than it is if we deprecate.

Add back in the context impls. To do this I copied from `v0.31.1`. I'm
not totally sure that there wasn't changes to this code in `master`
but since we are explicitly doing this to help upgrade then it seems
reasonable to do it like this.

Add deprecated since 0.32 attributes because we are going to push this
as a `0.32.0-beta.1` release.

Sorry for the pain in reviewing this, I'm not entirely sure how you
are supposed to convince yourself that the code is exactly as it was?
Typing `just update-lock-files` is boring, add an alias.
We just added the secp context methods back in (deprecated) to make
upgrading easier.

In preparation for release, bump the version, add a note in the
changelog, and update the lock files.
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.

1 participant