I have a dependency which is only used if a non-default feature is activated.
I'd like to see the inverse dependency tree for this package, let's call it foo
, using cargo tree
, but this does not seem possible?
cargo tree -i -p foo
just says: error: package ID specification foo did not match any packages
Intuitively, it seems like cargo tree -i -p foo --all-features
should accomplish what I want, but instead I get the following error:
error: cannot specify features for packages outside of workspace
. It seems like cargo interprets this command as "enable all features for foo
" instead of "enable all features for MY crate/application".
I can find foo
in my dependency tree if I run cargo tree --all-features
, but using this output to determine WHY foo
is included as a dependency is not very user-friendly.
Am I missing something somewhere, or is what I want not actually possible to accomplish with cargo
at the moment?