Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ pub fn prepare_tool_cargo(
}
}

// cargo doesn't set this env var yet, but it's needed by expect-test
// to build correct absolute paths for test_data files
cargo.env("CARGO_WORKSPACE_DIR", &dir);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a non-standard thing, maybe we should only set that in test::RustAnalyzer? And even if it becomes standard, other crates in the tree might actually want the overall rust workspace root.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great point, that's an easy change to make — I'll do that for the final PR


// clippy tests need to know about the stage sysroot. Set them consistently while building to
// avoid rebuilding when running tests.
cargo.env("SYSROOT", builder.sysroot(compiler));
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer