Skip to content

incompatible_windows_style_arg_escaping: enables correct subprocess argument escaping on Windows #7454

Closed

Description

@laszlocsomor

Description

The option --incompatible_windows_style_arg_escaping enables correct subprocess argument escaping on Windows. This flag has NO effect on other platforms.

When enabled, WindowsSubprocessFactory will use ShellUtils.windowsEscapeArg to escape command line arguments. This is correct, as verified by tests.

When disabled, WindowsSubprocessFactory will use ShellUtils.quoteCommandLine. This is buggy, as shown by #7122.

Migration recipe

None, as of 2019-02-18.

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.23.0 will not support this flag.
  • Bazel 0.24.0 is expected to support this flag, with default value being false.
  • Bazel 0.25.0 is expected to flip this flag to true.

Activity

  1. self-assigned this
    on Feb 18, 2019
  2. added
    area-Windows
    on Feb 28, 2019
  3. dkelmer commented on Apr 3, 2019

    @dkelmer
    Contributor

    Fixed by laszlocsomor@363016e. Closing issue.

  4. laszlocsomor commented on Apr 4, 2019

    @laszlocsomor
    ContributorAuthor

    No, laszlocsomor@363016e was not merged! This flag is not a breaking change in 0.25

  5. 12 remaining items

  6. brandjon commented on May 13, 2019

    @brandjon
    Member

    This flag is marked as migration-0.25, causing it to be run by the bazelisk incompatible change pipeline. But this flag is not available (at least under linux), causing the build to fail.

  7. laszlocsomor commented on May 14, 2019

    @laszlocsomor
    ContributorAuthor

    We can remove the migration tag; the flag is now flipped (but not yet removed).

    This flag is a startup flag, which Bazelisk cannot handle.
    I don't see any failure in the log you linked, can you check the link again?

  8. brandjon commented on May 14, 2019

    @brandjon
    Member

    The link goes to line 1958 of the Subpar build on 14.04 (OpenJDK 8). Copy/pasting the section:

    Running Bazel with --incompatible_windows_style_arg_escaping | 0s
    -- | --
      |  
      | bazel test --flaky_test_attempts=3 --build_tests_only --local_test_jobs=12 --show_progress_rate_limit=5 --curses=yes --color=yes --verbose_failures --keep_going --jobs=32 --announce_rc --experimental_multi_threaded_digest --experimental_repository_cache_hardlinks --disk_cache= --sandbox_tmpfs_path=/tmp --experimental_build_event_json_file_path_conversion=false --build_event_json_file=/tmp/tmp117gcv3x/test_bep.json --remote_timeout=60 --remote_max_connections=200 --remote_http_cache=https://storage.googleapis.com/bazel-untrusted-buildkite-cache/e0979f59aee862bb5636c07921415ff395dc7b7a24c297265429c5fae66e56f6 --google_default_credentials --test_env=HOME --sandbox_writable_path=/home/bazel/.cache/bazelisk ... --incompatible_windows_style_arg_escaping
      | ERROR: Unrecognized option: --incompatible_windows_style_arg_escaping
      | INFO: Invocation ID: 8c007530-88e6-423f-b651-02fe88d5071c
    

    Bazelisk being unable to handle startup options is a good reason for this to fail the pipeline. I'll ignore.

  9. siddharthab commented on May 15, 2019

    @siddharthab
    Contributor

    Maybe we should label issues for startup flags such that bazelisk can exclude issues with the label.

  10. keith commented on May 17, 2019

    @keith
    Member

    @laurentlb can you fix the labels here for bazelisk, with 0.25.2 this fails because the flag isn't recognized

  11. laurentlb commented on May 18, 2019

    @laurentlb
    Contributor

    removed

  12. added a commit that references this issue on May 28, 2019
  13. added a commit that references this issue on Jun 3, 2019
  14. added a commit that references this issue on Jun 18, 2019
  15. added
    team-OSS
    on Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Windowsincompatible-changeteam-OSS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions