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
incompatible_windows_bashless_run_command: enables Bash-less "bazel run" on Windows #8240
The option --incompatible_windows_bashless_run_command enables Bash-less "bazel run" on Windows. This flag has NO effect on other platforms.
When disabled, bazel run //:foo_bin runs the binary through Bash, and fails with --shell_executable="". Bazel will:
escape and join the arguments with Bash escaping semantics
run the binary through Bash with bash -c <joined_args>
When enabled, bazel run //:foo_bin does not require Bash and works with --shell_executable="". Bazel runs the binary directly (instead of through bash -c), and escapes the arguments Windows-style (the same as enabled by #7454). But Bash is still required when using --run_under=foo or --script_path=<path>, even when --incompatible_windows_bashless_run_command is enabled.
Migration recipe
None, as of 2019-05-06.
We don't expect any breakages when this flag is enabled. However if it breaks your build, please let us know so we can help fixing it and provide a migration recipe.
Rollout plan
Bazel 0.26.0 will not support this flag.
Bazel 0.27.0 is expected to support this flag, with default value being false.
Bazel 0.28.0 is expected to support this flag, with default value being true.
Bazel 0.29.0 is expected to not support this flag.
changed the title [-]incompatible_bashless_run_command: enables Bash-less "bazel run" on Windows[/-][+]incompatible_windows_bashless_run_command: enables Bash-less "bazel run" on Windows[/+]on May 8, 2019
This flag is only available with run and not with build, but bazelisk is not aware of the distinction between the different bazel commands, and will test all migration flags.
Activity
Windows: add --incompatible_bashless_run_command
Windows: add --incompatible_bashless_run_command
[-]incompatible_bashless_run_command: enables Bash-less "bazel run" on Windows[/-][+]incompatible_windows_bashless_run_command: enables Bash-less "bazel run" on Windows[/+]bazel run: no longer requires Bash for simple case
Windows, bazel run: fix a bug in PR bazelbuild#8241
Windows, bazel run: don't join all args into argv0
Windows, bazel run: don't join all args into argv0
1 remaining item
laszlocsomor commentedon Jul 3, 2019
@keith : I'm curious, why does it seem so? The flag exists in 0.27.0 -- search for
incompatible_windows_bashless_run_commandinsrc/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.javainside of https://github.com/bazelbuild/bazel/releases/download/0.27.1/bazel-0.27.1-dist.zip.siddharthab commentedon Jul 3, 2019
This flag is only available with
runand not withbuild, but bazelisk is not aware of the distinction between the different bazel commands, and will test all migration flags.laszlocsomor commentedon Jul 3, 2019
Aah, thanks!
keith commentedon Jul 3, 2019
laszlocsomor commentedon Jul 9, 2019
Current status: every Bazel CI downstream project except rules_cc pass with this flag flipped.
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1077#cd67234a-7298-4cb8-96d0-9f06c8ab412a. The other failing project (buildfarm) seems to be unrelated.
Using the same binary the CI used (https://buildkite.com/organizations/bazel/pipelines/bazel-at-head-plus-downstream/builds/1077/jobs/b8e6756c-fad0-4ef6-955c-6bca217137f7/artifacts/1d1a1a17-0818-43f8-818d-b5c7a39bac8b), testing rules_cc works on my machine.
laszlocsomor commentedon Aug 6, 2019
Blockers:
laszlocsomor commentedon Aug 6, 2019
Update: the test breakage is legitimate. It indicates an escaping bug in Bazel. I have a bugfix in https://github.com/laszlocsomor/bazel/tree/fix-GOOD-bashless-run-caller-escapes that I need to clean up before sending out.
Windows: fix "bazel run" argument quoting
drigz commentedon Sep 23, 2019
Does windows.md need updating? It says:
laszlocsomor commentedon Sep 23, 2019
Only after Bazel 1.0.0 came out -- it will flip
--incompatible_windows_bashless_run_commandto true by default.incompatible_windows_bashless_run_command: remove
Flip --incompatible_windows_bashless_run_command