Skip to content

Commit ee09dc5

Browse files
jyn514fasterthanlime
authored andcommitted
Small fixups
- use `path` instead of `paths` - don't mark rust-analyzer as an optional tool - print the cargo command that's run in the proc-macro-test build script this originally was part of a change to fix `test --stage 0 rust-analyzer`, but I'm going to leave that for a separate PR so it's easier to review.
1 parent e0add21 commit ee09dc5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/bootstrap/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl Step for RustAnalyzer {
312312
const DEFAULT: bool = true;
313313

314314
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
315-
run.paths(&["src/tools/rust-analyzer"])
315+
run.path("src/tools/rust-analyzer")
316316
}
317317

318318
fn make_run(run: RunConfig<'_>) {

src/bootstrap/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ impl Step for RustAnalyzer {
721721
mode: Mode::ToolStd,
722722
path: "src/tools/rust-analyzer",
723723
extra_features: vec!["rust-analyzer/in-rust-tree".to_owned()],
724-
is_optional_tool: true,
724+
is_optional_tool: false,
725725
source_type: SourceType::InTree,
726726
})
727727
}

src/tools/rust-analyzer/crates/proc-macro-test/build.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,19 @@ fn main() {
6262
Command::new(toolchain::cargo())
6363
};
6464

65-
let output = cmd
65+
cmd
6666
.current_dir(&staging_dir)
6767
.args(&["build", "-p", "proc-macro-test-impl", "--message-format", "json"])
6868
// Explicit override the target directory to avoid using the same one which the parent
6969
// cargo is using, or we'll deadlock.
7070
// This can happen when `CARGO_TARGET_DIR` is set or global config forces all cargo
7171
// instance to use the same target directory.
7272
.arg("--target-dir")
73-
.arg(&target_dir)
74-
.output()
75-
.unwrap();
73+
.arg(&target_dir);
74+
75+
println!("Running {:?}", cmd);
76+
77+
let output = cmd.output().unwrap();
7678
if !output.status.success() {
7779
println!("proc-macro-test-impl failed to build");
7880
println!("============ stdout ============");

0 commit comments

Comments
 (0)