Currently, the behavior of rustup component remove depends on the order of the provided components.
If an invalid component is listed first, the command fails immediately, and no components are removed.
However, if valid components are listed before an invalid one, those valid components are removed before the command returns an error.
This behavior is thus inconsistent, as it is dependent on the argument ordering.
From a usability perspective, I would argue that it is more intuitive for the command to attempt to remove all valid components and report any invalid ones afterward, regardless of their position.
That said, I am interested in hearing others' thoughts on this.
Examples of said inconsistency:
$ rustup component remove asd rustc-dev llvm-tools
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'asd' for target 'x86_64-unknown-linux-gnu'
$ rustup component remove rustc-dev llvm-tools asd
info: removing component rustc-dev
info: removing component llvm-tools
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'asd' for target 'x86_64-unknown-linux-gnu'
Currently, the behavior of
rustup component removedepends on the order of the provided components.If an invalid component is listed first, the command fails immediately, and no components are removed.
However, if valid components are listed before an invalid one, those valid components are removed before the command returns an error.
This behavior is thus inconsistent, as it is dependent on the argument ordering.
From a usability perspective, I would argue that it is more intuitive for the command to attempt to remove all valid components and report any invalid ones afterward, regardless of their position.
That said, I am interested in hearing others' thoughts on this.
Examples of said inconsistency: