Skip to content

Commit 45cc461

Browse files
Rollup merge of #122081 - onur-ozkan:validate-path-remaps, r=clubby789
validate `builder::PATH_REMAP` self-explanatory r? clubby789
2 parents 947d960 + ea22e78 commit 45cc461

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/bootstrap/src/core/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ impl PathSet {
291291
const PATH_REMAP: &[(&str, &[&str])] = &[
292292
// config.toml uses `rust-analyzer-proc-macro-srv`, but the
293293
// actual path is `proc-macro-srv-cli`
294-
("rust-analyzer-proc-macro-srv", &["proc-macro-srv-cli"]),
294+
("rust-analyzer-proc-macro-srv", &["src/tools/rust-analyzer/crates/proc-macro-srv-cli"]),
295295
// Make `x test tests` function the same as `x t tests/*`
296296
(
297297
"tests",

src/bootstrap/src/core/builder/tests.rs

+13
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ fn test_intersection() {
115115
assert_eq!(command_paths, vec![Path::new("library/stdarch")]);
116116
}
117117

118+
#[test]
119+
fn validate_path_remap() {
120+
let build = Build::new(configure("test", &["A"], &["A"]));
121+
122+
PATH_REMAP
123+
.iter()
124+
.flat_map(|(_, paths)| paths.iter())
125+
.map(|path| build.src.join(path))
126+
.for_each(|path| {
127+
assert!(path.exists(), "{} should exist.", path.display());
128+
});
129+
}
130+
118131
#[test]
119132
fn test_exclude() {
120133
let mut config = configure("test", &["A"], &["A"]);

0 commit comments

Comments
 (0)