Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Add a --all-features-recursive option and communicate better about omitted features #34

@infinity0

Description

@infinity0

Currently, cargo-tree --all-features only resolves the features of the top-level crate and their dependencies, which may omit features from child crates. For example, chrono-0.4.0 depends on num 0.1 with default-features = false, and so:

chrono-0.4.0$ cargo tree -p num --all-features -a
num v0.1.41
[dependencies]
├── num-integer v0.1.35
│   [dependencies]
│   └── num-traits v0.1.42
├── num-iter v0.1.34
│   [dependencies]
│   ├── num-integer v0.1.35
│   │   [dependencies]
│   │   └── num-traits v0.1.42
│   └── num-traits v0.1.42
└── num-traits v0.1.42

whereas running the same command in num's workspace:

num-0.1.41$ cargo tree -p num --all-features -a
num v0.1.41 (file:///$PWD)
[dependencies]
├── num-bigint v0.1.41
[..]
├── num-complex v0.1.41
[... etc, lots more stuff ...]

My use-case for cargo-tree requires not only to resolve a single crate's dependencies, but to resolve its child dependencies from the point-of-view of (anyone that could possibly also depend on that child crate). In this case, a --all-features-recursive output would be more useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions