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
Re-export psbt module from root level #790
Conversation
@sanket1729 there is a branch |
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.
I really, really wish clippy/rustc would have a lint against this. Needing to check this manually is just tedious.
ACK 737c48a
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.
utACK 737c48a
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.
Pls see my comment
src/lib.rs
Outdated
@@ -135,7 +135,7 @@ pub use util::amount::Denomination; | |||
pub use util::amount::SignedAmount; | |||
pub use util::merkleblock::MerkleBlock; | |||
pub use util::sighash::SchnorrSigHashType; | |||
|
|||
pub use util::psbt::{Input, Output, TapTree, PsbtSigHashType}; |
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.
I really think exporting PSBT-specific types as bitcoin::Input
at root level gives highly misleading names. They are for sure should be kept as bitcoin::psbt::Input
or bitcoin::util::psbt::Input
, as they always were
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.
Oh yes this is much better.
Strongly agree with @dr-orlovsky however with a bit of resistance I might accept |
I propose not to increase confusion with type names. It will be really strange to export the same type under different names, |
Agree. Removing |
concept ACK
Not sure how much of these would uncontroversial and acceptable for the imminent release. |
I believe that 0.29 will be more suitable for renaming. We even have it in description. :) |
With |
Yup, we need to export |
We currently have the `map` module private but containing a bunch of types that are needed in the public API (specifically in a `PartiallySignedTransaction`). Re-export the publicly required types to the `psbt` module and then again at the root level of `rust-bitcoin` as we do for other types.
b138428
737c48a
to
b138428
Compare
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.
utACK b138428
@sanket1729, I didn't quite understand your comment. I've just exported |
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 b138428
Even though this is jumping to flattening before planned I don't see anything harmful with it. Maybe it's even useful since people can change the code upfront.
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 b138428
can't merge with "review requested" from @dr-orlovsky |
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 b138428
@RCasatta sorry for being slow. Will be able to merge in 1-2hrs, if you will not merge that before that time |
@dr-orlovsky very fast when requested though, thanks |
We currently have the
map
module private but containing a bunch of types that are needed in the public API (specifically in aPartiallySignedTransaction
).To give access to them re-export the
util::psbt
module at the root level.Found while testing
master
withrust-miniscript
.