You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build_script_env annotation works, but the addition of the crate.select in build_script_data causes the following error.
File "/home/ubuntu/.bazel-output-cache/0f174b5402e5e096a67deb6762266f43/external/rules_rust/crate_universe/private/crate.bzl", line 188, column 48, in _annotation
build_script_data = _stringify_list(build_script_data),
File "/home/ubuntu/.bazel-output-cache/0f174b5402e5e096a67deb6762266f43/external/rules_rust/crate_universe/private/crate.bzl", line 230, column 29, in _stringify_list
return [str(x) for x in values]
Error: type 'struct' is not iterable
The issue seems to be here in the rules_rust codebase. The call to _stringify_list in crate.bzl breaks on a crate.build_script_data, since the result of crate.select is a struct.
Is it possible to remove or rework the invocation of _stringify_list there, so that the select struct can be passed along?
It seems like
crate.select
can't be used in a variety ofcrate.annotation
s, includingbuild_script_data
.There is this example in the rules_rust repo of using the results of a crate.select in a list for rustc_flags, it is out of date.
To reproduce:
The
build_script_env
annotation works, but the addition of thecrate.select
inbuild_script_data
causes the following error.The issue seems to be here in the rules_rust codebase. The call to
_stringify_list
incrate.bzl
breaks on acrate.build_script_data
, since the result ofcrate.select
is a struct.Is it possible to remove or rework the invocation of
_stringify_list
there, so that the select struct can be passed along?Relevant post in Bazel Slack
The text was updated successfully, but these errors were encountered: