Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

//tools/rust_analyzer:gen_rust_project does not build all required targets #3170

Open
martingms opened this issue Jan 8, 2025 · 0 comments

Comments

@martingms
Copy link

When using bazel's --disk_cache (and possibly in other remote cache situations?) gen_rust_project can generate rust-project.json files that contains paths in "proc_macro_dylib_path" that are invalid at the time of generation.

One easy to reproduce example as long as cargo crates with proc-macros are used in the project: Enable --disk_cache, run a full build to populate the cache, bazel clean, run a new full build for good measure, run //tools/rust_analyzer:gen_rust_project.
"proc_macro_dylib_path" for e.g. clap_derive will now be something like. /home/<...>/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust++crate+crates__clap_derive-4.5.18/libclap_derive-2275298359.so which has not been rebuilt and therefore does not exist.

I've not found a way to force it to be built manually either in this case, where I depend on the clap_derive crate transitively, so it's not available at @crates//:clap_derive or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant