Skip to content

Enforce in bootstrap that check must have stage at least 1 #143048

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jun 26, 2025

This PR is another step towards https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523586917, this time dealing with x check.

It enforces the invariant that:

  • We check std stage N with rustc stage N
  • We check everything else stage N with rustc stage N - 1

It creates a single function that prepares a proper build compiler for checking something, and also adds snapshot tests for various common check steps. Some obsolete code was also removed.

The default check stage also becomes 1, for all profiles. I tested manually that x check std with download-ci-rustc still works and doesn't build rustc locally.

Subsumes #139170.

r? @ghost

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 26, 2025
@Kobzol Kobzol force-pushed the bootstrap-check-stage-1 branch from f06e41e to aed5f23 Compare June 26, 2025 08:03
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 26, 2025

CC @jieyouxu (one of many heaps of bootstrap fixup commits I have in store 😆)

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jun 26, 2025

☔ The latest upstream changes (presumably #141899) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 26, 2025
@Kobzol Kobzol force-pushed the bootstrap-check-stage-1 branch from aed5f23 to a36ee24 Compare June 26, 2025 14:29
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 26, 2025

Cross-compilation checks are now doing too much work, I need to take a look at how we can reduce that, because x check --stage1 with cross-compilation is no longer a thing.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.873 Building wheels for collected packages: reuse
#16 2.874   Building wheel for reuse (pyproject.toml): started
#16 3.090   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 3.091   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132719 sha256=d2a2565e7037ad3883fb9337653f2e25bbb588534fbef3697286cbc26d1bf634
#16 3.091   Stored in directory: /tmp/pip-ephem-wheel-cache-dy_04mdo/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 3.093 Successfully built reuse
#16 3.093 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.494 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.495 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.6s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
5 participants