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

Remove components if they don't exist anymore during an update #1419

Merged
merged 3 commits into from
May 27, 2018

Conversation

pietroalbini
Copy link
Member

At the moment, if a new release removes a component from its manifest, the install command works fine but the update command fails because that component is missing. This is just an hassle for the user, who has to remove the toolchain and reinstall it again.

This PR changes the behavior of rustup so that if a component is missing (so it's not in either the components or extensions list of the rust component) a warning is shown to alert the user about this and the component is simply removed. If the component is just marked as available = false the old behavior (erroring out) is still used, since that might be caused by a CI failure (if I understand correctly).

Part of rust-lang/rust#51097.

r? @Mark-Simulacrum @alexcrichton

screenshot from 2018-05-27 12-48-00

@Diggsey
Copy link
Contributor

Diggsey commented May 27, 2018

Thanks for the PR!

Looks like the tests need updating in response to these changes - could you also add tests for the new behaviour? In particular, I want to be sure that updates continue to fail if a component exists but is unavailable.

@pietroalbini
Copy link
Member Author

Updated, should have fixed and improved the tests.

@Diggsey
Copy link
Contributor

Diggsey commented May 27, 2018

Thanks!

@Diggsey Diggsey merged commit 5a91e33 into rust-lang:master May 27, 2018
@pietroalbini pietroalbini deleted the skip-missing-components branch May 27, 2018 14:57
@pietroalbini
Copy link
Member Author

Can we get this released before 1.26.1 (tuesday)?

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

Successfully merging this pull request may close these issues.

2 participants