Replies: 1 comment
-
Have you seen |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently I wanted to move the body of a very complex
genrule
to a bash script wrapped in ansh_binary
used by thatgenrule
, so that I could have a simpleBUILD
. What I clashed with is how the runfiles library actually works with respect to genrules.In genrule, you use
$(execpath @repo//a/bazel/label)
. The equivalent within the bash script using runfiles is$(rlocation some/obscure/path/to/what/the/label/stands/for)
. This poses several challenges:Wouldn't it be cool if the mapping from bazel labels to data files was added to the runfiles manifest, so that one could write in the bash script (or whatever else using a runfiles library)
$(rlocation @repo//a/bazel/label)
just like in a genrule? There would be the case of labels unwrapping to multiple or no files, but that should be treated as an error just like in genrules. Providingrlocations
in bash might be delicate because of separation of items in case spaces are in the files, but I'm sure there would be solutions to that.Beta Was this translation helpful? Give feedback.
All reactions