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

chore: fix cargo feature warning #11900

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

0xalpharush
Copy link
Contributor

I was getting the following warning when try to build with --features arbitrary:

Using dep: syntax in Cargo.toml makes it impossible to enable features for dependencies unless you also have a feature by that name 

This seems to fix it but I'm honestly not sure what the expected behavior of cargo is (rust-lang/cargo#10788 was closed as fixed)

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

what's the full cargo command, and which directory is it being run in? Adding an arbitrary feature here shouldn't be necessary

@0xalpharush
Copy link
Contributor Author

0xalpharush commented Oct 21, 2024

$ cd ./crates/net/eth-wire cargo metadata --features arbitrary --features serde 
error: Package `reth-cli-commands v1.1.0 (/Users/troysargent/reth/crates/cli/commands)` does not have feature `arbitrary`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

Comment on lines 91 to 92
dev = ["arbitrary"]
arbitrary = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could have something to do with the name dev

we should just rename dev to arbitrary because the dev feature here only enables arbitrary related features

mattsse and others added 2 commits October 21, 2024 23:37
Co-authored-by: alpharush <0xalpharush@protonmail.com>
@mattsse mattsse enabled auto-merge October 21, 2024 21:38
@mattsse mattsse added this pull request to the merge queue Oct 22, 2024
Merged via the queue into paradigmxyz:main with commit d68dca1 Oct 22, 2024
38 checks passed
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.

3 participants