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
{{ message }}
Repository navigation
Windows, native launcher: sh_binary missing data dependencies #3839
Description of the problem / feature request / question:
When using the native launcher, sh_binary rules miss their data dependencies.
If possible, provide a minimal example to reproduce the problem:
C:\work\bazel> bazel build //examples/shell:bin
(...)
C:\work\bazel> bazel-bin\examples\shell\bin.exe
C:/work/bazel/examples/shell/bin.sh: line 23: C:/work/bazel/examples/shell/bin.sh.runfiles/io_bazel/examples/shell/lib.sh: No such file or directory
Environment info
Operating System:
Windows 10
Bazel version (output of bazel info release):
0.6.0
One possible fix is to define and use rlocation in the shell script. Another is for the launcher to source a script that defines rlocation, then run the main script. I have a pending change for the latter.
This bug directly influences the usability of sh_* rules on Windows.
I'd like Bazel to treat shell scripts as just another language like Python, and to require Bash only if the targets depend on sh_* rules.
I'm making this P3 for now, because I believe other languages are more important on Windows and the practical limitation with a sub-par support for sh_* rules is that we can't use them to implement build-aiding tools as easily as we can on Linux.
Activity
laszlocsomor commentedon Oct 5, 2017
Never mind, this is not a bug in the launcher, but in the example. I'll send a fix.
laszlocsomor commentedon Oct 6, 2017
One possible fix is to define and use
rlocationin the shell script. Another is for the launcher to source a script that definesrlocation, then run the main script. I have a pending change for the latter.laszlocsomor commentedon Dec 13, 2017
This bug directly influences the usability of
sh_*rules on Windows.I'd like Bazel to treat shell scripts as just another language like Python, and to require Bash only if the targets depend on
sh_*rules.I'm making this P3 for now, because I believe other languages are more important on Windows and the practical limitation with a sub-par support for
sh_*rules is that we can't use them to implement build-aiding tools as easily as we can on Linux.java,runfiles: add Java library to handle runfiles
Windows,examples: //examples/shell now works
Windows,examples: //examples/shell now works
Windows,examples: //examples/shell now works
Windows,examples: //examples/shell now works