Skip to content

Enforce in bootstrap that clippy must have stage at least 1 #145131

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 15 commits into from
Aug 14, 2025

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 8, 2025

This mostly piggybacks on the previous x check rework.

The new "rules" follow the new staging logic. So x clippy <foo> lints foo using stage0 Clippy. x clippy --stage 2 <foo> lints foo using stage1 Clippy (which is built from in-tree sources).

I had to fix some latent issues with prepare_compiler_for_check along the way.

Checking rustc_private tools should now check less compiler crates (or rather not check compiler examples/tests/etc.), potentially speeding it up slightly.

I also had to make some manual adjustments to x clippy ci so that it doesn't do needless work.

r? @jieyouxu

@rustbot rustbot added A-bootstrap-stamp Area: bootstrap stamp logic A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Aug 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 8, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Aug 11, 2025

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

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, some questions

@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 11, 2025

Rebased.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 11, 2025

I realized that x clippy ci is special enough to warrant a custom/manual selection of the invoked steps, effectively bypassing normal staging. I tried to optimize it to build as few things as possible.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 12, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 12, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Aug 13, 2025

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

Kobzol added 2 commits August 13, 2025 08:07
To correctly pass `RustcPrivateCompilers` to it and to avoid running it on `x clippy compiler`.
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, one question

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks

@jieyouxu
Copy link
Member

@bors r+ rollup=never (clippy staging)

@bors
Copy link
Collaborator

bors commented Aug 13, 2025

📌 Commit 2ea2100 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2025
@bors
Copy link
Collaborator

bors commented Aug 14, 2025

⌛ Testing commit 2ea2100 with merge 2c1ac85...

@bors
Copy link
Collaborator

bors commented Aug 14, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 2c1ac85 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 14, 2025
@bors bors merged commit 2c1ac85 into rust-lang:master Aug 14, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 14, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8e77954 (parent) -> 2c1ac85 (this PR)

Test differences

Show 12 test diffs

Stage 0

  • core::builder::tests::snapshot::clippy_bootstrap: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_ci: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_compiler_stage1: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_compiler_stage2: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_miri_stage1: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_miri_stage2: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_std_stage1: [missing] -> pass (J0)
  • core::builder::tests::snapshot::clippy_std_stage2: [missing] -> pass (J0)

Additionally, 4 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 2c1ac85679678dfe5cce7ea8037735b0349ceaf3 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 18031.9s -> 10548.2s (-41.5%)
  2. dist-aarch64-linux: 6005.8s -> 8383.3s (39.6%)
  3. x86_64-apple-2: 7840.2s -> 4786.8s (-38.9%)
  4. dist-aarch64-apple: 7539.0s -> 6208.1s (-17.7%)
  5. aarch64-gnu-llvm-19-2: 2476.5s -> 2200.5s (-11.1%)
  6. x86_64-gnu-llvm-20-1: 3698.2s -> 3315.6s (-10.3%)
  7. dist-apple-various: 5039.5s -> 4565.3s (-9.4%)
  8. dist-aarch64-msvc: 5807.2s -> 5291.6s (-8.9%)
  9. aarch64-gnu-debug: 4669.2s -> 5010.8s (7.3%)
  10. dist-x86_64-musl: 7476.7s -> 7888.3s (5.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@Kobzol Kobzol deleted the bootstrap-clippy branch August 14, 2025 08:07
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2c1ac85): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
4.0% [0.2%, 11.7%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [-0.4%, 11.7%] 4

Max RSS (memory usage)

Results (primary 6.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
6.5% [6.5%, 6.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 6.5% [6.5%, 6.5%] 1

Cycles

Results (primary 2.4%, secondary 3.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (primary 0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 3
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 2
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 3

Bootstrap: 469.796s -> 470.224s (0.09%)
Artifact size: 377.36 MiB -> 377.49 MiB (0.04%)

@Kobzol
Copy link
Member Author

Kobzol commented Aug 14, 2025

Pretty wild noise, but noise nevertheless:
image

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bootstrap-stamp Area: bootstrap stamp logic A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants