cargo-tree icon indicating copy to clipboard operation
cargo-tree copied to clipboard

Feature request: print features used to build each crate in tree

Open Dushistov opened this issue 6 years ago • 3 comments

Thanks for this tool,

to debug issue like desribed at rust-lang/cargo#4323 it would be nice to show in cargo tree output the features used for building each crate (it can be done by parsing cargo check -v output),

for example if cargo tree has such feature, then SO question can be solved just compare cargo tree outputs, in one case it may print something like:

nom v3.1.0 ["std", "memchr", "stream"]

in other case

nom v3.1.0 ["std", "memchr", "stream", "verbose-errors"]

Dushistov avatar Jul 25 '17 19:07 Dushistov

That seems like a reasonable thing to do!

sfackler avatar Jul 25 '17 19:07 sfackler

Hi! I wanted to know if someone is working over this feature request? If not, maybe I can contribute to this issue. Any tips to proceed would be helpful!

psinghal20 avatar Feb 03 '19 06:02 psinghal20

In addition to knowing which features are on, I think it would be useful to know which features are off too. Let me see the entire "feature-space".

e.g. for @psinghal20's work on https://github.com/tikv/tikv/issues/4167, they are trying to adjust features to remove bloat, and there are often 'negative' features that could disable code, that one might not know about.

brson avatar Feb 06 '19 00:02 brson