-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo accepts conditional dependencies based on feature, but documented not to #7442
Comments
That expression is always true, so it is essentially always on, it looks to be a mistake. Cargo could maybe display a warning about this, though? I'm not sure, because one can say |
@ehuss Ok, so in that context |
I believe so. If it is not in the output of |
Closing as warnings are now emitted via #7660. |
Problem
According to the Cargo documentation:
However, the tracing crates are apparently doing this successfully:
I would expect this to fail.
Possible Solution(s)
It's not clear to me whether the code or the documentation is correct.
I encountered this because I'm writing tools to process Cargo metadata which understands platform-specific dependencies, and it failed on encountering a dependency predicated on a feature. I'm not sure if I should implement support for that or not.
Notes
Output of
cargo version
:cargo 1.37.0 (9edd089 2019-08-02)
The text was updated successfully, but these errors were encountered: