Test explorer forces rebuild of procedural macros #17121
Labels
A-test-explorer
Issues related to the test explorer lsp extension and vscode test api
C-bug
Category: bug
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
0.3.1924-standalone (5dbe3fe 2024-04-14)
rustc version: (eg. output of
rustc -V
)rustc 1.77.1 (7cf61ebde 2024-03-27)
editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
VSCode, v0.3.1924
When a crate uses procedural macros, the new Test Explorer seems to disagree with
cargo
in my terminal about what needs to be recompiled. It's as if they are using different build settings (e.g.RUSTFLAGS
).Specifically, if I alternate
cargo test
and the 'Run Tests' button in the Test Explorer UI, then they takes turns rebuilding the procedural macrosI don't have any value for the
RUSTFLAGS
environment variable (or any other setting that I know of that might influence build cache invalidation). Furthermore, this issue doesn't seem to occur when the project doesn't use procedural macros.Also, I can reproduce this issue with the first version of RA that had the Test Explorer.
Reproducible example: https://github.com/zaneduffield/ra-proc-macro-rebuild-issue
The text was updated successfully, but these errors were encountered: