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

[Feature Request] cargo tree --blame winapi #77

Closed
najamelan opened this issue Sep 5, 2019 · 2 comments
Closed

[Feature Request] cargo tree --blame winapi #77

najamelan opened this issue Sep 5, 2019 · 2 comments

Comments

@najamelan
Copy link

najamelan commented Sep 5, 2019

I often find myself seeing stuff in the build output (or output from cargo update) that I'm thinking: "That shouldn't be there!".

I then spend quite some time digging through the output of cargo tree to see who pulls that dependency in. Grepping does work with something like cargo tree | grep -B20 winapi, but it might be nice to have a blame mode which just shows the dep paths leading to a given leaf dependency.

@sfackler
Copy link
Owner

sfackler commented Sep 5, 2019 via email

@najamelan
Copy link
Author

ok, thanks for pointing that out. I didn't figure that from the usage message.

The results I got where somewhat inconsistent:

$ cargo tree -p winapi -i
error: There are multiple `winapi` packages in your project, and the specification `winapi` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  winapi:0.2.8
  winapi:0.3.8

$ cargo tree -p winapi:0.2.8 -i
error: package winapi v0.2.8 not found

$ cargo tree -p winapi:0.3.8 -i
winapi v0.3.8
[dev-dependencies]
└── time v0.1.42
    └── chrono v0.4.9
        └── flexi_logger v0.11.5
            [dev-dependencies]
            └── ws_stream_wasm v0.2.1 (/data/doc/code/ws_stream_wasm)

Showing all hits at once rather than returning an error would be more convenient I think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants