Skip to content
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

centralize build stamp logic #135281

Merged
merged 23 commits into from
Jan 12, 2025
Merged

centralize build stamp logic #135281

merged 23 commits into from
Jan 12, 2025

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jan 9, 2025

This PR brings all the stamp file handling into one place inside build_stamp module, which takes care of everything related to build stamps. By doing this, we cut down on duplicated code and types and keep the codebase easier to maintain and more consistent.

Main goals are:

  • Make stamp handling stricter so we don't have to pass Paths around and manually join on arbitrary directories
  • Keep all stamp-related logic in one place
  • Make it easier to test and debug
  • Avoid duplication
  • Keep things simple and well-documented

Resolves #134962

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2025

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added 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) labels Jan 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2025

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

1 similar comment
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2025

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

@jieyouxu jieyouxu self-assigned this Jan 9, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 9, 2025

(This would close #134962)

@onur-ozkan
Copy link
Member Author

(This would close #134962)

Funny that I haven't even seen it...

@jieyouxu jieyouxu added the A-bootstrap-stamp Area: bootstrap stamp logic label Jan 9, 2025
@onur-ozkan onur-ozkan removed the A-bootstrap-stamp Area: bootstrap stamp logic label Jan 9, 2025
@rustbot rustbot added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Jan 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2025

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

@onur-ozkan onur-ozkan added the A-bootstrap-stamp Area: bootstrap stamp logic label Jan 9, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 9, 2025

I'll review this tmrw, I wanted to do some more manual local testing just in case. I had a brief glance at the changes, and I must say this is much easier to follow. So thank you for cleaning this up!

@klensy

This comment was marked as resolved.

@klensy

This comment was marked as resolved.

@onur-ozkan onur-ozkan 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 Jan 11, 2025
@onur-ozkan
Copy link
Member Author

@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 Jan 11, 2025
@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Jan 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2025

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol

@jieyouxu
Copy link
Member

Nooooooooooooooooo I don't want to rebase this PR.....

I would probably just squash the bootstrap bits in one commit and r-d-g bits in another commit, lol

@onur-ozkan
Copy link
Member Author

@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 Jan 12, 2025
@onur-ozkan
Copy link
Member Author

Nooooooooooooooooo I don't want to rebase this PR.....

I would probably just squash the bootstrap bits in one commit and r-d-g bits in another commit, lol

Some commits (like b03fba7) shouldn't exist by their own but it's just too painful to squash them with related ones when you have too many commits..

@jieyouxu
Copy link
Member

Some commits (like b03fba7) shouldn't exist by their own but it's just too painful to squash them with related ones when you have too many commits..

I mean like squash all the bootstrap bits into one commit lol.

@onur-ozkan
Copy link
Member Author

Some commits (like b03fba7) shouldn't exist by their own but it's just too painful to squash them with related ones when you have too many commits..

I mean like squash all the bootstrap bits into one commit lol.

That's even worse lol

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, you can r=me after PR CI is green.

@onur-ozkan
Copy link
Member Author

@bors r=jieyouxu rollup=never

@bors
Copy link
Contributor

bors commented Jan 12, 2025

📌 Commit 2a4bcf5 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 Jan 12, 2025
@bors
Copy link
Contributor

bors commented Jan 12, 2025

⌛ Testing commit 2a4bcf5 with merge 627513a...

@bors
Copy link
Contributor

bors commented Jan 12, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 627513a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 12, 2025
@bors bors merged commit 627513a into rust-lang:master Jan 12, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 12, 2025
@onur-ozkan onur-ozkan deleted the build-stamps branch January 12, 2025 21:03
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (627513a): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 763.652s -> 763.304s (-0.05%)
Artifact size: 326.10 MiB -> 326.03 MiB (-0.02%)

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-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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.

Investigate if stamp logic in bootstrap could be consistently handled
7 participants