cargo list should not show components that are not installed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
$ rustup component add clippy-preview --toolchain nightly
$ cargo +stable list | grep clippy
clippy
This happens because rustup places cargo-clippy (as a symlink to rustup) in ~/.cargo/bin, or elsewhere in the user's $PATH. Which in turn is what clippy uses to determine what extensions are installed for listing with cargo list. I'm not entirely sure how to fix this, since it's pretty reasonable for cargo to search the user's $PATH. Perhaps cargo needs to have some way of detecting that it's running under rustup, and to know to really discover whether a given component is installed or not?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example using rustup component add clippy-preview --toolchain nightly and cargo +stable list, then inspect how cargo-clippy in ~/.cargo/bin or the user's PATH is discovered. Done means cargo list no longer reports components that are not installed for the selected toolchain, while still listing installed components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100