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

Allow installing major.minor channels #2551

Merged
merged 5 commits into from
Nov 21, 2020

Conversation

carols10cents
Copy link
Member

This fixes #794!!! 🎉 🌮

I would recommend not merging+releasing this until after 1.48 is released, because that's the first stable release that will write out the new manifests. We could even wait for a patch release to happen, to verify that the patch release overwrites the major.minor manifests correctly, but that's not predictable, so it's up to you.

I tested this out locally installing into a home subdir and since the manifests have been backfilled for old versions, I was able to do the following:

$ home/bin/rustup install 1.47 # install a channel that hasn't had point releases
info: syncing channel updates for '1.47-x86_64-apple-darwin'
info: latest update on 2020-10-08, rust version 1.47.0 (18bf6b4f0 2020-10-07)
...snip...
  1.47-x86_64-apple-darwin installed - rustc 1.47.0 (18bf6b4f0 2020-10-07)

$ home/bin/rustup toolchain list # list all toolchains
stable-x86_64-apple-darwin (default)
nightly-2020-04-22-x86_64-apple-darwin
1.47-x86_64-apple-darwin

$ home/bin/rustup toolchain uninstall 1.47 # uninstall a toolchain of this style
info: uninstalling toolchain '1.47-x86_64-apple-darwin'
info: toolchain '1.47-x86_64-apple-darwin' uninstalled

$ home/bin/rustup install 1.45 # install a channel that has had point releases, I got the latest one
info: syncing channel updates for '1.45-x86_64-apple-darwin'
info: latest update on 2020-08-03, rust version 1.45.2 (d3fb005a3 2020-07-31)
...snip...
  1.45-x86_64-apple-darwin installed - rustc 1.45.2 (d3fb005a3 2020-07-31)

$ home/bin/rustup run 1.45 rustc --version
rustc 1.45.2 (d3fb005a3 2020-07-31)

$ home/bin/rustc +1.45 --version
rustc 1.45.2 (d3fb005a3 2020-07-31)

Please let me know if there's anything else I should test out manually!

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @carols10cents ❤️

I would like to see some integration testing for this, to ensure things like rustup update will install updated channels etc. however since there's nothing obvious to me to suggest this may not work, I won't necessarily block on doing that since the current integration testing framework can be a bit of a pain to update if you're not up for the faff 😁

I certainly appreciate the unit tests.

@rbtcollins I'm minded to merge this, even if @carols10cents isn't up for doing an integration test. How do you feel?

@kinnison kinnison merged commit 7af951a into rust-lang:master Nov 21, 2020
@kamalmarhubi
Copy link
Contributor

Thanks @carols10cents <3

@carols10cents carols10cents deleted the short-version branch November 22, 2020 15:01
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.

Allow omitting patch version in toolchain specifiers
3 participants