Skip to content

mach: Install Rust toolchain during bootstrap if needed #35795

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

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

delan
Copy link
Member

@delan delan commented Mar 5, 2025

In servo/ci-runners#27, we found that mach bootstrap was busted due to a “toolchain not installed” error. This was because rustup 1.28.0 (as well as the upcoming rustup 1.28.1 with RUSTUP_AUTO_INSTALL=0) no longer installs the Rust toolchain when you try to use it for the first time (see rust-lang/rustup#3985, rust-lang/rustup#4211).

This patch explicitly installs the Rust toolchain during mach bootstrap. Users that prefer RUSTUP_AUTO_INSTALL=0 will need to rerun mach bootstrap whenever we bump our Rust version (rust-toolchain.toml).


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because testing mach’s handling of this edge case would be impractical, and the failure mode is relatively simple

@delan delan force-pushed the fix-rustup-toolchain-not-installed branch from b85fedc to 7e81791 Compare March 5, 2025 04:53
Copy link
Member

@mukilan mukilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mukilan mukilan enabled auto-merge March 5, 2025 04:57
@mukilan mukilan added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit d9ea724 Mar 5, 2025
22 checks passed
@mukilan mukilan deleted the fix-rustup-toolchain-not-installed branch March 5, 2025 05:32
simonwuelker pushed a commit to simonwuelker/servo that referenced this pull request Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants