Skip to content

Commit bfcb290

Browse files
nrcalexcrichton
authored andcommitted
Add RLS and Rustfmt to the toolstate mechanism
1 parent c0ea270 commit bfcb290

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

src/bootstrap/check.rs

Lines changed: 10 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ impl Step for Rls {
454454
tool: "rls",
455455
mode: Mode::Librustc,
456456
path: "src/tools/rls",
457-
expectation: BuildExpectation::None,
457+
expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
458458
})
459459
}
460460
}
@@ -489,7 +489,7 @@ impl Step for Rustfmt {
489489
tool: "rustfmt",
490490
mode: Mode::Librustc,
491491
path: "src/tools/rustfmt",
492-
expectation: BuildExpectation::None,
492+
expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
493493
})
494494
}
495495
}

src/bootstrap/toolstate.rs

Lines changed: 2 additions & 0 deletions
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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ miri = "Broken"
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)