Skip to content
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

fix: don't depend on unnecessary multihash features #77

Merged
merged 7 commits into from
Mar 20, 2023

Conversation

thomaseizinger
Copy link
Contributor

With these features activated, multihash is quite heavy. Whilst we are in the process of fixing this, removing these features is a first good step towards that.

I think technically, this is a breaking change unfortunately because we re-export all of multihash and thus someone could have relied on the presence of multihash::Code through the re-export of multihash.

CHANGELOG.md Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger requested review from vmx and mxinden and removed request for vmx March 15, 2023 11:38
@mxinden mxinden changed the title Don't depend on unnecessary multihash features fix: don't depend on unnecessary multihash features Mar 17, 2023
@mxinden
Copy link
Member

mxinden commented Mar 17, 2023

@thomaseizinger do you have some time to look at the "Build" CI failures? I am taking a look at the code coverage failures now.

@thomaseizinger
Copy link
Contributor Author

@thomaseizinger do you have some time to look at the "Build" CI failures? I am taking a look at the code coverage failures now.

Maybe later tonight yes, otherwise likely only next week.

Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

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

Approved, once CI is fixed.

@thomaseizinger
Copy link
Contributor Author

@vmx Can you change the repository settings as per https://matklad.github.io/2022/10/24/actions-permissions.html? The workflows don't run at the moment.

@mxinden
Copy link
Member

mxinden commented Mar 20, 2023

@vmx Can you change the repository settings as per https://matklad.github.io/2022/10/24/actions-permissions.html? The workflows don't run at the moment.

Done

@mxinden mxinden merged commit 86c2088 into multiformats:master Mar 20, 2023
@thomaseizinger thomaseizinger deleted the no-multihash-features branch March 20, 2023 16:31
mergify bot pushed a commit to libp2p/rust-libp2p that referenced this pull request Mar 30, 2023
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.

Pull-Request: #3514.
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.

None yet

3 participants