Skip to content

Commit 74b683d

Browse files
authored
Unrolled build for #152196
Rollup merge of #152196 - jyn514:remove-paths, r=Zalathar bootstrap: Remove `ShouldRun::paths` Split out from #151930. I've copied my comment in #151930 (comment) into the commit description. r? @Zalathar cc @Mark-Simulacrum @Kobzol --- Some history about `paths()`. The original intent @Mark-Simulacrum had when he introduced PathSet in f104b12, to my knowledge, was that multiple paths could be aliases for the same step. That's what rustdoc is doing; both paths for rustdoc run exactly the same Step, regardless of whether one or both are present. That never really caught on. To my knowledge, rustdoc is the only usage of paths() there's ever been. Later, in #95503, I repurposed PathSet to mean "each crate in this set should be passed to Step::make_run in RunConfig". That was not the previous meaning. Rustdoc never looks at run.paths in make_run, so it's safe to just treat it as an alias, like elsewhere in bootstrap. Same for all the other tool steps.
2 parents 55bfca7 + 0436efe commit 74b683d

12 files changed

Lines changed: 32 additions & 42 deletions

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ macro_rules! tool_check_step {
706706
const IS_HOST: bool = true;
707707

708708
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
709-
run.paths(&[ $path, $( $alt_path ),* ])
709+
run.path($path) $( .path( $alt_path ) )*
710710
}
711711

712712
fn is_default_step(_builder: &Builder<'_>) -> bool {

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@ impl Step for CrateRustdoc {
31563156
const IS_HOST: bool = true;
31573157

31583158
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3159-
run.paths(&["src/librustdoc", "src/tools/rustdoc"])
3159+
run.path("src/librustdoc").path("src/tools/rustdoc")
31603160
}
31613161

31623162
fn is_default_step(_builder: &Builder<'_>) -> bool {
@@ -3817,7 +3817,7 @@ impl Step for CodegenCranelift {
38173817
const IS_HOST: bool = true;
38183818

38193819
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3820-
run.paths(&["compiler/rustc_codegen_cranelift"])
3820+
run.path("compiler/rustc_codegen_cranelift")
38213821
}
38223822

38233823
fn is_default_step(_builder: &Builder<'_>) -> bool {
@@ -3938,7 +3938,7 @@ impl Step for CodegenGCC {
39383938
const IS_HOST: bool = true;
39393939

39403940
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3941-
run.paths(&["compiler/rustc_codegen_gcc"])
3941+
run.path("compiler/rustc_codegen_gcc")
39423942
}
39433943

39443944
fn is_default_step(_builder: &Builder<'_>) -> bool {

src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@ expression: bench
9898
- Set({bench::compiler/rustc_windows_rc})
9999
[Bench] test::CrateRustdoc
100100
targets: [x86_64-unknown-linux-gnu]
101-
- Set({bench::src/librustdoc, bench::src/tools/rustdoc})
101+
- Set({bench::src/librustdoc})
102+
- Set({bench::src/tools/rustdoc})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ expression: check
8282
- Set({check::compiler/rustc_windows_rc})
8383
[Check] check::Rustdoc
8484
targets: [x86_64-unknown-linux-gnu]
85-
- Set({check::src/librustdoc, check::src/tools/rustdoc})
85+
- Set({check::src/librustdoc})
86+
- Set({check::src/tools/rustdoc})
8687
[Check] check::CraneliftCodegenBackend
8788
targets: [x86_64-unknown-linux-gnu]
8889
- Set({check::cg_clif})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ expression: check compiletest --include-default-paths
8282
- Set({check::compiler/rustc_windows_rc})
8383
[Check] check::Rustdoc
8484
targets: [x86_64-unknown-linux-gnu]
85-
- Set({check::src/librustdoc, check::src/tools/rustdoc})
85+
- Set({check::src/librustdoc})
86+
- Set({check::src/tools/rustdoc})
8687
[Check] check::CraneliftCodegenBackend
8788
targets: [x86_64-unknown-linux-gnu]
8889
- Set({check::cg_clif})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ expression: fix
8282
- Set({fix::compiler/rustc_windows_rc})
8383
[Fix] check::Rustdoc
8484
targets: [x86_64-unknown-linux-gnu]
85-
- Set({fix::src/librustdoc, fix::src/tools/rustdoc})
85+
- Set({fix::src/librustdoc})
86+
- Set({fix::src/tools/rustdoc})
8687
[Fix] check::CraneliftCodegenBackend
8788
targets: [x86_64-unknown-linux-gnu]
8889
- Set({fix::cg_clif})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ expression: test
148148
- Set({test::compiler/rustc_windows_rc})
149149
[Test] test::CrateRustdoc
150150
targets: [x86_64-unknown-linux-gnu]
151-
- Set({test::src/librustdoc, test::src/tools/rustdoc})
151+
- Set({test::src/librustdoc})
152+
- Set({test::src/tools/rustdoc})
152153
[Test] test::CrateRustdocJsonTypes
153154
targets: [x86_64-unknown-linux-gnu]
154155
- Set({test::src/rustdoc-json-types})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc_rustdoc.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ expression: test librustdoc rustdoc
44
---
55
[Test] test::CrateRustdoc
66
targets: [x86_64-unknown-linux-gnu]
7-
- Set({test::src/librustdoc, test::src/tools/rustdoc})
7+
- Set({test::src/librustdoc})
8+
- Set({test::src/tools/rustdoc})
89
[Test] test::RustdocBook
910
targets: [x86_64-unknown-linux-gnu]
1011
- Set({test::src/doc/rustdoc})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ expression: test --skip=coverage
147147
- Set({test::compiler/rustc_windows_rc})
148148
[Test] test::CrateRustdoc
149149
targets: [x86_64-unknown-linux-gnu]
150-
- Set({test::src/librustdoc, test::src/tools/rustdoc})
150+
- Set({test::src/librustdoc})
151+
- Set({test::src/tools/rustdoc})
151152
[Test] test::CrateRustdocJsonTypes
152153
targets: [x86_64-unknown-linux-gnu]
153154
- Set({test::src/rustdoc-json-types})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ expression: test --skip=tests
112112
- Set({test::compiler/rustc_windows_rc})
113113
[Test] test::CrateRustdoc
114114
targets: [x86_64-unknown-linux-gnu]
115-
- Set({test::src/librustdoc, test::src/tools/rustdoc})
115+
- Set({test::src/librustdoc})
116+
- Set({test::src/tools/rustdoc})
116117
[Test] test::CrateRustdocJsonTypes
117118
targets: [x86_64-unknown-linux-gnu]
118119
- Set({test::src/rustdoc-json-types})

0 commit comments

Comments
 (0)