Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible_windows_style_arg_escaping: enables correct subprocess argument escaping on Windows #7454

Closed
laszlocsomor opened this issue Feb 18, 2019 · 11 comments
Assignees
Labels
area-Windows Windows-specific issues and feature requests incompatible-change Incompatible/breaking change team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website

Comments

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Feb 18, 2019

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.
@laszlocsomor laszlocsomor self-assigned this Feb 18, 2019
bazel-io pushed a commit that referenced this issue Feb 19, 2019
Add the --incompatible_windows_style_arg_escaping
flag (default: false). This flag has no effect on
platforms other than Windows.

Semantics:
- When true: subprocess arguments are escaped with
  ShellUtils.windowsEscapeArg. This is the correct
  behavior.
- When false: subprocess arguments are escaped
  with ShellUtils.quoteCommandLine. This is the
  default behavior on all platforms, but it is
  incorrect on Windows.

Incompatible flag: #7454

Related: #7122

RELNOTES[NEW]: Added --incompatible_windows_style_arg_escaping flag: enables correct subprocess argument escaping on Windows. (No-op on other platforms.)

PiperOrigin-RevId: 234581069
@laszlocsomor laszlocsomor added the area-Windows Windows-specific issues and feature requests label Feb 28, 2019
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Mar 6, 2019
Fixes: bazelbuild#7454

RELNOTES[INC]: Flip --incompatible_windows_style_arg_escaping to true.  See bazelbuild#7454
@dkelmer
Copy link
Contributor

dkelmer commented Apr 3, 2019

Fixed by laszlocsomor@363016e. Closing issue.

@dkelmer dkelmer closed this as completed Apr 3, 2019
@laszlocsomor
Copy link
Contributor Author

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

@laszlocsomor laszlocsomor reopened this Apr 4, 2019
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Apr 5, 2019
--incompatible_windows_style_arg_escaping will no
longer break this test.

see bazelbuild#7454
@dkelmer
Copy link
Contributor

dkelmer commented Apr 5, 2019

Sorry about that, thanks for updating the labels

@dkelmer
Copy link
Contributor

dkelmer commented Apr 5, 2019

I re-added breaking change 26 because that will put this bug in the queue for the next release manager to check up on it. No pressure if it doesn't get flipped, the protocol is to extend the window in that case. But I think if it doesn't have a breaking change label it will fall through the cracks eventually.

@laszlocsomor
Copy link
Contributor Author

Good to know. Thank you!

laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Apr 5, 2019
--incompatible_windows_style_arg_escaping will no
longer break this test.

see bazelbuild#7454
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Apr 8, 2019
--incompatible_windows_style_arg_escaping will no
longer break this test.

see bazelbuild#7454
bazel-io pushed a commit that referenced this issue Apr 8, 2019
--incompatible_windows_style_arg_escaping will no
longer break this test.

see #7454

Closes #7968.

PiperOrigin-RevId: 242459218
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Apr 11, 2019
In this PR:

- Removed the
  `--incompatible_windows_style_arg_escaping` flag
  and all code for its "false" case.  The flag is
  flipped to true.

- In WindowsProcessesTest, the
  testDoesNotQuoteArgWithDoubleQuote method is
  replaced by testQuotesArgWithDoubleQuote, i.e.
  the test logic is reversed. The new test shows
  the correct behavior, the old test was wrong.

See bazelbuild#7122
See bazelbuild#7454

RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Apr 18, 2019
In this PR:

- Removed the
  `--incompatible_windows_style_arg_escaping` flag
  and all code for its "false" case.  The flag is
  flipped to true.

- In WindowsProcessesTest, the
  testDoesNotQuoteArgWithDoubleQuote method is
  replaced by testQuotesArgWithDoubleQuote, i.e.
  the test logic is reversed. The new test shows
  the correct behavior, the old test was wrong.

See bazelbuild#7122
See bazelbuild#7454

RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.
@brandjon
Copy link
Member

brandjon commented May 13, 2019

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.

@laszlocsomor
Copy link
Contributor Author

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?

@brandjon
Copy link
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.

@siddharthab
Copy link
Contributor

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

@keith
Copy link
Member

keith commented May 17, 2019

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

@laurentlb
Copy link
Contributor

removed

pull bot pushed a commit to Pandinosaurus/bazel that referenced this issue May 28, 2019
Baseline: daa8ae5

Cherry picks:

   + 61c7ffa:
     Automated rollback of commit
     87388e2.
   + 898d7b6:
     Add test for repository overrides, conflicting with managed
     directories being added when Bazel server is already started.
   + c2001a4:
     Automated rollback of commit
     bbe47a1.
   + e67c961:
     Fix a non-determinism in create_embedded_tools.py.
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + 597e289:
     remote: made CombinedCache a composition of Disk and Http Cache
   + 942f7cf:
     C++: Fixes bug in C++ API with external repo aspects
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 9835cb4:
     Automated rollback of commit
     844e4e2.
   + c963ba2:
     Windows, Python: fix arg. esc. also in host config
   + a1ea487:
     Do not pre-cache changed files under managed directories
   + 7dc78cd:
     Add explicit execution and target constraints for autodiscovered
     cc t?
   + dd9ac13:
     Fix a bug when a relative path is used for the execution log
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr
   + 7f49531:
     Fix the autodetecting Python toolchain on Mac
   + ddce723:
     Avoid exporting PATH unnecessarily
   + 35dd05a:
     Allow Starlark rules to be able to use the `exec_compatible_with`

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    bazelbuild#7486
  - Flip --incompatible_windows_style_arg_escaping to true.  See
    bazelbuild#7454
  - --incompatible_windows_escape_jvm_flags is enabled by default,
    and the flag no longer exists
  - `--incompatible_no_output_attr_default` is enabled by default.
  - --incompatible_depset_union is enabled by default.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See
    [bazelbuild#7899](bazelbuild#7899) for
    information on declaring Python toolchains and migrating your
    code. As a side-benefit, this addresses bazelbuild#4815 (incorrect
    interpreter version used) on non-Windows platforms. You can
    temporarily opt out of this change with
    `--incompatible_use_python_toolchains=false`.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See bazelbuild#7899 for information on declaring Python
    toolchains and migrating your code. As a side-benefit, this
    addresses bazelbuild#4815 (incorrect interpreter version used) on
    non-Windows platforms. You can temporarily opt out of this change
    with `--incompatible_use_python_toolchains=false`.

New features:

  - Windows, Python: the --incompatible_windows_escape_python_args
    flag (false by default) builds py_binary and py_test targets with
    correct command line argument escaping.
  - cquery supports --output=build

Important changes:

  - Allow debugging C++ features logic.
  - The --ios_multi_cpus, --watchos_cpus, --macos_cpus and tvos_cpus
    are now additive. This means that you can now split the
    --ios_multi_cpus=arm64,armv7 into --ios_multi_cpus=arm64 and
    --ios_multi_cpus=armv7.
  - Generated Go protobufs now depend on
    //net/proto2/go:proto_gendeps instead of //net/proto2/go:proto
  - Add new options --cs_fdo_instrument and --cs_profile to support
    LLVM's context-sensitive FDO (CSFDO).
  - Bazel C++ compile/link Starlark API. Can be used with
    experimental flag
    --experimental_cc_skylark_api_enabled_packages=<package_path>,<pac
    kage_path2>.
  - `cc_toolchain.static_runtime_lib` and
    `cc_toolchain.dynamic_runtime_lib` are now exposed to Starlark.
  - New flag `--incompatible_no_kwargs_in_build_files`. See
    bazelbuild#8021
  - struct.to_proto() converts dict into proto3 text message (map<,>).
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Flag `--incompatible_static_name_resolution_in_build_files` is
    added. See bazelbuild#8022
  - Add --incompatible_objc_framework_cleanup to control whether to
    enable some objc framework cleanup that changes the API.
    Specifically, the cleanup changes the objc provider API
    pertaining to frameworks.  This change is expected to be
    transparent to most users unless they write their own Starlark
    rules to handle frameworks.  See
    bazelbuild#7594 for details.
  - Added --incompatible_remove_binary_profile to disable the old
    binary
    profiles. Instead use the JSON profile format:
    https://docs.bazel.build/versions/master/skylark/performance.html#
    json-profile
  - Introducing --execution_log_binary_file and
    --execution_log_json_file that output a stable sorted execution
    log. They will offer a stable replacement to
    --experimental_execution_log_file.
  - Flag `--incompatible_disallow_old_octal_notation` is added. See
    //github.com/bazelbuild/issues/8059
  - Removes the
    --incompatible_disable_genrule_cc_toolchain_dependency flag.
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Incompatible flag
    `--incompatible_make_thinlto_command_lines_standalone` has been
    added. See bazelbuild#6791 for
    details.
  - objc_library does not support resource attributes any more.
    Please read bazelbuild#7594 for more info.
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.
  - New platform_mappings ability to allow gradual flag to
    platforms/toolchains migration. See also
    bazelbuild#6426
  - Added support for compiling against fully qualified R classes
    from aar_import dependencies.
  - --tls_enabled flag is deprecated. Please provide 'grpcs' as a
    scheme in the URLs if TLS should be used for a remote connection.
  - Adds
    incompatible_disallow_rule_execution_platform_constraints_allowed,
     which
    disallows the use of the "execution_platform_constraints_allowed"
    attribute when defining new rules.
  - Flag `--incompatible_restrict_named_params` is added. See
    bazelbuild#8147 for details.
  - The glob function has a new argument `allow_empty`. When set to
    False, the glob fails when it doesn't match anything.
  - Adds the "disable_whole_archive_for_static_lib" feature to allow
    turning off legacy_whole_archive for individual targets.
  - C++ Starlark API for compilation and linking is no longer
    whitelisted
  - Update visibility advice in build-style
  - --incompatible_disable_objc_provider_resources is now enabled by
    default.
  - Fixed an issue where some `py_runtime`s were incompatible with
    using `--build_python_zip` (bazelbuild#5104).
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.

This release contains contributions from many people at Google, as well as Benjamin Peterson, Brian Topping, clyang82, Dave Lee, George Gensure, Greg Estren, Greg, Guro Bokum, Keith Smiley, Max Vorobev, Michael Hackner, Robert Brown, Robert Sayre, Ryan Beasley, Yannic.
aehlig pushed a commit that referenced this issue Jun 3, 2019
Baseline: daa8ae5

Cherry picks:

   + 61c7ffa:
     Automated rollback of commit
     87388e2.
   + 898d7b6:
     Add test for repository overrides, conflicting with managed
     directories being added when Bazel server is already started.
   + c2001a4:
     Automated rollback of commit
     bbe47a1.
   + e67c961:
     Fix a non-determinism in create_embedded_tools.py.
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + 597e289:
     remote: made CombinedCache a composition of Disk and Http Cache
   + 942f7cf:
     C++: Fixes bug in C++ API with external repo aspects
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 9835cb4:
     Automated rollback of commit
     844e4e2.
   + c963ba2:
     Windows, Python: fix arg. esc. also in host config
   + a1ea487:
     Do not pre-cache changed files under managed directories
   + 7dc78cd:
     Add explicit execution and target constraints for autodiscovered
     cc t?
   + dd9ac13:
     Fix a bug when a relative path is used for the execution log
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr
   + 7f49531:
     Fix the autodetecting Python toolchain on Mac
   + ddce723:
     Avoid exporting PATH unnecessarily
   + 35dd05a:
     Allow Starlark rules to be able to use the `exec_compatible_with`

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    #7486
  - Flip --incompatible_windows_style_arg_escaping to true.  See
    #7454
  - --incompatible_windows_escape_jvm_flags is enabled by default,
    and the flag no longer exists
  - `--incompatible_no_output_attr_default` is enabled by default.
  - --incompatible_depset_union is enabled by default.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See
    [#7899](#7899) for
    information on declaring Python toolchains and migrating your
    code. As a side-benefit, this addresses #4815 (incorrect
    interpreter version used) on non-Windows platforms. You can
    temporarily opt out of this change with
    `--incompatible_use_python_toolchains=false`.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See #7899 for information on declaring Python
    toolchains and migrating your code. As a side-benefit, this
    addresses #4815 (incorrect interpreter version used) on
    non-Windows platforms. You can temporarily opt out of this change
    with `--incompatible_use_python_toolchains=false`.

New features:

  - Windows, Python: the --incompatible_windows_escape_python_args
    flag (false by default) builds py_binary and py_test targets with
    correct command line argument escaping.
  - cquery supports --output=build

Important changes:

  - Allow debugging C++ features logic.
  - The --ios_multi_cpus, --watchos_cpus, --macos_cpus and tvos_cpus
    are now additive. This means that you can now split the
    --ios_multi_cpus=arm64,armv7 into --ios_multi_cpus=arm64 and
    --ios_multi_cpus=armv7.
  - Generated Go protobufs now depend on
    //net/proto2/go:proto_gendeps instead of //net/proto2/go:proto
  - Add new options --cs_fdo_instrument and --cs_profile to support
    LLVM's context-sensitive FDO (CSFDO).
  - Bazel C++ compile/link Starlark API. Can be used with
    experimental flag
    --experimental_cc_skylark_api_enabled_packages=<package_path>,<pac
    kage_path2>.
  - `cc_toolchain.static_runtime_lib` and
    `cc_toolchain.dynamic_runtime_lib` are now exposed to Starlark.
  - New flag `--incompatible_no_kwargs_in_build_files`. See
    #8021
  - struct.to_proto() converts dict into proto3 text message (map<,>).
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Flag `--incompatible_static_name_resolution_in_build_files` is
    added. See #8022
  - Add --incompatible_objc_framework_cleanup to control whether to
    enable some objc framework cleanup that changes the API.
    Specifically, the cleanup changes the objc provider API
    pertaining to frameworks.  This change is expected to be
    transparent to most users unless they write their own Starlark
    rules to handle frameworks.  See
    #7594 for details.
  - Added --incompatible_remove_binary_profile to disable the old
    binary
    profiles. Instead use the JSON profile format:
    https://docs.bazel.build/versions/master/skylark/performance.html#
    json-profile
  - Introducing --execution_log_binary_file and
    --execution_log_json_file that output a stable sorted execution
    log. They will offer a stable replacement to
    --experimental_execution_log_file.
  - Flag `--incompatible_disallow_old_octal_notation` is added. See
    //github.com//issues/8059
  - Removes the
    --incompatible_disable_genrule_cc_toolchain_dependency flag.
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Incompatible flag
    `--incompatible_make_thinlto_command_lines_standalone` has been
    added. See #6791 for
    details.
  - objc_library does not support resource attributes any more.
    Please read #7594 for more info.
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See #7977 for more info.
  - New platform_mappings ability to allow gradual flag to
    platforms/toolchains migration. See also
    #6426
  - Added support for compiling against fully qualified R classes
    from aar_import dependencies.
  - --tls_enabled flag is deprecated. Please provide 'grpcs' as a
    scheme in the URLs if TLS should be used for a remote connection.
  - Adds
    incompatible_disallow_rule_execution_platform_constraints_allowed,
     which
    disallows the use of the "execution_platform_constraints_allowed"
    attribute when defining new rules.
  - Flag `--incompatible_restrict_named_params` is added. See
    #8147 for details.
  - The glob function has a new argument `allow_empty`. When set to
    False, the glob fails when it doesn't match anything.
  - Adds the "disable_whole_archive_for_static_lib" feature to allow
    turning off legacy_whole_archive for individual targets.
  - C++ Starlark API for compilation and linking is no longer
    whitelisted
  - Update visibility advice in build-style
  - --incompatible_disable_objc_provider_resources is now enabled by
    default.
  - Fixed an issue where some `py_runtime`s were incompatible with
    using `--build_python_zip` (#5104).
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See #7977 for more info.

This release contains contributions from many people at Google, as well as Benjamin Peterson, Brian Topping, clyang82, Dave Lee, George Gensure, Greg Estren, Greg, Guro Bokum, Keith Smiley, Max Vorobev, Michael Hackner, Robert Brown, Robert Sayre, Ryan Beasley, Yannic.
irengrig pushed a commit to irengrig/bazel that referenced this issue Jun 18, 2019
Baseline: daa8ae5

Cherry picks:

   + 61c7ffa:
     Automated rollback of commit
     87388e2.
   + 898d7b6:
     Add test for repository overrides, conflicting with managed
     directories being added when Bazel server is already started.
   + c2001a4:
     Automated rollback of commit
     bbe47a1.
   + e67c961:
     Fix a non-determinism in create_embedded_tools.py.
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + 597e289:
     remote: made CombinedCache a composition of Disk and Http Cache
   + 942f7cf:
     C++: Fixes bug in C++ API with external repo aspects
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 9835cb4:
     Automated rollback of commit
     844e4e2.
   + c963ba2:
     Windows, Python: fix arg. esc. also in host config
   + a1ea487:
     Do not pre-cache changed files under managed directories
   + 7dc78cd:
     Add explicit execution and target constraints for autodiscovered
     cc t?
   + dd9ac13:
     Fix a bug when a relative path is used for the execution log
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr
   + 7f49531:
     Fix the autodetecting Python toolchain on Mac
   + ddce723:
     Avoid exporting PATH unnecessarily
   + 35dd05a:
     Allow Starlark rules to be able to use the `exec_compatible_with`

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    bazelbuild#7486
  - Flip --incompatible_windows_style_arg_escaping to true.  See
    bazelbuild#7454
  - --incompatible_windows_escape_jvm_flags is enabled by default,
    and the flag no longer exists
  - `--incompatible_no_output_attr_default` is enabled by default.
  - --incompatible_depset_union is enabled by default.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See
    [bazelbuild#7899](bazelbuild#7899) for
    information on declaring Python toolchains and migrating your
    code. As a side-benefit, this addresses bazelbuild#4815 (incorrect
    interpreter version used) on non-Windows platforms. You can
    temporarily opt out of this change with
    `--incompatible_use_python_toolchains=false`.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See bazelbuild#7899 for information on declaring Python
    toolchains and migrating your code. As a side-benefit, this
    addresses bazelbuild#4815 (incorrect interpreter version used) on
    non-Windows platforms. You can temporarily opt out of this change
    with `--incompatible_use_python_toolchains=false`.

New features:

  - Windows, Python: the --incompatible_windows_escape_python_args
    flag (false by default) builds py_binary and py_test targets with
    correct command line argument escaping.
  - cquery supports --output=build

Important changes:

  - Allow debugging C++ features logic.
  - The --ios_multi_cpus, --watchos_cpus, --macos_cpus and tvos_cpus
    are now additive. This means that you can now split the
    --ios_multi_cpus=arm64,armv7 into --ios_multi_cpus=arm64 and
    --ios_multi_cpus=armv7.
  - Generated Go protobufs now depend on
    //net/proto2/go:proto_gendeps instead of //net/proto2/go:proto
  - Add new options --cs_fdo_instrument and --cs_profile to support
    LLVM's context-sensitive FDO (CSFDO).
  - Bazel C++ compile/link Starlark API. Can be used with
    experimental flag
    --experimental_cc_skylark_api_enabled_packages=<package_path>,<pac
    kage_path2>.
  - `cc_toolchain.static_runtime_lib` and
    `cc_toolchain.dynamic_runtime_lib` are now exposed to Starlark.
  - New flag `--incompatible_no_kwargs_in_build_files`. See
    bazelbuild#8021
  - struct.to_proto() converts dict into proto3 text message (map<,>).
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Flag `--incompatible_static_name_resolution_in_build_files` is
    added. See bazelbuild#8022
  - Add --incompatible_objc_framework_cleanup to control whether to
    enable some objc framework cleanup that changes the API.
    Specifically, the cleanup changes the objc provider API
    pertaining to frameworks.  This change is expected to be
    transparent to most users unless they write their own Starlark
    rules to handle frameworks.  See
    bazelbuild#7594 for details.
  - Added --incompatible_remove_binary_profile to disable the old
    binary
    profiles. Instead use the JSON profile format:
    https://docs.bazel.build/versions/master/skylark/performance.html#
    json-profile
  - Introducing --execution_log_binary_file and
    --execution_log_json_file that output a stable sorted execution
    log. They will offer a stable replacement to
    --experimental_execution_log_file.
  - Flag `--incompatible_disallow_old_octal_notation` is added. See
    //github.com/bazelbuild/issues/8059
  - Removes the
    --incompatible_disable_genrule_cc_toolchain_dependency flag.
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Incompatible flag
    `--incompatible_make_thinlto_command_lines_standalone` has been
    added. See bazelbuild#6791 for
    details.
  - objc_library does not support resource attributes any more.
    Please read bazelbuild#7594 for more info.
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.
  - New platform_mappings ability to allow gradual flag to
    platforms/toolchains migration. See also
    bazelbuild#6426
  - Added support for compiling against fully qualified R classes
    from aar_import dependencies.
  - --tls_enabled flag is deprecated. Please provide 'grpcs' as a
    scheme in the URLs if TLS should be used for a remote connection.
  - Adds
    incompatible_disallow_rule_execution_platform_constraints_allowed,
     which
    disallows the use of the "execution_platform_constraints_allowed"
    attribute when defining new rules.
  - Flag `--incompatible_restrict_named_params` is added. See
    bazelbuild#8147 for details.
  - The glob function has a new argument `allow_empty`. When set to
    False, the glob fails when it doesn't match anything.
  - Adds the "disable_whole_archive_for_static_lib" feature to allow
    turning off legacy_whole_archive for individual targets.
  - C++ Starlark API for compilation and linking is no longer
    whitelisted
  - Update visibility advice in build-style
  - --incompatible_disable_objc_provider_resources is now enabled by
    default.
  - Fixed an issue where some `py_runtime`s were incompatible with
    using `--build_python_zip` (bazelbuild#5104).
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.

This release contains contributions from many people at Google, as well as Benjamin Peterson, Brian Topping, clyang82, Dave Lee, George Gensure, Greg Estren, Greg, Guro Bokum, Keith Smiley, Max Vorobev, Michael Hackner, Robert Brown, Robert Sayre, Ryan Beasley, Yannic.
bazel-io pushed a commit that referenced this issue Jul 1, 2019
In this PR:

- Removed the
  `--incompatible_windows_style_arg_escaping` flag
  and all code for its "false" case.  The flag is
  flipped to true.

- In WindowsProcessesTest, the
  testDoesNotQuoteArgWithDoubleQuote method is
  replaced by testQuotesArgWithDoubleQuote, i.e.
  the test logic is reversed. The new test shows
  the correct behavior, the old test was wrong.

See #7122
See #7454

RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.

Closes #8003.

PiperOrigin-RevId: 255929367
siberex pushed a commit to siberex/bazel that referenced this issue Jul 4, 2019
In this PR:

- Removed the
  `--incompatible_windows_style_arg_escaping` flag
  and all code for its "false" case.  The flag is
  flipped to true.

- In WindowsProcessesTest, the
  testDoesNotQuoteArgWithDoubleQuote method is
  replaced by testQuotesArgWithDoubleQuote, i.e.
  the test logic is reversed. The new test shows
  the correct behavior, the old test was wrong.

See bazelbuild#7122
See bazelbuild#7454

RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.

Closes bazelbuild#8003.

PiperOrigin-RevId: 255929367
irengrig pushed a commit to irengrig/bazel that referenced this issue Jul 15, 2019
Baseline: daa8ae5

Cherry picks:

   + 61c7ffa:
     Automated rollback of commit
     87388e2.
   + 898d7b6:
     Add test for repository overrides, conflicting with managed
     directories being added when Bazel server is already started.
   + c2001a4:
     Automated rollback of commit
     bbe47a1.
   + e67c961:
     Fix a non-determinism in create_embedded_tools.py.
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + 597e289:
     remote: made CombinedCache a composition of Disk and Http Cache
   + 942f7cf:
     C++: Fixes bug in C++ API with external repo aspects
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 9835cb4:
     Automated rollback of commit
     844e4e2.
   + c963ba2:
     Windows, Python: fix arg. esc. also in host config
   + a1ea487:
     Do not pre-cache changed files under managed directories
   + 7dc78cd:
     Add explicit execution and target constraints for autodiscovered
     cc t?
   + dd9ac13:
     Fix a bug when a relative path is used for the execution log
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr
   + 7f49531:
     Fix the autodetecting Python toolchain on Mac
   + ddce723:
     Avoid exporting PATH unnecessarily
   + 35dd05a:
     Allow Starlark rules to be able to use the `exec_compatible_with`

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    bazelbuild#7486
  - Flip --incompatible_windows_style_arg_escaping to true.  See
    bazelbuild#7454
  - --incompatible_windows_escape_jvm_flags is enabled by default,
    and the flag no longer exists
  - `--incompatible_no_output_attr_default` is enabled by default.
  - --incompatible_depset_union is enabled by default.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See
    [bazelbuild#7899](bazelbuild#7899) for
    information on declaring Python toolchains and migrating your
    code. As a side-benefit, this addresses bazelbuild#4815 (incorrect
    interpreter version used) on non-Windows platforms. You can
    temporarily opt out of this change with
    `--incompatible_use_python_toolchains=false`.
  - Python rules now determine the Python runtime using toolchains
    rather than `--python_top` and `--python_path`, which are
    deprecated. See bazelbuild#7899 for information on declaring Python
    toolchains and migrating your code. As a side-benefit, this
    addresses bazelbuild#4815 (incorrect interpreter version used) on
    non-Windows platforms. You can temporarily opt out of this change
    with `--incompatible_use_python_toolchains=false`.

New features:

  - Windows, Python: the --incompatible_windows_escape_python_args
    flag (false by default) builds py_binary and py_test targets with
    correct command line argument escaping.
  - cquery supports --output=build

Important changes:

  - Allow debugging C++ features logic.
  - The --ios_multi_cpus, --watchos_cpus, --macos_cpus and tvos_cpus
    are now additive. This means that you can now split the
    --ios_multi_cpus=arm64,armv7 into --ios_multi_cpus=arm64 and
    --ios_multi_cpus=armv7.
  - Generated Go protobufs now depend on
    //net/proto2/go:proto_gendeps instead of //net/proto2/go:proto
  - Add new options --cs_fdo_instrument and --cs_profile to support
    LLVM's context-sensitive FDO (CSFDO).
  - Bazel C++ compile/link Starlark API. Can be used with
    experimental flag
    --experimental_cc_skylark_api_enabled_packages=<package_path>,<pac
    kage_path2>.
  - `cc_toolchain.static_runtime_lib` and
    `cc_toolchain.dynamic_runtime_lib` are now exposed to Starlark.
  - New flag `--incompatible_no_kwargs_in_build_files`. See
    bazelbuild#8021
  - struct.to_proto() converts dict into proto3 text message (map<,>).
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Flag `--incompatible_static_name_resolution_in_build_files` is
    added. See bazelbuild#8022
  - Add --incompatible_objc_framework_cleanup to control whether to
    enable some objc framework cleanup that changes the API.
    Specifically, the cleanup changes the objc provider API
    pertaining to frameworks.  This change is expected to be
    transparent to most users unless they write their own Starlark
    rules to handle frameworks.  See
    bazelbuild#7594 for details.
  - Added --incompatible_remove_binary_profile to disable the old
    binary
    profiles. Instead use the JSON profile format:
    https://docs.bazel.build/versions/master/skylark/performance.html#
    json-profile
  - Introducing --execution_log_binary_file and
    --execution_log_json_file that output a stable sorted execution
    log. They will offer a stable replacement to
    --experimental_execution_log_file.
  - Flag `--incompatible_disallow_old_octal_notation` is added. See
    //github.com/bazelbuild/issues/8059
  - Removes the
    --incompatible_disable_genrule_cc_toolchain_dependency flag.
  - Android resource conflicts will no longer be reported between a
    strong attr resource and a weak attr resource, if the weak attr
    does not have format specified.
  - Incompatible flag
    `--incompatible_make_thinlto_command_lines_standalone` has been
    added. See bazelbuild#6791 for
    details.
  - objc_library does not support resource attributes any more.
    Please read bazelbuild#7594 for more info.
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.
  - New platform_mappings ability to allow gradual flag to
    platforms/toolchains migration. See also
    bazelbuild#6426
  - Added support for compiling against fully qualified R classes
    from aar_import dependencies.
  - --tls_enabled flag is deprecated. Please provide 'grpcs' as a
    scheme in the URLs if TLS should be used for a remote connection.
  - Adds
    incompatible_disallow_rule_execution_platform_constraints_allowed,
     which
    disallows the use of the "execution_platform_constraints_allowed"
    attribute when defining new rules.
  - Flag `--incompatible_restrict_named_params` is added. See
    bazelbuild#8147 for details.
  - The glob function has a new argument `allow_empty`. When set to
    False, the glob fails when it doesn't match anything.
  - Adds the "disable_whole_archive_for_static_lib" feature to allow
    turning off legacy_whole_archive for individual targets.
  - C++ Starlark API for compilation and linking is no longer
    whitelisted
  - Update visibility advice in build-style
  - --incompatible_disable_objc_provider_resources is now enabled by
    default.
  - Fixed an issue where some `py_runtime`s were incompatible with
    using `--build_python_zip` (bazelbuild#5104).
  - The `outputs` parameter of the `rule()` function is deprecated
    and attached to flag `--incompatible_no_rule_outputs_param`.
    Migrate rules to use `OutputGroupInfo` or `attr.output` instead.
    See bazelbuild#7977 for more info.

This release contains contributions from many people at Google, as well as Benjamin Peterson, Brian Topping, clyang82, Dave Lee, George Gensure, Greg Estren, Greg, Guro Bokum, Keith Smiley, Max Vorobev, Michael Hackner, Robert Brown, Robert Sayre, Ryan Beasley, Yannic.
irengrig pushed a commit to irengrig/bazel that referenced this issue Jul 15, 2019
In this PR:

- Removed the
  `--incompatible_windows_style_arg_escaping` flag
  and all code for its "false" case.  The flag is
  flipped to true.

- In WindowsProcessesTest, the
  testDoesNotQuoteArgWithDoubleQuote method is
  replaced by testQuotesArgWithDoubleQuote, i.e.
  the test logic is reversed. The new test shows
  the correct behavior, the old test was wrong.

See bazelbuild#7122
See bazelbuild#7454

RELNOTES[INC]: The --incompatible_windows_style_arg_escaping flag is flipped to "true", and the "false" case unsupported. Bazel no longer accepts this flag.

Closes bazelbuild#8003.

PiperOrigin-RevId: 255929367
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests incompatible-change Incompatible/breaking change team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website
Projects
None yet
Development

No branches or pull requests

7 participants