Aliases not working rust-analyzer when rust_test for crate is defined
otiv-emiel-vanseveren opened this issue · 3 comments
When aliases are set on a rust_binary
, they work fine. But when they are also set on a rust_test
target with crate=":bin-name"
then they are not propagated correctly (no aliases in generated spec file). Resulting in no aliases according to rust_analyzer in the files of the rust_binary
I added a reproduction here. Digging a bit deeper it seems like aliases set on rust_test
are not added at all.
I would like to fix this myself. I figured out how I can use a local version of rules_rust, but running bazel run @rules_rust//tools/rust_analyzer:gen_rust_project
also generates spec files for all rust code in rules_rust, which make iterating very slow. Is there a way to limit this to my workspace?
@illicitonion friendly ping, I would really like to contribute!
@otiv-emiel-vanseveren I haven't used gen_rust_project
often, however it allows you to specify a specific target or wildcard pattern, e.g:
@rules_rust//tools/rust_analyzer:gen_rust_project -- //my_example:target
does that still result in generating spec files for the rules_rust
code?
does that still result in generating spec files for the
rules_rust
code?
Ah, silly me. That works, thanks!