Skip to content

Commit 9b43d02

Browse files
committed
Add RLS and Rustfmt to the toolstate mechanism
1 parent 06e0b1a commit 9b43d02

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

src/bootstrap/check.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ impl Step for Rls {
254254

255255
builder.add_rustc_lib_path(compiler, &mut cargo);
256256

257-
try_run(build, &mut cargo);
257+
try_run_expecting(
258+
build,
259+
&mut cargo,
260+
builder.build.config.toolstate.rls.passes(ToolState::Testing),
261+
);
258262
}
259263
}
260264

@@ -295,7 +299,11 @@ impl Step for Rustfmt {
295299

296300
builder.add_rustc_lib_path(compiler, &mut cargo);
297301

298-
try_run(build, &mut cargo);
302+
try_run_expecting(
303+
build,
304+
&mut cargo,
305+
builder.build.config.toolstate.rustfmt.passes(ToolState::Testing),
306+
);
299307
}
300308
}
301309

src/bootstrap/tool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl Step for Rls {
449449
tool: "rls",
450450
mode: Mode::Librustc,
451451
path: "src/tools/rls",
452-
expectation: BuildExpectation::None,
452+
expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
453453
})
454454
}
455455
}
@@ -484,7 +484,7 @@ impl Step for Rustfmt {
484484
tool: "rustfmt",
485485
mode: Mode::Librustc,
486486
path: "src/tools/rustfmt",
487-
expectation: BuildExpectation::None,
487+
expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
488488
})
489489
}
490490
}

src/bootstrap/toolstate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ impl Default for ToolState {
4646
pub struct ToolStates {
4747
pub miri: ToolState,
4848
pub clippy: ToolState,
49+
pub rls: ToolState,
50+
pub rustfmt: ToolState,
4951
}

src/tools/toolstate.toml

+7
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ miri = "Testing"
2727

2828
# ping @Manishearth @llogiq @mcarton @oli-obk
2929
clippy = "Broken"
30+
31+
# ping @nrc
32+
rls = "Testing"
33+
34+
# ping @nrc
35+
rustfmt = "Testing"
36+

0 commit comments

Comments
 (0)