You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Figure out why x.py test --stage 0 rust-analyzer doesn't work #99610
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 7c37621d417..0f20b74bcb4 100644
--- a/src/bootstrap/tool.rs+++ b/src/bootstrap/tool.rs@@ -250,6 +250,15 @@ pub fn prepare_tool_cargo(
}
}
+ if path.ends_with("rust-analyzer") {+ // RA wants to load proc macros at runtime for one of its tests. But by default, proc macros+ // are built with the beta proc_macro, not the in-tree proc_macro. Explicitly override this+ // in the rustc shim.+ // This is ok because rust-analyzer is `Mode::ToolStd`, so proc_macro is always built before.+ cargo.rustflag("--sysroot");+ cargo.rustflag(builder.sysroot(compiler).as_os_str().to_str().unwrap());+ }+
// 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));
Activity
jyn514 commentedon Jul 23, 2022
fix here:
will try to write this up more thoroughly soon
jyn514 commentedon Sep 19, 2022
Oh fun, this isn't possible to test unless the proc-macro ABI changed in the last release 🤦
onur-ozkan commentedon Dec 25, 2023
This no longer seems to be a problem.
Tested on HEAD: f736079
x test --stage 0 rust-analyzer:jyn514 commentedon Dec 25, 2023
you need to combine it with a breaking change to the proc macro lib format in the same release cycle.
maybe that's rare enough this isn't worth worrying about?
onur-ozkan commentedon Dec 25, 2023
Sounds similar to #119172 (comment) problem (when public api changes on compiler crates, ra fails to build).
I think so
jyn514 commentedon Dec 25, 2023
kinda, but in this case a sync will only fix it for stage 1, not for stage 0