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

Update to most recent viable nightly #1997

Merged
merged 2 commits into from Sep 17, 2019

Conversation

@jonhoo
Copy link
Contributor

commented Sep 16, 2019

Previously, if the user had components installed on nightly which were not available for the latest nightly, rustup update would not update the user's nightly at all. With this patch, rustup will try progressively older nightlies until it finds a nightly that supports all the components the user has installed for their current nightly.

Fixes #1628.
Makes progress towards #1501.
Fixes the underlying issue in #1676.

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2019

As an anecdotal observation, the code for mocking a dist in tests/mock/clitools.rs should probably be refactor separately from this change. It's currently pretty messy, and would benefit from some cleanup, and probably some macros.

@jonhoo jonhoo force-pushed the jonhoo:conditional-update branch from 93aa55d to e2da58a Sep 16, 2019
@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2019

Cleanup in #1998

@norru

This comment has been minimized.

Copy link

commented Sep 17, 2019

This is ace. Thank you very much!

Copy link
Collaborator

left a comment

Apart from my concern over missing nightlies and a possible bit of reformatting, this looks like a nice simple elegant solution to the problem.

src/dist/dist.rs Outdated Show resolved Hide resolved
src/dist/dist.rs Outdated Show resolved Hide resolved
src/dist/dist.rs Show resolved Hide resolved
@jonhoo jonhoo requested a review from kinnison Sep 17, 2019
jonhoo added 2 commits Sep 16, 2019
Previously, if the user had components installed on `nightly` which were
not available for the latest nightly, `rustup update` would not update
the user's nightly at all. With this patch, rustup will try
progressively older nightlies until it finds a nightly that supports all
the components the user has installed for their current nightly.

Fixes #1628.
Makes progress towards #1501.
Fixes the underlying issue in #1676.
@jonhoo jonhoo force-pushed the jonhoo:conditional-update branch from 08bc94d to 461bcb1 Sep 17, 2019
Copy link
Collaborator

left a comment

LGTM 👍 I'll merge once I have a confirm from CI.

@kinnison kinnison merged commit bca2352 into rust-lang:master Sep 17, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@jonhoo jonhoo deleted the jonhoo:conditional-update branch Sep 17, 2019
@vi

This comment has been minimized.

Copy link

commented Sep 17, 2019

When will it be available for rustup self update?

@kinnison

This comment has been minimized.

Copy link
Collaborator

commented Sep 17, 2019

When will it be available for rustup self update?

@vi When we're ready to release 1.20.0 -- We have active tester requests out right now, and we may put further requests out on the way to 1.20.0. Once we're good, we'll release. I'd guess at a small (one or two) number of weeks.

@Arnavion

This comment has been minimized.

Copy link

commented Sep 21, 2019

@jonhoo @kinnison How would I restore the original behavior? Do I have to rustup component remove the components I don't mind losing before rustup updateing, then rustup component add them back? Or is there an easier way?

@najamelan

This comment has been minimized.

Copy link

commented Sep 21, 2019

@Arnavion one option is to check https://rust-lang-nursery.github.io/rust-toolstate/ manually and not update if not all your components are there...

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2019

@Arnavion I'm not sure I follow? The old behavior was to simply fail the update. If you mean to force the update, then you should be able to pass --force.

@Arnavion

This comment has been minimized.

Copy link

commented Sep 21, 2019

@jonhoo The new behavior, AFAICT from your change, is that rustup update will always succeed, but leave me with a nightly that is not the latest. The original behavior was that rustup update would fail, which my "update Rust" script would detect and handle by removing components that I don't need (clippy, rustfmt), re-running rustup update, then rustup component adding (rustfmt) or cargo installing (clippy, since it's usually fixed in git master even if the submodule in the rust repo is broken) the components back.

Yes, --force seems to be what I was asking for. Thanks.

@uwearzt uwearzt referenced this pull request Oct 2, 2019
6 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.