Skip to content

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Sep 6, 2025

This PR bumps the toml dependency of the bump-stage0 tool to 0.8.23, which AFAICT is the highest toml version that's present in the r-l/r workspace's Cargo.lock already (so we don't introduce another toml 0.x.* series). I added some byte-buffer-to-string intermediary to workaround toml 0.8.* not having the toml 0.9.* toml::from_slice API.

To catch obvious build failures of the src/tools/bump-stage0 tool early, before we find out it can't even build when we really need it to work.

Contexts:

Fixes #146252.

@rustbot
Copy link
Collaborator

rustbot commented Sep 6, 2025

r? @clubby789

rustbot has assigned @clubby789.
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-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 Sep 6, 2025
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

tool_check_step!(BumpStage0 {
path: "src/tools/bump-stage0",
mode: |_builder| Mode::ToolBootstrap,
default: false
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to have the option to check these tools by default on CI, so that we don't have to enumerate them manually in CI scripts.

@Kobzol
Copy link
Member

Kobzol commented Sep 6, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 6, 2025

📌 Commit 7b99802 has been approved by Kobzol

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 Sep 6, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 6, 2025

Hold on, it doesn't yet check-build.
@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 6, 2025
@Kobzol
Copy link
Member

Kobzol commented Sep 6, 2025

Ah lol, I thought it was fixed already :D Sorry.

@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 6, 2025

No worries, I was like wait this doesn't actually check-build if I run it fully, lol.

@rustbot
Copy link
Collaborator

rustbot commented Sep 6, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

- We pick the higest common `toml` version used in the r-l/r workspace
  to avoid introducing Yet Another `toml` `0.x` version, which happens
  to be `0.8.23` as of the time of writing.
- We introduce a byte-buffer-to-string workaround for the `toml 0.8.*`
  series that do not have the `toml 0.9.*` series's `toml::from_slice`
  API yet. Not efficient, but this is not perf-critical so it's fine.
@rustbot
Copy link
Collaborator

rustbot commented Sep 6, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

To catch obvious build failures of the `src/tools/bump-stage0` early,
before we find out it can't even build when we really need it to work.
@jieyouxu jieyouxu changed the title Check-build bump-stage0 tool in CI Fix bump-stage0 build failure, and check-build bump-stage0 in CI Sep 6, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 6, 2025

Okay, now bump-stage0 actually checks build locally, lol.
@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 Sep 6, 2025
@Kobzol
Copy link
Member

Kobzol commented Sep 6, 2025

Looks fine. You can r=me once CI is green.

@jieyouxu
Copy link
Member Author

jieyouxu commented Sep 6, 2025

[TIMING:end] check::BumpStage0 { compiler: CompilerForCheck { build_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, rustc_rmeta_sysroot: None, std_rmeta_sysroot: None }, target: x86_64-unknown-linux-gnu } -- 18.996
Build completed successfully in 0:00:19

CI is sufficiently 🍏
@bors r=Kobzol

@bors
Copy link
Collaborator

bors commented Sep 6, 2025

📌 Commit 312a124 has been approved by Kobzol

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 Sep 6, 2025
bors added a commit that referenced this pull request Sep 6, 2025
Rollup of 5 pull requests

Successful merges:

 - #127316 (move pinned version from tracing_core to tracing)
 - #144801 (Suggest bounds in more cases, accounting for type parameters referenced in predicate)
 - #146211 (Disallow shebang in `--cfg` and `--check-cfg` arguments)
 - #146263 (Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI)
 - #146266 (miri std tests: skip all of sys::)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8fe82a0 into rust-lang:master Sep 6, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 6, 2025
rust-timer added a commit that referenced this pull request Sep 6, 2025
Rollup merge of #146263 - jieyouxu:check-bump-stage0, r=Kobzol

Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI

This PR bumps the `toml` dependency of the `bump-stage0` tool to `0.8.23`, which AFAICT is the highest `toml` version that's present in the r-l/r workspace's `Cargo.lock` already (so we don't introduce _another_ `toml 0.x.*` series). I added some byte-buffer-to-string intermediary to workaround `toml 0.8.*` not having the `toml 0.9.*` `toml::from_slice` API.

To catch obvious build failures of the `src/tools/bump-stage0` tool early, before we find out it can't even build when we really need it to work.

Contexts:

- #146250 (comment)
- [#t-release > Bump stage0 rustfmt separately ("one-off") @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Bump.20stage0.20rustfmt.20separately.20.28.22one-off.22.29/near/537916615)

Fixes #146252.
@jieyouxu jieyouxu deleted the check-bump-stage0 branch September 6, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc 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.

Check src/tools/bump-stage0 at least check-builds
5 participants