Skip to content

Commit a1d92bf

Browse files
authored
Unrolled build for #147374
Rollup merge of #147374 - jieyouxu:bootstrap-redirect-pages, r=Kobzol bootstrap: don't build book redirect pages during dry-run/test Currently, `./x test bootstrap` does not automatically transitively checkout submodules needed to pass all involved test steps. Apparently one place where bootstrap's self-test can choke on locally is trying to build book redirect pages without the book submodules checked out. This change is orthogonal to making bootstrap checking out required submodules for self-tests, and IMO is beneficial regardless since IMO we should not be building these redirect pages during test/dry-run _anyway_. This was blocking me trying to rebless bootstrap self-tests for #147372. cf. [#t-infra/bootstrap > Bootstrap self-tests @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Bootstrap.20self-tests/near/543157194). r? `@Kobzol` (or bootstrap)
2 parents 981353c + 7ed476f commit a1d92bf

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/bootstrap/src/core/build_steps/doc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ impl Step for TheBook {
274274

275275
// build the redirect pages
276276
let _guard = builder.msg(Kind::Doc, "book redirect pages", None, build_compiler, target);
277+
if builder.config.dry_run() {
278+
return;
279+
}
280+
277281
for file in t!(fs::read_dir(redirect_path)) {
278282
let file = t!(file);
279283
let path = file.path();

src/bootstrap/src/core/builder/tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,12 +1270,12 @@ mod snapshot {
12701270
[doc] book/first-edition (book) <host>
12711271
[doc] book/second-edition (book) <host>
12721272
[doc] book/2018-edition (book) <host>
1273-
[build] rustdoc 1 <host>
12741273
[build] rustc 1 <host> -> std 1 <target1>
12751274
[doc] book (book) <target1>
12761275
[doc] book/first-edition (book) <target1>
12771276
[doc] book/second-edition (book) <target1>
12781277
[doc] book/2018-edition (book) <target1>
1278+
[build] rustdoc 1 <host>
12791279
[doc] rustc 1 <host> -> standalone 2 <host>
12801280
[doc] rustc 1 <host> -> standalone 2 <target1>
12811281
[doc] rustc 1 <host> -> std 1 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
@@ -1409,12 +1409,12 @@ mod snapshot {
14091409
[doc] book/first-edition (book) <host>
14101410
[doc] book/second-edition (book) <host>
14111411
[doc] book/2018-edition (book) <host>
1412-
[build] rustdoc 1 <host>
14131412
[build] rustc 1 <host> -> std 1 <target1>
14141413
[doc] book (book) <target1>
14151414
[doc] book/first-edition (book) <target1>
14161415
[doc] book/second-edition (book) <target1>
14171416
[doc] book/2018-edition (book) <target1>
1417+
[build] rustdoc 1 <host>
14181418
[doc] rustc 1 <host> -> standalone 2 <host>
14191419
[doc] rustc 1 <host> -> standalone 2 <target1>
14201420
[doc] rustc 1 <host> -> std 1 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
@@ -1493,8 +1493,8 @@ mod snapshot {
14931493
[doc] book/first-edition (book) <target1>
14941494
[doc] book/second-edition (book) <target1>
14951495
[doc] book/2018-edition (book) <target1>
1496-
[build] rustdoc 1 <host>
14971496
[build] rustc 1 <host> -> std 1 <host>
1497+
[build] rustdoc 1 <host>
14981498
[doc] rustc 1 <host> -> standalone 2 <target1>
14991499
[doc] rustc 1 <host> -> std 1 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
15001500
[doc] nomicon (book) <target1>
@@ -1537,8 +1537,8 @@ mod snapshot {
15371537
[doc] book/first-edition (book) <target1>
15381538
[doc] book/second-edition (book) <target1>
15391539
[doc] book/2018-edition (book) <target1>
1540-
[build] rustdoc 1 <host>
15411540
[build] rustc 1 <host> -> std 1 <host>
1541+
[build] rustdoc 1 <host>
15421542
[doc] rustc 1 <host> -> standalone 2 <target1>
15431543
[doc] rustc 1 <host> -> std 1 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
15441544
[build] llvm <target1>

0 commit comments

Comments
 (0)