Cargo accepts conditional dependencies based on feature, but documented not to #7442
Labels
A-cfg-expr
Area: Platform cfg expressions
A-target-dependencies
Area: [target.'cfg(foo)'.dependencies]
C-bug
Category: bug
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: