Skip to content

Feature request: Add the ability to show duplicate versions of a single crate #9205

Open
@jplatte

Description

@jplatte

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 named foo, errors about ambiguous crate name if there are multiple
  • cargo tree -d <foo> (or --duplicates) – errors about an unexpected argument currently

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-treeS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions