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

Features accidentally pull in optional dependencies #142

Closed
vmx opened this issue Aug 24, 2023 · 0 comments · Fixed by #147
Closed

Features accidentally pull in optional dependencies #142

vmx opened this issue Aug 24, 2023 · 0 comments · Fixed by #147

Comments

@vmx
Copy link
Member

vmx commented Aug 24, 2023

Currently the feature definitions are not ideal. E.g. does the std feature define serde/std which leads to serde being a dependency, even if the serde-codec feature is not enabled. The same is true for other dependencies. As features are additive, it actually shouldn't be needed to explicitly set serde/std and the std feature would enable it anyway.

Besides that it would make sense to clean the whole things up and make use of the dep: and '?` syntax. We are already on a minimum supported Rust version of 1.60, so we can use that syntax.

The serde-codec feature could then also be renamed to just serde, following rust-multihash: https://github.com/multiformats/rust-multihash/blob/452a933396adcd5915c53563d5017df76ae3ec26/Cargo.toml#L24-L25

vmx added a commit that referenced this issue Oct 17, 2023
For example the `std` feature was pulling in `serde` even when it was
not enabled by any features.

This commit also renames the `serde-codec` feature to just `serde` to
be aligned with rust-multihash.

Fixes #142.
vmx added a commit that referenced this issue Oct 17, 2023
For example the `std` feature was pulling in `serde` even when it was
not enabled by any features.

This commit also renames the `serde-codec` feature to just `serde` to
be aligned with rust-multihash.

Fixes #142.
@vmx vmx closed this as completed in #147 Oct 17, 2023
vmx added a commit that referenced this issue Oct 17, 2023
For example the `std` feature was pulling in `serde` even when it was
not enabled by any features.

This commit also renames the `serde-codec` feature to just `serde` to
be aligned with rust-multihash.

Fixes #142.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant