-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
On Arch Linux, among other distros, /bin is a symlink to /usr/bin. This makes cargo list show many components twice:
$ which -a cargo-clippy
/usr/bin/cargo-clippy
/bin/cargo-clippy
$ cargo list | grep clippy
clippy
clippyIt's a little unclear how to fix this though, since cargo would have to know that those two binaries are indeed the same. Resolving symlinks with readlink before de-duplicating here might be the way to go? Alternatively, maybe the list should be de-duplicated based only on the command name, and not on the full path as well. That is, make that BTreeSet a BTreeMap with name as the key. We'd still then have to resolve conflicts, but have to do that today anyway!
As an aside to this, it'd be great if cargo list showed the path of the command it'll use to execute a given component by default. This happens if --verbose is passed currently, but I'm not sure I see the reason to hide it in non-verbose output, given that the command descriptions for built-ins are always shown?