bazelbuild / rules_rust

Rust rules for Bazel
https://bazelbuild.github.io/rules_rust/
Apache License 2.0
661 stars 426 forks source link

gen_rust_project not downloading/generating a .so file #2733

Open rbtcollins opened 3 months ago

rbtcollins commented 3 months ago

image

There is a crate-spec file present in the dir:

ls ~/.cache/bazel/_bazel_robertc/8b0aece0fa823e87b78e3a123965ccb1/execroot/_main/bazel-out/linux_amd64-opt-exec-ST-b021421c07d4/bin/external/_main~crate_repositories~crates_vendor__extend-1.2.0/
extend.rust_analyzer_crate_spec.json

but nothing else...

The spec file refers to the .so file:

 "proc_macro_dylib_path": "__EXEC_ROOT__/bazel-out/linux_amd64-opt-exec-ST-b021421c07d4/bin/external/_main~crate_repositories~crates_vendor__extend-1.2.0/libextend-2251390687.so",

Doing a bazel clean + gen_rust_project with different --remote_download_outputs= options doesn't affect the presence of the .so.

rbtcollins commented 3 months ago

Doing a 'bazel build' of the crates with --remote_download_outputs=all does seem to bring down the relevant files - sometimes. Its not clear to me why a regular build corrects this, nor why it is nondeterministic.