bazelbuild / bazelbuild/rules_rust
Declare targets listed in the `build_data` attribute of the `cargo_build_script` rule as prerequisites
Open
cargo
needs-triage
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Here's the relevant code:
```
cargo_build_script(
name = ["my-rule"],
srcs = ["build.rs"],
build_data = ["//targets:my-target"],
build_script_env = {
"TARGET": "$(rootpath //targets:my-target)",
},
)
```
When I compile, I get the following error:
`<...> in cargo_build_script rule //src:my-rule: label '//targets:my-target' in $(location) expression is not a declared prerequisite of this rule`
I'm on version 0.40.0
Contributor guide
Assessment
This issue has not been assessed yet.