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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Contributor

@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
Contributor 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
Contributor 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
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