-
Notifications
You must be signed in to change notification settings - Fork 831
Try to fix up sighash export mess #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to fix up sighash export mess #1277
Conversation
7d5176c
to
eddceae
Compare
I think |
ooo, I might have been wrong about bitcoin/src/blockdata/witness.rs:221: pub fn push_bitcoin_signature(&mut self, signature: &ecdsa::SerializedSignature, hash_type: EcdsaSighashType) { |
I don't think AFAIK everything else in |
But ACK this PR -- pretty frustrating that we can't usefully deprecate types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK eddceae0fad0caa8a788e7ee331b9ab842c0ccc5
eddceae
to
1ca4607
Compare
Rebase only, no other changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 1ca4607f0f344da1bc3c94f10ec7fdd475a5dd0c
1ca4607
to
a3347e3
Compare
Rebase, also use |
Recently we moved a few types from `transaction` to `sighash`, while doing so I erroneously annotated code with the `deprecated` attribute hoping it would give downstream users a gentle upgrade experience. It turns out `deprecated` only works on functions. During that same work, we re-exported from the crate root a bunch of types from the `sighash` module that probably should not have been re-exported. We are currently trying to create a nice clean API surface, in an effort to move in the right direction we should remove the re-exports and just re-export the `sighash` module. Try to clean up the sighash export mess by doing: - Remove the re-exports from the `transaction` module - Remove crate level re-exports of `sighash` module types - Re-export `sighash` module Note, this patch is a breaking API change, justified by the fact that there is no good way to gently lead downstream when moving types since types cannot be deprecated with the `deprecated` attribute.
a3347e3
to
2001f44
Compare
Note please this PR removes the types from |
OK, reexporting them doesn't even help that much because people could miss them anyway and various weird hacks I tried involving type aliases to dummy types don't work, so I don't mind just removing them. Especially since there's already a ton of breaking changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2001f44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2001f44
Recently we moved a few types from
transaction
tosighash
, while doing so I erroneously annotated code with thedeprecated
attribute hoping it would give downstream users a gentle upgrade experience. It turns outdeprecated
only works on functions.During that same work, we re-exported from the crate root a bunch of types from the
sighash
module that probably should not have been re-exported. We are currently trying to create a nice clean API surface, in an effort to move in the right direction we should remove the re-exports and just re-export thesighash
module.Try to clean up the sighash export mess by doing:
transaction
modulesighash
module typessighash
moduleNote, this patch is a breaking API change, justified by the fact that there is no good way to gently lead downstream when moving types since types cannot be deprecated with the
deprecated
attribute.