Skip to content

cargo-tree: Add more pruning options. #8105

Closed
@ehuss

Description

@ehuss

A large tree can be hard to look at and navigate. It would be useful if cargo-tree had more options for reducing or pruning the packages displayed. Some ideas:

depth

Add a --depth option to cargo-tree to control the depth displayed.
A numeric value would be simple, but perhaps other string options like "workspace" (limit to workspace members) would be useful.
See sfackler/cargo-tree#60 and #8062 (comment). (Or maybe --prune=non-member?)

prune

Add a --prune option which will remove a specific package (and all its dependencies). For example, --prune rustc-workspace-hack in the rustc repo.

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-tree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions