Description of the problem / feature request:
On Windows only, when using --run_under with an argument that's a binary rule in the workspace (as opposed to some binary from PATH), the binary rule you're actually running with bazel run sees the run under rule's runfiles manifest and not its own.
Of course that manifest doesn't have much of anything in it and so rlocation of an actual data dep of the binary rule fails. It works fine on Mac and Linux.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/gmishkin/run_under_runfiles
bazel run //:printer
On Linux, it works fine. You see the contents of the data file from the "printer" rule and the "timer" run_under script prints the time it took.
On Windows it fails with cat: '': No such file or directory but you see the timer results from run_under. If you comment out the --run_under line in the .bazelrc you do see the contents of the data file, but not the elapsed time.
What operating system are you running Bazel on?
Windows 10 version 1909
What's the output of bazel info release?
release 2.0.0
Have you found anything relevant by searching the web?
Some stuff about runfiles on Windows but nothing about interaction with --run_under.
Any other information, logs, or outputs that you want to share?
I'm using --enable_runfiles=yes on Windows but removing that has no effect one way or another.
Description of the problem / feature request:
On Windows only, when using
--run_underwith an argument that's a binary rule in the workspace (as opposed to some binary from PATH), the binary rule you're actually running withbazel runsees the run under rule's runfiles manifest and not its own.Of course that manifest doesn't have much of anything in it and so rlocation of an actual data dep of the binary rule fails. It works fine on Mac and Linux.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/gmishkin/run_under_runfiles
bazel run //:printerOn Linux, it works fine. You see the contents of the data file from the "printer" rule and the "timer" run_under script prints the time it took.
On Windows it fails with
cat: '': No such file or directorybut you see the timer results from run_under. If you comment out the--run_underline in the .bazelrc you do see the contents of the data file, but not the elapsed time.What operating system are you running Bazel on?
Windows 10 version 1909
What's the output of
bazel info release?release 2.0.0
Have you found anything relevant by searching the web?
Some stuff about runfiles on Windows but nothing about interaction with
--run_under.Any other information, logs, or outputs that you want to share?
I'm using
--enable_runfiles=yeson Windows but removing that has no effect one way or another.