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

[Feature Request] Downgrading nightly toolchains #2067

Closed
elichai opened this issue Oct 16, 2019 · 9 comments · Fixed by #2126
Closed

[Feature Request] Downgrading nightly toolchains #2067

elichai opened this issue Oct 16, 2019 · 9 comments · Fixed by #2126

Comments

@elichai
Copy link

elichai commented Oct 16, 2019

As talked on Discord with @kinnison
I think an interesting usecase is to be able to downgrade your nightly feature to one that supports specific toolchains.
i.e.
rustup toolchain install nightly --downgrade -c rustc -c rust-std -c cargo -c rustfmt -c clippy -c rls -c rust-analysis -c miri

This can make adding new components to your local toolchain easier (then tools like miri could add this to their docs and you won't need to uninstall latest nightly before installing this).

Another thing that this made me think of, maybe a way to aggregate components?
For example, I install rustup toolchain install nightly -c cargo and now I want to add miri support so by doing something like rustup toolchain install nightly --downgrade --add -c miri It will now find me a toolchain with both clippy and miri.

@kinnison
Copy link
Contributor

I wonder if @jonhoo might have input on this?

@jonhoo
Copy link
Contributor

jonhoo commented Oct 16, 2019

--downgrade sounds to me like an option on component add, not on install. So you'd do:

$ rustup component add --allow-downgrade miri

@kinnison
Copy link
Contributor

UX aside, it's all the same pathway internally, so it'd go via your backtracking code @jonhoo :D I was more interested in what you thought about a bool to obviate the "stop at current version" check we currently have.

@jonhoo
Copy link
Contributor

jonhoo commented Oct 16, 2019

I guess it seems okay to downgrade if the user explicitly asks for it 🤷‍♂️

@kinnison kinnison self-assigned this Oct 16, 2019
@Rantanen
Copy link

Rantanen commented Nov 1, 2019

Travis provides Rust environments for Nightly with:

language: rust
rust:
    - nightly

This is great, unless you happen to require specific components for your builds. If you do, you'll need to uninstall the existing Rust version to be able to ensure rustup can install something that fulfills your requirements.

This is from Intercom's current .travis.yml:

    - rustup component add clippy rustfmt
    - if( ! cargo clippy -V || ! cargo fmt --version ); then rustup uninstall nightly && rustup toolchain install nightly -c clippy -c rustfmt; fi

--allow-downgrade would simplify this a lot!

@kinnison kinnison removed their assignment Nov 9, 2019
@kinnison kinnison added this to the 1.21.0 milestone Nov 10, 2019
@payload
Copy link
Contributor

payload commented Nov 11, 2019

I'll look into it during RustFest, coordination through rust-lang discord #wg-rustup

@RalfJung
Copy link
Member

RalfJung commented Dec 5, 2019

The PR mentions "rustup toolchain install --allow-downgrade", but what about "rustup component add --allow-downgrade" that was also mentioned above -- should a new issue be opened for that?

@kinnison
Copy link
Contributor

kinnison commented Dec 5, 2019

@RalfJung It might make sense to create an issue around that, yes.

The functionality is available via rustup toolchain install $already_installed_channel -c added_component_name but the rustup component add pathway is a bit different and harder to get this feature into right now, hence it's missing from the CLI for 1.21.0

@RalfJung
Copy link
Member

RalfJung commented Dec 5, 2019

New issue opened: #2146

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

Successfully merging a pull request may close this issue.

6 participants