-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn, don't error, when adding an already installed target for the current toolchain #1533
Comments
Yeah, I just saw this, and it was surprising. It also makes it slightly harder to do what I want to do in automation, where idempotence would be handy. |
I think it would be better if it's an info instead of a warning. For reference, this is what happens when adding an uninstalled new target
How about this:
warns generally alerts users and developers that something may not be well set up or may lead to unexpected results or even that some action should be made in order to get rid of it. Reinstalling something already installed didn't fit this mindset, IMHO. |
BTW, something similar happens with other commands too:
Why is this an error? Maybe a deeper revision/refactoring would be needed in order to keep error handling, error/warn messages and RC consistant. |
I also ran into this:
I have a Makefile which runs this for all targets I want to build for, including the current one. Was very upset to find out that this errors instead of simply printing that it's already installed. |
@clarcharr it's fixed on the master #441 |
Hi, I wanted to mention: Maybe since this is telling us we already have something we then tried to install again, the message could be friendlier? e.g.:
At first glance I thought I had done something wrong and that I didn't actually add the component I wanted to add. Edit: (This is basically what @hbobenicio said. Sorry I didn't notice earlier.) |
These days the messages are: somniloquy(git)(🦀🏠)% rustup component add rustc
info: component 'rustc' for target 'x86_64-unknown-linux-gnu' is up to date
somniloquy(git)(🦀🏠)% rustup target add x86_64-unknown-linux-gnu
info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date
somniloquy(git)(🦀🏠)% As such, I consider this resolved. |
This is not a particularly helpful behavior. When the user instructs rustup to install an already installed target, better to warn and exit with code zero (successful), rather than trigger a scary, unnecessary error.
The text was updated successfully, but these errors were encountered: