Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rust: fix parallel execution of tests using the nightly toolchain #19876

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
Jun 25, 2025

Conversation

redsun82
Copy link
Contributor

Since we dropped checked in toolchain files for tests requiring nightly, the setup.sh script was not doing its job of setting up the toolchains and the rust-src component, occasionally leading to test failures.

@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 12:10
@redsun82 redsun82 requested a review from a team as a code owner June 25, 2025 12:10
@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jun 25, 2025
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 centralizes the nightly toolchain definition and ensures rust-src is installed for parallel QL tests by updating the setup script and extractor logic.

  • setup.sh now installs toolchains from a dedicated nightly_toolchain directory instead of scanning multiple files.
  • qltest.rs uses include_str! to write the nightly toolchain file instead of an inline constant.
  • Adds a standalone rust-toolchain.toml with the nightly channel and rust-src component.

Reviewed Changes

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

File Description
rust/ql/test/setup.sh Switches to a single install step using the nightly_toolchain dir
rust/extractor/src/qltest.rs Replaces format!/const with include_str! for the toolchain file
rust/extractor/src/nightly_toolchain/rust-toolchain.toml Defines the nightly channel and includes rust-src component
Comments suppressed due to low confidence (1)

rust/ql/test/setup.sh:15

  • Running rustup install without a local rust-toolchain.toml in this directory may fail or install an unintended default. Ensure it’s pointed at the intended toolchain file or run it from the correct directory.
rustup install


# no to install rust-src explicitly, it's listed in the following toolchains
Copy link
Preview

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment has a typo and is unclear. Consider rephrasing to: # no need to install rust-src explicitly, it’s included in the nightly toolchain file.

Suggested change
# no to install rust-src explicitly, it's listed in the following toolchains
# no need to install rust-src explicitly, it’s included in the nightly toolchain file

Copilot uses AI. Check for mistakes.

@redsun82 redsun82 force-pushed the redsun82/rust-qltest-setup-nightly-toolchain branch from a497e8f to ad20060 Compare June 25, 2025 12:12
Since we dropped checked in toolchain files for tests requiring nightly,
the `setup.sh` script was not doing its job of setting up the toolchains
and the `rust-src` component, occasionally leading to test failures.
@redsun82 redsun82 force-pushed the redsun82/rust-qltest-setup-nightly-toolchain branch from ad20060 to 1f66f90 Compare June 25, 2025 12:13
@redsun82 redsun82 requested a review from geoffw0 June 25, 2025 12:13
@redsun82 redsun82 merged commit b8b5736 into main Jun 25, 2025
14 of 15 checks passed
@redsun82 redsun82 deleted the redsun82/rust-qltest-setup-nightly-toolchain branch June 25, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants