Skip to content

Recommended toolchain install command line isn't exactly right #4212

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

Closed
2 tasks done
Tracked by #4231 ...
cbiffle opened this issue Mar 3, 2025 · 2 comments · Fixed by #4258
Closed
2 tasks done
Tracked by #4231 ...

Recommended toolchain install command line isn't exactly right #4212

cbiffle opened this issue Mar 3, 2025 · 2 comments · Fixed by #4258
Labels
Milestone

Comments

@cbiffle
Copy link

cbiffle commented Mar 3, 2025

Verification

Problem

In the behavior introduced in the latest release, the error message if you don't have the toolchain installed is not actually correct if your rust-toolchain.toml file formerly triggered the installation of more than just a toolchain. This is common in cross-compile situations with the targets key.

rustup 1.28 tells me:

[cbiffle@gwydion soundlaser-rs]$ cargo build
error: toolchain '1.85.0-x86_64-unknown-linux-gnu' is not installed
help: run `rustup toolchain install 1.85.0-x86_64-unknown-linux-gnu` to install it

...but that's not actually correct, because that does not install the targets listed in the toml. cargo build fails.

On the other hand, rustup toolchain install with no arguments does the right thing.

Steps

  1. Update rustup to 1.28.
  2. Check out, say, https://github.com/cbiffle/soundlaser-rs
  3. Make sure you don't have 1.85.0 installed.
  4. Run cargo build.
  5. Now, run the exact command from the error that displays.
  6. Now, try cargo build again.

Possible Solution(s)

In the event that the command is failing in a directory with a (valid) rust-toolchain.toml, perhaps the error message should suggest the no-argument version of rustup toolchain install.

Notes

No response

Rustup version

rustup 1.28.0 (6e19fbec7 2025-03-02)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.85.0 (4d91de4e4 2025-02-17)`

Installed toolchains

Many.

OS version

Linux gwydion 6.9.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 26 May 2024 01:30:29 +0000 x86_64 GNU/Linux
@cbiffle cbiffle added the bug label Mar 3, 2025
morgangibbs87 added a commit to risc0/risc0 that referenced this issue Mar 4, 2025
)

- Per `rustup` changelog: `rustup will no longer automatically install
the active toolchain if it is not installed.`
  - https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html
- Related issue for reference:
rust-lang/rustup#4212
@djc djc mentioned this issue Mar 5, 2025
8 tasks
@rami3l rami3l added this to the 1.28.2 milestone Mar 14, 2025
@rami3l
Copy link
Member

rami3l commented Mar 18, 2025

@cbiffle Thanks for filing this issue! Actually this point has been considered in my original implementation and should have been shipped as a part of v1.28.0, however it will sometimes trigger infinite recursion so I pulled it back. I'll definitely give it another look.

Dodecahedr0x pushed a commit to Dodecahedr0x/risc0 that referenced this issue Mar 20, 2025
…sc0#2915)

- Per `rustup` changelog: `rustup will no longer automatically install
the active toolchain if it is not installed.`
  - https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html
- Related issue for reference:
rust-lang/rustup#4212
@Dustin4444

This comment has been minimized.

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

Successfully merging a pull request may close this issue.

3 participants