-
Notifications
You must be signed in to change notification settings - Fork 957
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
refactor: don't depend on multihash features #3514
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
Friendly ping @mxinden. |
According to the Rust API evolution RFC, removing features from a dependency is not a breaking change because each crate should activate all features they depend on themselves. See https://rust-lang.github.io/rfcs/1105-api-evolution.html#minor-change-altering-the-use-of-cargo-features. |
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.
Overall I am OK with this change. I understand the reasoning. I am a bit afraid of making hard-to-debug errors anywhere here.
@mxinden Please take another look. |
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.
Thanks for the follow-ups. Looks good to me.
Related: multiformats/rust-multiaddr#73. Depends-On: #3514. Pull-Request: #3656.
Description
All we need from the multihash is for it to be a data structure that we pass around. We only ever use the identity "hasher" and the sha256 hasher. Those are easily implemented without depending the (fairly heavy) machinery in
multihash
.Unfortunately, this patch by itself does not yet lighten our dependency tree because
multiaddr
activates those features unconditionally. I opened a companion PR for this: multiformats/rust-multiaddr#77.multiformats/rust-multiaddr#77 is another breaking change and we are trying to delay those at the moment. However, it will (hopefully) land eventually which should then be much easier to implement.
Fixes #3276.
Notes
Links to any relevant issues
Open Questions
Change checklist