-
Notifications
You must be signed in to change notification settings - Fork 893
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
Tracking: Rustup should not perform implicit installations #3635
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
I've been looking through related issues and PRs for the last 20 minutes and I still don't have a straight answer:
I was sent to #1397 by https://rust-lang.github.io/rustup/overrides.html#overrides but that issue is now closed. I'm here because this appears to be the latest one with activity and I didn't want to necro. |
@abonander Hi! #1397 has been closed and the fix will be shipped in Rustup v1.28.0 (see #3225's milestone). The plan for this release also includes introducing a We don't currently have a specific timeline for a new release though as the team has limited bandwidth right now, I'm really sorry 🙇 |
That's fair.
While optimizing for consistency and fewest surprises makes sense, I'm inclined to agree with @samestep that this might come at a non-trivial cost to developer experience, where @samestep in your experience, how often is the toolchain updated in projects you work on? Do you think it would still be prohibitive if the change was instead to put up an explicit prompt that you could just Enter on to move forward with installing the new toolchain?
Not sure, allowlisting (I think we prefer to use "whitelisting" these days) both |
@djc Now OTOH, I definitely think a prompt will achieve similar results while remaining explicit. I've originally planned to do that as part of the I'm also curious about @samestep's feedback. |
So zooming out: IMO if we introduce the need for I actually think the case of running (I think we should avoid mixing #988 into this issue -- yes, that can happen, but it happens today and there would still be other ways it can happen if we require explicit toolchain installations.) So I think there are like 5 paths potential ways to go:
After two more weeks of consideration, I still like (5) best:
Downsides:
We could also introduce a new environment variable ( @Veykril do you have opinions from the RA side of things? |
The experience Daniel and I had over 5 or so years of supporting users here has been that rustup going out to the internet unpredictable is a significant problem. Consider this breakdown instead:
Separately, goenv, pyeng, nodenv - and others - all have an explicit model, and I haven't seen any frustration at that on the 'net. tl;dr, I think this is being over-thought! do we have any actual data of people using main and being unhappy with it? |
I'm mostly curious what the plan is to roll this out; Is the impact expected to be minimal?, is there going to be some kind of deprecation strategy for the old behaviour to help tools and scripts which depend on rustup? |
(not reading up on the thread but as I was pinged) r-a would likely benefit from an explicit install step. I'm annoyed with checking out a repo that has a toolchain override in it just for r-a to hide the installation behind a Oh also being able to query whether the toolchain for the dir needs to be installed of course |
Well, it's a large change and I could see how people get frustrated with the experience hit (similar to @samestep). I think effectively no one is using main. But I guess we could just release it and see how it goes. |
@djc That's not entirely true: I use it as my daily driver :] And from my experience, not many repos I work with use toolchain overrides, so I'm feeling okay anyway in this regard.
We have a test driving phase to do before going live, so I hope this will help in terms of collecting user feedback. |
Note the use of "effectively". 😉 |
Okay, let's close this and see what happens during the beta period. |
I'm just catching up with this whole conversation as a person who routinely relies on I explicitly don't want to perform any compilation, so invoking |
|
@LukeMathWalker You'd do |
Has that been changed recently? Or was it always an option to invoke |
@LukeMathWalker It's a recent change in #3983. The actual syntax is suggested by @ChrisDenton IIRC. We have also updated the help message: > rustup --version
rustup 1.27.1+445 (15a7ec40f 2024-09-09)
[..]
> rustup toolchain install --help
Install or update the given toolchains, or by default the active toolchain
Usage: rustup[EXE] toolchain install [OPTIONS] [TOOLCHAIN]...
[..] |
@ickk It's a perfectly reasonable suggestion. Let's think about the available options together and find out how to do this properly. |
@ickk Do you think
*: I'm not sure about the corresponding PowerShell syntax, maybe the following? (cc @ChrisDenton) $(rustup show active-toolchain | Out-Host; $?) -or $(rustup toolchain install | Out-Host; $?) |
What's wrong with using |
@ChrisDenton I did some more research; looks like that's a new syntax in PS7, and I must have been looking at some old literature. I'm not sure how we should properly suggest this for Windows users in general, is |
Oh for old powershell I'd do it like: rustup show active-toolchain; if ($LASTEXITCODE -ne 0) { rustup toolchain install } |
Problem you are trying to solve
here is a transcript of a session with rustup
Proposed Solution & Progress
[The following behaviors of the current
rustup
should be changed:]rustc
afterwards implicitly reinstalls the toolchain.I do not expect rustup to implicitly install in any case other than when[@rami3l: We shouldn't do even that, instead we should let the user explicitly install the required toolchain with a command.]rust-toolchain.toml
is in the current directory. in fact, you can see thatrustc +nightly
does not implicitly install, onlyrustc
by itself.rustup --version
also silently installs.rustup show
also silently installs.Notes
rustup 1.26.0 (5af9b94 2023-04-05)
Tasks
rust-toolchain.toml
" #2686rustc --version
should not trigger/initiate toolchain updates #3943rustup --version
#3948rustup show
should not force-install the default toolchain if it is not installed. #1397--force-non-host
flag should evolve #3982The text was updated successfully, but these errors were encountered: