Skylark ctx.command doesn't incorporate runfiles from input executables; py_binary/java_binary executables fail #1192
Labels
P4
This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
type: bug
untriaged
(I forked this bug off of issue #1136, because #1136 turned out to be a mix of several bugs.)
Consider this repository https://github.com/dfabulich/cannot-find-runfiles
There's a simple python script in
build_tools/whatevah.py
that accepts one CLI argument and writes a file to that location.It's declared as a simple
py_binary
inbuild_tools/BUILD
.There's a simple Skylark rule in
build_tools/example.bzl
; theexample
rule runswhatevah
to generate a%{name}.txt
file as output, but it uses thecommand
parameter toctx.action
instead of theexecutable
parameter.Finally,
foo/BUILD
declares afoo
target with theexample
rule.When I
bazel build foo
, I expect it to succeed and generatefoo.txt
, but instead I get this error:As discussed in issue #1136, you can workaround this issue by using the
executable
parameter toctx.action
instead ofcommand
.The text was updated successfully, but these errors were encountered: