Skip to content

Commit

Permalink
Add RLS and Rustfmt to the toolstate mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc authored and alexcrichton committed Sep 27, 2017
1 parent c0ea270 commit bfcb290
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/bootstrap/check.rs
Expand Up @@ -254,7 +254,11 @@ impl Step for Rls {

builder.add_rustc_lib_path(compiler, &mut cargo);

try_run(build, &mut cargo);
try_run_expecting(
build,
&mut cargo,
builder.build.config.toolstate.rls.passes(ToolState::Testing),
);
}
}

Expand Down Expand Up @@ -295,7 +299,11 @@ impl Step for Rustfmt {

builder.add_rustc_lib_path(compiler, &mut cargo);

try_run(build, &mut cargo);
try_run_expecting(
build,
&mut cargo,
builder.build.config.toolstate.rustfmt.passes(ToolState::Testing),
);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/tool.rs
Expand Up @@ -454,7 +454,7 @@ impl Step for Rls {
tool: "rls",
mode: Mode::Librustc,
path: "src/tools/rls",
expectation: BuildExpectation::None,
expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
})
}
}
Expand Down Expand Up @@ -489,7 +489,7 @@ impl Step for Rustfmt {
tool: "rustfmt",
mode: Mode::Librustc,
path: "src/tools/rustfmt",
expectation: BuildExpectation::None,
expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
})
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/toolstate.rs
Expand Up @@ -46,4 +46,6 @@ impl Default for ToolState {
pub struct ToolStates {
pub miri: ToolState,
pub clippy: ToolState,
pub rls: ToolState,
pub rustfmt: ToolState,
}
7 changes: 7 additions & 0 deletions src/tools/toolstate.toml
Expand Up @@ -27,3 +27,10 @@ miri = "Broken"

# ping @Manishearth @llogiq @mcarton @oli-obk
clippy = "Broken"

# ping @nrc
rls = "Testing"

# ping @nrc
rustfmt = "Testing"

0 comments on commit bfcb290

Please sign in to comment.