Skip to content

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

Merged
Diggsey merged 3 commits intorust-lang:masterfrom
emilyalbini:skip-missing-components
May 27, 2018
Merged

Remove components if they don't exist anymore during an update#1419
Diggsey merged 3 commits intorust-lang:masterfrom
emilyalbini:skip-missing-components

Conversation

@emilyalbini
Copy link
Copy Markdown
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
Copy Markdown
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.

@emilyalbini
Copy link
Copy Markdown
Member Author

Updated, should have fixed and improved the tests.

@Diggsey
Copy link
Copy Markdown
Contributor

Diggsey commented May 27, 2018

Thanks!

@Diggsey Diggsey merged commit 5a91e33 into rust-lang:master May 27, 2018
@emilyalbini emilyalbini deleted the skip-missing-components branch May 27, 2018 14:57
@emilyalbini
Copy link
Copy Markdown
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