Skip to content
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

target add and component add should succeed if target/component is already installed #1009

Closed
brson opened this issue Mar 23, 2017 · 3 comments

Comments

@brson
Copy link
Contributor

brson commented Mar 23, 2017

For automation purposes it's nice for this command to 'just work' when these commands are done redundantly. Change these commands to issue an 'info' indicating the thing is already installed and return successfully.

@typesanitizer
Copy link

For cases when the target is distinct from the toolchain (say target=x86_64-pc-windows-gnu and toolchain=stable-x86_64-unknown-linux-gnu), there is an info issued along the lines of:

 info: component 'rust-std' for target 'x86_64-pc-windows-gnu' is up to date

Call order for issuing this info: bare_add_component -> ??? -> update -> ??? -> fmt (in notifications.rs) which calls ComponentAlreadyInstalled.

The error only happens when the target is a part of the toolchain (say target=x86_64-unknown-linux-gnu and toolchain=stable-x86_64-unknown-linux-gnu). I think this error is coming from here.

  1. Should this error be matched and an info be issued in the corresponding functions target_add and component_add in rustup_mode.rs?
  2. Should the info be issued using the same notification mechanism or do you just use a simple info! macro in the definitions for target_add/component_add?

@nre-ableton
Copy link

I'm also running into this "error" and find it very confusing. I am not sure why rustup would fail in this case when everything is in an "ok" state. Are there any plans to fix this?

@kinnison
Copy link
Contributor

I believe this is now the case, if it's not, please open a fresh issue detailing what failed and what you'd expect.

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

No branches or pull requests

4 participants