rules_rust
rules_rust copied to clipboard
Unable to pass apparent repo labels to `crate.annotation` attributes
Take for example this annotation:
crate.annotation(
crate = "pyo3-build-config",
build_script_data = [
"@python_3_11//:files",
"@python_3_11//:python3",
],
build_script_env = {
"PYO3_PYTHON": "$(execpath @python_3_11//:python3)",
},
)
This annotation fails because @python_3_11
isn't visible to the rules_rust repo (although it is visible to the root repo). One might expect that build_script_data
is a label_list
, and that Bazel would automatically handle apparent-to-canonical repo name conversion when passing a label. But it's actually a string_list.
The only work around I've found so far is to hard-code canonical labels which isn't ideal. If build_script_data
must be a string_list
, maybe there could be a separate build_script_data_labels
attribute?