Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ dependencies = [
"curl",
"indexmap",
"serde",
"toml 0.7.8",
"toml 0.8.23",
]

[[package]]
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,3 +839,9 @@ tool_check_step!(Linkchecker {
mode: |_builder| Mode::ToolBootstrap,
default: false
});

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.

});
1 change: 1 addition & 0 deletions src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ impl<'a> Builder<'a> {
check::FeaturesStatusDump,
check::CoverageDump,
check::Linkchecker,
check::BumpStage0,
// This has special staging logic, it may run on stage 1 while others run on stage 0.
// It takes quite some time to build stage 1, so put this at the end.
//
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/host-x86_64/pr-check-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN sh /scripts/sccache.sh

ENV SCRIPT \
python3 ../x.py check && \
python3 ../x.py check src/tools/bump-stage0 && \
python3 ../x.py clippy ci --stage 2 && \
python3 ../x.py test --stage 1 core alloc std test proc_macro && \
python3 ../x.py test --stage 1 src/tools/compiletest && \
Expand Down
2 changes: 1 addition & 1 deletion src/tools/bump-stage0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ build_helper = { path = "../../build_helper" }
curl = "0.4.38"
indexmap = { version = "2.0.0", features = ["serde"] }
serde = { version = "1.0.125", features = ["derive"] }
toml = "0.7"
toml = "0.8.23"
6 changes: 5 additions & 1 deletion src/tools/bump-stage0/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ fn fetch_manifest(
format!("{}/dist/channel-rust-{}.toml", config.dist_server, channel)
};

Ok(toml::from_slice(&http_get(&url)?)?)
// FIXME: on newer `toml` (>= `0.9.*`), use `toml::from_slice`. For now, we use the most recent
// `toml` available in-tree which is `0.8.*`, so we have to do an additional dance here.
let response = http_get(&url)?;
let response = String::from_utf8(response)?;
Ok(toml::from_str(&response)?)
}

fn http_get(url: &str) -> Result<Vec<u8>, Error> {
Expand Down
Loading