Closed jyn514 closed 1 month ago
tl;dr, I think this is being over-thought! do we have any actual data of people using main and being unhappy with it?
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.
I think effectively no one is using main.
@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.
But I guess we could just release it and see how it goes.
We have a test driving phase to do before going live, so I hope this will help in terms of collecting user feedback.
I think effectively no one is using main.
@djc That's not entirely true: I use it as my daily driver :]
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 rustup show
in Docker files to trigger a toolchain installation according to what's inside the rust-toolchain.toml
file.
What would be the recommended upgrade path for me? What command should I invoke after this update?
I explicitly don't want to perform any compilation, so invoking cargo
commands like check
or build
is not the way forward.
rustup install
I'm just catching up with this whole conversation as a person who routinely relies on
rustup show
in Docker files to trigger a toolchain installation according to what's inside therust-toolchain.toml
file.What would be the recommended upgrade path for me? What command should I invoke after this update?
I explicitly don't want to perform any compilation, so invoking
cargo
commands likecheck
orbuild
is not the way forward.
@LukeMathWalker You'd do rustup toolchain install
/rustup install
(without any arguments) to manually install the active toolchain starting from v1.28.0. I promise we'll deliver the new release notes with a huge emphasis on this change.
I'm just catching up with this whole conversation as a person who routinely relies on
rustup show
in Docker files to trigger a toolchain installation according to what's inside therust-toolchain.toml
file. What would be the recommended upgrade path for me? What command should I invoke after this update? I explicitly don't want to perform any compilation, so invokingcargo
commands likecheck
orbuild
is not the way forward.You'd do
rustup toolchain install
(without any arguments) to manually install the active toolchain starting from v1.28.0. I promise we'll deliver the new release note with a huge emphasis on this change.
Has that been changed recently? Or was it always an option to invoke rustup toolchain install
without any arguments?
Because it is highly non-obvious if going off what's returned by rustup toolchain install --help
.
Has that been changed recently? Or was it always an option to invoke
rustup toolchain install
without any arguments? Because it is highly non-obvious if going off what's returned byrustup toolchain install --help
.
@LukeMathWalker It's a recent change in https://github.com/rust-lang/rustup/pull/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]...
[..]
I am looking forward to this change, so thanks for working on it
re: breakage
Might I suggest adding the new behaviour (#3983), and then waiting a release or two before completely removing the implicit installs? My concern is having a path with some continuity;
rustup toolchain install
on<= 1.27.1
is an error, but after>= 1.28
it will be an error not to do so, leaving no grace period.If there is need - perhaps some tool that is blocked waiting on the new behaviour - during the transitional period an extra flag could be added to opt-out of implicit installs, at the risk of some complexity. https://github.com/rust-lang/rustup/pull/3985#issuecomment-2342313221
@ickk It's a perfectly reasonable suggestion. Let's think about the available options together and find out how to do this properly.
I am looking forward to this change, so thanks for working on it re: breakage Might I suggest adding the new behaviour (#3983), and then waiting a release or two before completely removing the implicit installs? My concern is having a path with some continuity;
rustup toolchain install
on<= 1.27.1
is an error, but after>= 1.28
it will be an error not to do so, leaving no grace period. If there is need - perhaps some tool that is blocked waiting on the new behaviour - during the transitional period an extra flag could be added to opt-out of implicit installs, at the risk of some complexity. #3985 (comment)@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 rustup show active-toolchain || rustup toolchain install
will suffice?*
*: 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 rustup show active-toolchain || rustup toolchain install
in powershell?
What's wrong with using
rustup show active-toolchain || rustup toolchain install
in powershell?
@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 ||
widespread enough as for now?
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 (5af9b9484 2023-04-05)