I realized that the logic here was more complicated than it needed to be. With
`js_run_binary`, we're running a JavaScript tool that often operates on
JavaScript sources, so it makes sense that we need to think which inputs are
built for the exec platform and which ones are built for the target platform.
But `js_run_devserver` is different, because the `tool` we are working with is
not intended to run as part of a build action. All we are doing is packaging up
the tool in a launcher script so that it can be executed with `bazel run`.
Therefore, `tool` should always be built for the target platform and never for
the exec platform.
This simplifies things, because it makes it so that `use_execroot_entry_point`
is just a relatively small runtime behavior change rather than something that
totally changes what platform we are building for.
Since `bazel run` does not use a sandbox, all the inputs end up present both in
the runfiles directory and directly in the execroot, and basically all that
`use_execroot_entry_point` does is determine which of those two places we use
as the entry point.
I realized that the logic here was more complicated than it needed to be. With
js_run_binary, we're running a JavaScript tool that often operates on JavaScript sources, so it makes sense that we need to think which inputs are built for the exec platform and which ones are built for the target platform.But
js_run_devserveris different, because thetoolwe are working with is not intended to run as part of a build action. All we are doing is packaging up the tool in a launcher script so that it can be executed withbazel run. Therefore,toolshould always be built for the target platform and never for the exec platform.This simplifies things, because it makes it so that
use_execroot_entry_pointis just a relatively small runtime behavior change rather than something that totally changes what platform we are building for.Since
bazel rundoes not use a sandbox, all the inputs end up present both in the runfiles directory and directly in the execroot, and basically all thatuse_execroot_entry_pointdoes now is determine which of those two places we use as the entry point.Changes are visible to end-users: yes, but I doubt that anyone will notice
We now always build all sources for the target platform in
js_run_devserver, regardless ofuse_execroot_entry_point.Test plan