bazelbuild / bazelbuild/rules_rust

rust-project proc macro error

Open
#2,299 1 comment 2 reactions 0 assignees View on GitHub
bug needs-triage rust-analyzer
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

Not sure of the details under the hood right now.

I have a project that when I use rust-analyzer without a rust-project.json file, correctly handles proc macros.

If the *only* change I make is to generate a rust-project.json file per the rules_rust docs, I get:

```
proc macro `Parser` not expanded: Failed to get file metadata for /home/robertc/.cache/bazel/_bazel_robertc/c5f0e75839fa3d2553cd278dc66c33cc/execroot/_main/bazel-out/k8-opt-exec-ST-a57dd009456a/bin/external/crate_index__clap_derive-4.4.7/libclap_derive-1998004905.so: No such file or directory (os error 2)
proc macro `Serialize` not expanded: Failed to get file metadata for /home/robertc/.cache/bazel/_bazel_robertc/c5f0e75839fa3d2553cd278dc66c33cc/execroot/_main/bazel-out/k8-opt-exec-ST-a57dd009456a/bin/external/crate_index__serde_derive-1.0.193/libserde_derive-3101248512.so: No such file or directory (os error 2)
```

And indeed, those files don't exist.

I've tried disabling our remote build support, and that had no impact, so doesn't seem to be a failure to copy the artifact down.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.