Skip to content

Add bootstrap check snapshot tests #143316

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 8 commits into from
Jul 3, 2025
Merged

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Jul 2, 2025

Split off from #143048, so that we get a baseline of how check behaved before we make changes to it. Note that the output of the check snapshot tests is suboptimal in many places, as we're missing information about stages and the build compiler. That will be changed in #143048.

r? @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2025

jieyouxu is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added 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) labels Jul 2, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jul 2, 2025

I'm still reviewing the original check PR, I have some review comments for that PR pending before this PR.

EDIT: done a review pass on the original PR, the general direction looks good to me 👍

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.

The initial baseline tests look good; the missing stage numbers on check from what I understand is left as a follow-up.

Comment on lines 182 to 186
pub fn get_stage(&self) -> Option<u32> {
self.stage.or(self
.built_by
.map(|compiler| if self.name == "std" { compiler.stage } else { compiler.stage + 1 }))
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: maybe explicitly spell out the core model here?

Continuing from #143048 (review),

The stage numbering here has two cases:

  1. (compiler, library) will receive the same $\mathrm{stage}$ number, because std is necessarily tightly coupled to the compiler.
  2. For all other cases, they should be considered $\mathrm{stage} + 1$.

Comment on lines +1273 to +1275
[build] rustc 0 <host> -> rustc 1 <host>
[build] rustc 1 <host> -> std 1 <host>
[check] rustc <host>
Copy link
Member

Choose a reason for hiding this comment

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

Question: I'm assuming the staging info is intended to be a follow-up (as in the overall PR) right?

As in, I'd expect the derivation chain for this to look like (overly simplified)

$$\prescript{{}}{\text{host}}{\mathrm{LLVM}} \longrightarrow \left\langle \text{compiler}_{\mathrm{0}}^{\mathrm{build}}, \text{library}_{\mathrm{0}}^{\mathrm{build}} \right\rangle \longrightarrow \text{compiler}_{\mathrm{1}}^{\mathrm{check}}$$

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Right now, the check steps implicitly decide which compiler will build them, it's not represented explicitly in their Step parameters. Therefore it's also not easily representable in the step metadata.

@jieyouxu
Copy link
Member

jieyouxu commented Jul 2, 2025

@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 Jul 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Kobzol
Copy link
Member Author

Kobzol commented Jul 2, 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 Jul 2, 2025
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

jieyouxu commented Jul 2, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 2, 2025

📌 Commit 3f3c498 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 Jul 2, 2025
bors added a commit that referenced this pull request Jul 3, 2025
Rollup of 9 pull requests

Successful merges:

 - #143192 (Improve CSS for source code block line numbers)
 - #143251 (bootstrap: add build.tidy-extra-checks option)
 - #143273 (Make the enum check work for negative discriminants)
 - #143292 (Explicitly handle all nodes in `generics_of` when computing parent)
 - #143316 (Add bootstrap check snapshot tests)
 - #143321 (byte-addresses memory -> byte-addressed memory)
 - #143324 (interpret: move the native call preparation logic into Miri)
 - #143325 (Use non-global interner in `test_string_interning` in bootstrap)
 - #143327 (miri: improve errors for type validity assertion failures)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4a3c2fc into rust-lang:master Jul 3, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 3, 2025
rust-timer added a commit that referenced this pull request Jul 3, 2025
Rollup merge of #143316 - Kobzol:bootstrap-check-tests, r=jieyouxu

Add bootstrap check snapshot tests

Split off from #143048, so that we get a baseline of how check behaved before we make changes to it. Note that the output of the check snapshot tests is suboptimal in many places, as we're missing information about stages and the build compiler. That will be changed in #143048.

r? `@jieyouxu`
@Kobzol Kobzol deleted the bootstrap-check-tests branch July 3, 2025 07:24
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Jul 3, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143192 (Improve CSS for source code block line numbers)
 - rust-lang/rust#143251 (bootstrap: add build.tidy-extra-checks option)
 - rust-lang/rust#143273 (Make the enum check work for negative discriminants)
 - rust-lang/rust#143292 (Explicitly handle all nodes in `generics_of` when computing parent)
 - rust-lang/rust#143316 (Add bootstrap check snapshot tests)
 - rust-lang/rust#143321 (byte-addresses memory -> byte-addressed memory)
 - rust-lang/rust#143324 (interpret: move the native call preparation logic into Miri)
 - rust-lang/rust#143325 (Use non-global interner in `test_string_interning` in bootstrap)
 - rust-lang/rust#143327 (miri: improve errors for type validity assertion failures)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants