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

Rustup should not perform implicit installations #3635

Open
1 of 2 tasks
jyn514 opened this issue Jan 7, 2024 · 5 comments
Open
1 of 2 tasks

Rustup should not perform implicit installations #3635

jyn514 opened this issue Jan 7, 2024 · 5 comments
Assignees
Labels
enhancement tracking This is a tracking issue
Milestone

Comments

@jyn514
Copy link
Member

jyn514 commented Jan 7, 2024

Problem you are trying to solve

here is a transcript of a session with rustup

PS C:\Users\jyn\src\example> rustup toolchain list                              
nightly-x86_64-pc-windows-msvc (default)
1.74-x86_64-pc-windows-msvc
stage1
PS C:\Users\jyn\src\example> rustup uninstall nightly
info: uninstalling toolchain 'nightly-x86_64-pc-windows-msvc'
info: toolchain 'nightly-x86_64-pc-windows-msvc' uninstalled
PS C:\Users\jyn\src\example> rustup toolchain list   
1.74-x86_64-pc-windows-msvc
stage1
PS C:\Users\jyn\src\example> rustc
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2024-01-07, rust version 1.77.0-nightly (b6a8c762e 2024-01-06)
info: downloading component 'cargo'
^C
PS C:\Users\jyn\src\example> rustc +nightly
error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed
PS C:\Users\jyn\src\example> rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'

Proposed Solution & Progress

  • uninstalling the default toolchain happens silently. i would expect either a warning (by the same logic as Give a warning before uninstalling the active/default toolchain, or the last/host target for a toolchain #3319), or for rustup to switch to a different default toolchain.
  • running rustc afterwards implicitly reinstalls the toolchain. i do not expect rustup to implicitly install in any case other than when rust-toolchain.toml is in the current directory. in fact, you can see that rustc +nightly does not implicitly install, only rustc by itself.
  • running rustup --version also silently installs.
  • running rustup show also silently installs.

Notes

rustup 1.26.0 (5af9b94 2023-04-05)

Tasks

  1. enhancement
    rami3l
  2. E-mentor bug help wanted
@rami3l
Copy link
Member

rami3l commented Jan 8, 2024

@jyn514 Thanks a lot for filing this issue! I see basically two points being made here:

This is a nice suggestion, and I'm looking forward to implementing it :)

  • running rustc afterwards implicitly reinstalls the toolchain. i do not expect rustup to implicitly install in any case other than when rust-toolchain.toml is in the current directory. in fact, you can see that rustc +nightly does not implicitly install, only rustc by itself.
  • running rustup --version also silently installs.

As for removing implicit installations, it's already on our list (#3546 (comment)), but it seems to me that a separate issue hasn't been created yet.

Would you mind if I split this issue into two so that they can be tracked separately?
I personally suggest use #3546 to track the removal of implicit installations, and move the first point over to #3319.
Does that sound okay to you?

@rami3l rami3l self-assigned this Jan 8, 2024
@jyn514
Copy link
Member Author

jyn514 commented Jan 8, 2024

sounds good to me :)

@rami3l rami3l changed the title behavior when uninstalling default toolchain is not ideal Rustup should not perform implicitly installations Jan 12, 2024
@rami3l
Copy link
Member

rami3l commented Jan 12, 2024

Hmmm I tried to change the description of #3546 but maybe it's not the best place to track implicit installation removal. I'll reuse this thread for that instead.

@rami3l rami3l added this to the On Deck milestone Jan 17, 2024
@rami3l rami3l changed the title Rustup should not perform implicitly installations Rustup should not perform implicit installations Jan 17, 2024
@rbtcollins
Copy link
Contributor

See #2797 (comment) and follow the links out fro there. Multiple toolchains in #3546 seems entirely orthogonal. Closing as duplicate with #1397

@rami3l
Copy link
Member

rami3l commented Jan 29, 2024

@rbtcollins Sorry, I've changed this to be a meta tracking issue which has #1397 on its list. Maybe that's not clear enough?

@rami3l rami3l reopened this Mar 13, 2024
@rami3l rami3l added tracking This is a tracking issue and removed duplicate labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement tracking This is a tracking issue
Projects
None yet
Development

No branches or pull requests

3 participants