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

Renamed optional dependency should use the renamed name #5753

Closed
withoutboats opened this issue Jul 20, 2018 · 1 comment · Fixed by #5811
Closed

Renamed optional dependency should use the renamed name #5753

withoutboats opened this issue Jul 20, 2018 · 1 comment · Fixed by #5811
Labels
A-optional-dependencies Area: dependencies with optional=true

Comments

@withoutboats
Copy link
Contributor

Given a Cargo.toml dependency stated like this:

[dependencies.dalek]
package = "ed25519-dalek"
version = "0.7.0"
optional = true

I expected to be able to turn the dependency on with cargo build --features dalek. However, this does not work. cargo build --features ed25519-dalek does work.

I think we should be consistent here in treating the dependency name, not the package name, as the name of this optional dependency.

@alexcrichton
Copy link
Member

I agree yeah that this should use the name dalek for the feature, and this should be fixed in #5811

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Jul 31, 2018
This commit updates the implementation of renamed dependencies to use the listed
name of a dependency in Cargo.toml for the name of the associated feature,
rather than using the package name. This'll allow disambiguating between
different packages of the same name and was the intention all along!

Closes rust-lang#5753
bors added a commit that referenced this issue Jul 31, 2018
Use listed dependency name for feature names

This commit updates the implementation of renamed dependencies to use the listed
name of a dependency in Cargo.toml for the name of the associated feature,
rather than using the package name. This'll allow disambiguating between
different packages of the same name and was the intention all along!

Closes #5753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-optional-dependencies Area: dependencies with optional=true
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants