Open
Description
Describe the problem you are trying to solve
Currently, one can already see why multiple versions of some crates are being pulled in through cargo tree -d
. However, for large dependency trees there can be many such crates, and if one is only interested in a single of those, e.g. because one just got an error with a note saying "perhaps multiple versions of crate foo
are being used?", it can be an annoying process to look for it.
Describe the solution you'd like
I'd like there to be a (set of) flag(s) for cargo tree
that will print all dependencies on crates named <foo>
. These seem like good candidates:
cargo tree -i <foo>
(or--invert
) – already does the right thing if there's only one dependency namedfoo
, errors about ambiguous crate name if there are multiplecargo tree -d <foo>
(or--duplicates
) – errors about an unexpected argument currently