-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Configuration specific dependencies break cargo tree
#13854
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
Comments
It was a bug we fixed recently in #13775. The bug has been there for a long while. Now Cargo disallows dependencies without any source, to avoid confusion.
To fix this, follow the instruction and specify a version, or any other kind of dependency. Like [target.'cfg(unix)'.dependencies.tokio]
features = ["fs"]
version = "1.25.0" |
Is there a way to refer to the same version defined in |
And what was the behavior before? It certainly seems like the behavior was to inherit the version from [dependencies]
tokio = {} not prohibit the example in the original post. I think I lack some context to comprehend everything in the original post though. |
If you have a Cargo workspace,
No it was not. If you remove the entire
|
Does the current stable behavior (intended of otherwise) conform the My expectations are
That being said, I lack the bandwidth to drive any of these changes so mostly wanted to share feedback and have some questions answered. I'll close this out for now until there's more engagement from other users. Thank you for your time! |
No. It was just a coincidence. The dependency resolver saw both I would say it was a bug (or misfeature if you like) that may lead to more dependency-confusions (in the sense of people being confused, not exactly dependency confusion attack), so I lean toward not supporting implicit dependency inheritance. |
Problem
Running
cargo tree
on the following yaml now fails in Nightly releases of CargoStable
Nightly
Steps
Use
Cargo.toml
from above and runcargo tree
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: