Skip to content

set rustup profile to default #12214

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

set rustup profile to default #12214

wants to merge 1 commit into from

Conversation

usamoi
Copy link

@usamoi usamoi commented May 17, 2025

rustup in GitHub Actions has been updated to 1.28.2. Since 1.28.2 (rust-lang/rustup@f439f48), when a repository uses rust-toolchain.toml to automatically install the nightly toolchain, rustup consults the profile specified in ~/.rustup/settings.toml instead of defaulting to the default profile. This behavior is reasonable, as it aligns with how rustup toolchain install works. However, it breaks usage for nightly toolchain users on GitHub Actions because the profile in GitHub Actions is set to minimal, which means rustfmt and clippy are no longer installed automatically. This PR changes the profile to default to fix it.

A temporary fix for those experiencing broken CI:

rustup set profile default

@Copilot Copilot AI review requested due to automatic review settings May 17, 2025 05:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates Rust installation scripts to use the default profile (removing --profile=minimal) so that rustfmt and clippy are included automatically.

  • Removed explicit --profile=minimal flags from rustup installer invocations.
  • Deleted redundant rustup component add rustfmt clippy steps.
  • Adjusted Windows script error handling remains; Ubuntu and macOS now rely on installer defaults.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
images/windows/scripts/build/Install-Rust.ps1 Dropped --profile=minimal, removed manual component adds
images/ubuntu/scripts/build/install-rust.sh Dropped --profile=minimal, removed manual component adds
images/macos/scripts/build/install-rust.sh Dropped --profile=minimal, removed manual component adds
Comments suppressed due to low confidence (2)

images/ubuntu/scripts/build/install-rust.sh:14

  • Add an explicit check on the installer exit code (e.g., if [ $? -ne 0 ]; then exit 1; fi) after this line to ensure failures are caught.
curl -fsSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable

images/macos/scripts/build/install-rust.sh:13

  • Consider adding an error check immediately after this command (e.g., if [ $? -ne 0 ]; then echo "Rust installation failed"; exit 1; fi).
rustup-init -y --no-modify-path --default-toolchain=stable

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.

1 participant