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_escape_jvm_flags: on Windows, enables tokenization and escaping of jvm_flags #7486

Closed
laszlocsomor opened this issue Feb 21, 2019 · 4 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

Description

Add --incompatible_windows_escape_jvm_flags flag (default: false). This flag only affects builds on Windows.

This flag has no effect on Linux/macOS/non-Windows.

Background

When you build a java_binary or java_test on Windows, one of the outputs is an .exe file. This is called the launcher, and this is what you run with "bazel run" and "bazel test". The launcher's purpose is to set up the environment, compute the JVM command line (classpath, JVM flags, etc.) and launch the JVM.

The target-specific data (such as the classpath, main class name, but also the jvm_flags attribute from the BUILD-file) are embedded into the launcher as binary data. When you run the launcher, it will compute the command line to run the JVM as a subprocess (using the CreateProcessW system call), and that involves escaping the JVM flags so they can safely be passed to the subprcoess.

The new flag

The --incompatible_windows_escape_jvm_flags flag affects how Bazel builds the launcher:

  • whether or not Bazel will Bash-tokenize the jvm_flags before embedding them in the launcher, and
  • whether the launcher will escape these flags using the correct escaping logic or the buggy one.

When the flag is enabled:

  • Bazel will Bash-tokenize java_binary.jvm_flags and java_test.jvm_flags (as documented by the Build Encyclopedia) before embedding them into the launcher.

  • The launcher will properly escape these flags when it runs the JVM as a subprocess (using launcher_util::WindowsEscapeArg2).

  • The result is that the jvm_flags declared in the BUILD file will arrive to the Java program as intended.

When the flag is disabled:

  • Bazel does not Bash-tokenize the jvm_flags before embedding them in the launcher.

  • The launcher escapes the flags with a Bash-like escaping logic (launcher_util::WindowsEscapeArg)
    which cannot properly quote and escape everything.

  • The result is that the jvm_flags declared in the BUILD file might get messed up as they are passed to the JVM, or the launcher may not even be able to run the JVM.

Related bug: #7072

Example

BUILD file:

java_binary(
    name = "x",
    srcs = ["A.java"],
    main_class = "A",
    jvm_flags = [
        "-Darg0='hello world'",
        r"-Darg1=\"C:\\Program\ Files\\\"",
    ],
)

A.java:

public class A {
  public static void main(String[] args) {
    System.out.printf(
        "arg0=(%s)%narg1=(%s)%n",
        System.getProperty("arg0"),
        System.getProperty("arg1"));
  }
}

The expected output of running the binary is:

arg0=(hello world)
arg1=("C:\Program Files\")

Currently the output is something like:

Error: Could not find or load main class

Migration recipe

None, as of 2019-02-21.

We don't expect any breakages when this flag is enabled. However if it breaks your build or if it breaks your java_binaries or java_tests, 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 21, 2019
@laszlocsomor laszlocsomor added incompatible-change Incompatible/breaking change bazel 1.0 labels Feb 21, 2019
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Feb 21, 2019
Add --incompatible_windows_escape_jvm_flags flag
(default: false). This flag has no effect on
platforms other than Windows.

This flag affects how Bazel builds the launcher of
java_binary and java_test targets. (The launcher
is the .exe file that sets up the environment for
the Java program and launches the JVM.)

In particular, the flag controls whether or not
Bazel will Bash-tokenize the jvm_flags that were
declared in the BUILD file, and whether or not
these jvm_flags are escaped by the launcher when
it invokes the JVM.

When the flag is enabled:

- Bazel will Bash-tokenize java_binary.jvm_flags
  and java_test.jvm_flags (as documented by the
  Build Encyclopedia) before embedding them into
  the launcher.

- The launcher will properly escape these flags
  when it runs the JVM as a subprocess (using
  launcher_util::WindowsEscapeArg2).

- The result is that the jvm_flags declared in the
  BUILD file will arrive to the Java program as
  intended.

When the flag is disabled:

- Bazel does not Bash-tokenize the jvm_flags
  before embedding them in the launcher.

- The launcher escapes the flags with a Bash-like
  escaping logic (launcher_util::WindowsEscapeArg)
  which cannot properly quote and escape
  everything.

- The result is that the jvm_flags declared in the
  BUILD file might get messed up as they are
  passed to the JVM, or the launcher may not even
  be able to run the JVM.

Incompatible flag: bazelbuild#7486

Related: bazelbuild#7072

RELNOTES[NEW]: Added --incompatible_windows_escape_jvm_flags flag: enables correct java_binary.jvm_flags and java_test.jvm_flags tokenization and escaping on Windows. (No-op on other platforms.)
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Feb 21, 2019
Add --incompatible_windows_escape_jvm_flags flag
(default: false). This flag has no effect on
platforms other than Windows.

This flag affects how Bazel builds the launcher of
java_binary and java_test targets. (The launcher
is the .exe file that sets up the environment for
the Java program and launches the JVM.)

In particular, the flag controls whether or not
Bazel will Bash-tokenize the jvm_flags that were
declared in the BUILD file, and whether or not
these jvm_flags are escaped by the launcher when
it invokes the JVM.

When the flag is enabled:

- Bazel will Bash-tokenize java_binary.jvm_flags
  and java_test.jvm_flags (as documented by the
  Build Encyclopedia) before embedding them into
  the launcher.

- The launcher will properly escape these flags
  when it runs the JVM as a subprocess (using
  launcher_util::WindowsEscapeArg2).

- The result is that the jvm_flags declared in the
  BUILD file will arrive to the Java program as
  intended.

When the flag is disabled:

- Bazel does not Bash-tokenize the jvm_flags
  before embedding them in the launcher.

- The launcher escapes the flags with a Bash-like
  escaping logic (launcher_util::WindowsEscapeArg)
  which cannot properly quote and escape
  everything.

- The result is that the jvm_flags declared in the
  BUILD file might get messed up as they are
  passed to the JVM, or the launcher may not even
  be able to run the JVM.

Incompatible flag: bazelbuild#7486

Related: bazelbuild#7072

RELNOTES[NEW]: Added --incompatible_windows_escape_jvm_flags flag: enables correct java_binary.jvm_flags and java_test.jvm_flags tokenization and escaping on Windows. (No-op on other platforms.)
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Feb 21, 2019
Add --incompatible_windows_escape_jvm_flags flag
(default: false). This flag has no effect on
platforms other than Windows.

This flag affects how Bazel builds the launcher of
java_binary and java_test targets. (The launcher
is the .exe file that sets up the environment for
the Java program and launches the JVM.)

In particular, the flag controls whether or not
Bazel will Bash-tokenize the jvm_flags that were
declared in the BUILD file, and whether or not
these jvm_flags are escaped by the launcher when
it invokes the JVM.

When the flag is enabled:

- Bazel will Bash-tokenize java_binary.jvm_flags
  and java_test.jvm_flags (as documented by the
  Build Encyclopedia) before embedding them into
  the launcher.

- The launcher will properly escape these flags
  when it runs the JVM as a subprocess (using
  launcher_util::WindowsEscapeArg2).

- The result is that the jvm_flags declared in the
  BUILD file will arrive to the Java program as
  intended.

When the flag is disabled:

- Bazel does not Bash-tokenize the jvm_flags
  before embedding them in the launcher.

- The launcher escapes the flags with a Bash-like
  escaping logic (launcher_util::WindowsEscapeArg)
  which cannot properly quote and escape
  everything.

- The result is that the jvm_flags declared in the
  BUILD file might get messed up as they are
  passed to the JVM, or the launcher may not even
  be able to run the JVM.

Incompatible flag: bazelbuild#7486

Related: bazelbuild#7072

RELNOTES[NEW]: Added --incompatible_windows_escape_jvm_flags flag: enables correct java_binary.jvm_flags and java_test.jvm_flags tokenization and escaping on Windows. (No-op on other platforms.)

Change-Id: I531cc63cdfeccbe4b6d48876cb82870c1726a723
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Feb 21, 2019
Add --incompatible_windows_escape_jvm_flags flag
(default: false). This flag has no effect on
platforms other than Windows.

This flag affects how Bazel builds the launcher of
java_binary and java_test targets. (The launcher
is the .exe file that sets up the environment for
the Java program and launches the JVM.)

In particular, the flag controls whether or not
Bazel will Bash-tokenize the jvm_flags that were
declared in the BUILD file, and whether or not
these jvm_flags are escaped by the launcher when
it invokes the JVM.

When the flag is enabled:

- Bazel will Bash-tokenize java_binary.jvm_flags
  and java_test.jvm_flags (as documented by the
  Build Encyclopedia) before embedding them into
  the launcher. The build fails if an entry cannot
  be Bash-tokenized, e.g. if it has unterminated
  quotes.

- The launcher will properly escape these flags
  when it runs the JVM as a subprocess (using
  launcher_util::WindowsEscapeArg2).

- The result is that the jvm_flags declared in the
  BUILD file will arrive to the Java program as
  intended. However, due to the extra
  Bash-tokenization step, some ill-formed flags
  are no longer accepted, e.g.
  `jvm_flags=["-Dfoo='a"]` now results in a build
  error.

When the flag is disabled:

- Bazel does not Bash-tokenize the jvm_flags
  before embedding them in the launcher. This
  preserves quoting meant to be stripped away, and
  it also means Bazel won't check whether the
  argument is properly quoted.

- The launcher escapes the flags with a Bash-like
  escaping logic (launcher_util::WindowsEscapeArg)
  which cannot properly quote and escape
  everything.

- The result: the jvm_flags declared in the BUILD
  file might get messed up as they are passed to
  the JVM, or the launcher may not even be able to
  run the JVM. However, due to the lack of
  Bash-tokenization, Bazel propagates some flags
  to the Java binary that it would no longer
  accept if the new
  `--incompatible_windows_escape_jvm_flags` were
  enabled, e.g. `jvm_flags=["'a"]` is fine.

Incompatible flag: bazelbuild#7486

Related: bazelbuild#7072

RELNOTES[NEW]: Added --incompatible_windows_escape_jvm_flags flag: enables correct java_binary.jvm_flags and java_test.jvm_flags tokenization and escaping on Windows. (No-op on other platforms.)

Change-Id: I531cc63cdfeccbe4b6d48876cb82870c1726a723
bazel-io pushed a commit that referenced this issue Feb 26, 2019
Add --incompatible_windows_escape_jvm_flags flag
(default: false). This flag has no effect on
platforms other than Windows.

This flag affects how Bazel builds the launcher of
java_binary and java_test targets. (The launcher
is the .exe file that sets up the environment for
the Java program and launches the JVM.)

In particular, the flag controls whether or not
Bazel will Bash-tokenize the jvm_flags that were
declared in the BUILD file, and whether or not
these jvm_flags are escaped by the launcher when
it invokes the JVM.

When the flag is enabled:

- Bazel will Bash-tokenize java_binary.jvm_flags
  and java_test.jvm_flags (as documented by the
  Build Encyclopedia) before embedding them into
  the launcher. The build fails if an entry cannot
  be Bash-tokenized, e.g. if it has unterminated
  quotes.

- The launcher will properly escape these flags
  when it runs the JVM as a subprocess (using
  launcher_util::WindowsEscapeArg2).

- Result: the jvm_flags declared in the BUILD file
  will arrive to the Java program as intended.
  However, due to the extra Bash-tokenization
  step, some ill-formed flags are no longer
  accepted, e.g.  `jvm_flags=["-Dfoo='a"]` now
  results in a build error.

When the flag is disabled:

- Bazel does not Bash-tokenize the jvm_flags
  before embedding them in the launcher. This
  preserves quoting meant to be stripped away, and
  it also means Bazel won't check whether the
  argument is properly quoted.

- The launcher escapes the flags with a Bash-like
  escaping logic (launcher_util::WindowsEscapeArg)
  which cannot properly quote and escape
  everything.

- Result: the jvm_flags declared in the BUILD file
  might get messed up as they are passed to the
  JVM, or the launcher may not even be able to run
  the JVM. However, due to the lack of
  Bash-tokenization, Bazel propagates some flags
  to the Java binary that it would no longer
  accept if the new
  `--incompatible_windows_escape_jvm_flags` were
  enabled, e.g. `jvm_flags=["'a"]` is fine.

Incompatible flag: #7486

Related: #7072

RELNOTES[NEW]: Added --incompatible_windows_escape_jvm_flags flag: enables correct java_binary.jvm_flags and java_test.jvm_flags tokenization and escaping on Windows. (No-op on other platforms.)

Change-Id: I531cc63cdfeccbe4b6d48876cb82870c1726a723

Closes #7490.

PiperOrigin-RevId: 235700143
@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#7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See bazelbuild#7486
laszlocsomor added a commit that referenced this issue Mar 7, 2019
Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486
@dkelmer
Copy link
Contributor

dkelmer commented Apr 3, 2019

Seems like the flag has been flipped to true in 2029b1a. I'm closing the issue.

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

laszlocsomor commented Apr 5, 2019

The flag is not yet flipped:

2029b1a was merged a testing branch, not master, to run the "Bazel / Bazel@HEAD + Downstream" pipeline on CI.

@dkelmer
Copy link
Contributor

dkelmer commented Apr 5, 2019

Ah, I did think the PR looked weird :)
Thanks for clarifying

bazel-io pushed a commit that referenced this issue Apr 8, 2019
Remove --incompatible_windows_escape_jvm_flags.

The flag is now flipped to true, and the
false-branch logic is removed.

See #7486

RELNOTES[INC]: --incompatible_windows_escape_jvm_flags is enabled by default, and the flag no longer exists

Change-Id: I4ba9a626c28ce9690c0850fa052c302f80bccc1c

Closes #7972.

Change-Id: I4ba9a626c28ce9690c0850fa052c302f80bccc1c
PiperOrigin-RevId: 242482659
dkelmer pushed a commit that referenced this issue Apr 11, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 16, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 25, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 25, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 25, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 26, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
dkelmer pushed a commit that referenced this issue Apr 29, 2019
All downstream projects are green:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

Fixes: #7486

RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See #7486

Closes #7646.

PiperOrigin-RevId: 242107771
bazel-io pushed a commit that referenced this issue May 1, 2019
Baseline: 0366246

Cherry picks:

   + 3f7f255:
     Windows: fix native test wrapper's arg. escaping
   + afeb8d0:
     Flip --incompatible_windows_escape_jvm_flags
   + 4299b65:
     Sort DirectoryNode children to ensure validity.
   + 231270c:
     Conditionally use deprecated signature for initWithContentsOfURL
   + 75a3a53:
     Add http_archive entries for testing with various JDK versions.
   + 4a6354a:
     Now that ubuntu1804 uses JDK 11, remove explicit
     ubuntu1804_java11 tests.
   + ae102fb:
     Fix wrong name of ubuntu1804_javabase9 task.
   + 0020a97:
     Remove @executable_path/Frameworks from rpaths
   + 130f86d:
     Download stderr/stdout to a temporary FileOutErr

Incompatible changes:

  - (Starlark rules) The legacy "py" provider can no longer be passed
    to or produced by native Python rules; use
    [PyInfo](https://docs.bazel.build/versions/master/skylark/lib/PyIn
    fo.html) instead. See
    [#7298](#7298) for more
    information.
  - (Python rules) The `default_python_version` attribute of the
    `py_binary` and `py_test` rules has been renamed to
    `python_version`. Also, the `--force_python` flag has been
    renamed to `--python_version`. See
    [#7308](#7308) for more
    information.
  - (Python rules) The python version now changes to whatever version
    is specified in a `py_binary` or `py_test`'s `python_version`
    attribute, instead of being forced to the value set by a command
    line flag. You can temporarily revert this change with
    `--incompatible_allow_python_version_transitions=false`. See
    [#7307](#7307) for more
    information.
  - --incompatible_disable_third_party_license_checking` is enabled
    by default
  - Introduced --incompatible_use_python_toolchains, which supersedes
    --python_top/--python_path. See #7899 and #7375 for more
    information.
  - Python 3 is now the default Python version (for `py_binary` and
    `py_test` targets that don't specify the `python_version`
    attribute). Targets that are built for Python 3 will no longer
    have their output put in a separate `-py3` directory; instead
    there is now a separate `-py2` directory for Python 2 targets.
    See #7359 and #7593 for more information.
  - objc_library resource attributes are now disabled by default.
    Please migrate them to data instead. See
    #7594 for more info.
  - Flip --incompatible_windows_escape_jvm_flags to true. See
    #7486

New features:

  - genrules now support a $(RULEDIR) variable that resolves to the
    directory where the outputs of the rule are put.
  - Added --incompatible_windows_native_test_wrapper flag: enables
    using the Bash-less test wrapper on Windows. (No-op on other
    platforms.)

Important changes:

  - incompatible_use_jdk11_as_host_javabase: makes JDK 11 the default
    --host_javabase for remote jdk
    (#7219)
  - Makes genquery somepath output deterministic.
  - Tristate attributes of native rules now reject True/False (use
    1/0)
  - Rollback of "Tristate attributes of native rules now reject
    True/False (use 1/0)"
  - Tristate attributes of native rules now reject True/False (use
    1/0)
  - Added -incompatible_do_not_split_linking_cmdline flag. See #7670
  - Tristate attributes of native rules now temporarily accept
    True/False again
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set` has
    been flipped (#7008)
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set...
    RELNOTES: None.
  - --incompatible_no_transitive_loads is enabled by default.
  - Makes TreeArtifact deterministic.
  - --incompatible_no_transitive_loads is enabled by default.
  - Android NDK C++ toolchain is now configured in Starlark. This
    should be a backwards compatible change, but in case of bugs
    blame unknown commit.
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set` has
    been flipped (#7008)
  - --incompatible_no_transitive_loads is enabled by default.
  - --incompatible_bzl_disallow_load_after_statement is enabled
  - Added `--incompatible_require_ctx_in_configure_features`, see
    #7793 for details.
  - Flag --incompatible_merge_genfiles_directory is flipped. This
    removes the directory `bazel-genfiles` in favor of `bazel-bin`.
  - previously deprecated flag --experimental_remote_spawn_cache was
    removed
  - `--incompatible_disallow_load_labels_to_cross_package_boundaries`
    is enabled by default
  - Fix an issue where the Android resource processor did not surface
    errors from aapt2 compile and link actions.
  - --incompatible_no_attr_license is enabled by default
  - `--incompatible_disable_crosstool_file` has been flipped
    (#7320)
  - A new flag `--incompatible_string_join_requires_strings` is
    introduced. The sequence argument of `string.join` must contain
    only string elements.
  - --incompatible_symlinked_sandbox_expands_tree_artifacts_in_runfile
    s_tree has been flipped
  - Incompatible flag `--incompatible_disable_legacy_cc_provider` has
    been flipped (see #7036
    for details).
  - Don't drop the analysis cache when the same --define flag is set
    multiple times and the last value is the same (e.g. if the
    current invocation was run with "--define foo=bar" and the
    previous one was run with "--define foo=baz --define foo=bar").
  - The --incompatible_disable_genrule_cc_toolchain_dependency flag
    has been flipped (see
    #6867 for details).
  - Incompatible change
    `--incompatible_remove_cpu_and_compiler_attributes_from_cc_toolcha
    in` has been flipped (see
    #7075 for details).
  - --noexperimental_java_coverage is a no-op flag.
  - --experimental_java_coverage/--incompatible_java_coverage flag was
    removed. See #7425.
  - incompatible_use_toolchain_providers_in_java_common: pass
    JavaToolchainInfo and JavaRuntimeInfo providers to java_common
    APIs instead of configured targets
    (#7186.)
  - --incompatible_remote_symlinks has been flipped. The remote
    caching and execution protocol will now represent symlinks in
    outputs as such. See
    #7917 for more details.
  - Bazel is now ~20MiB smaller, from unbundling the Android rules'
    runtime dependencies.

This release contains contributions from many people at Google, as well as Andreas Herrmann, Andrew Suffield, Andy Scott, Benjamin Peterson, Ed Baunton, George Gensure, Ian McGinnis, Ity Kaul, Jingwen Chen, John Millikin, Keith Smiley, Marwan Tammam, Mike Fourie, Oscar Bonilla, perwestling, petros, Robert Sayre, Ryan Beasley, silvergasp, Stanimir Mladenov, Travis Cline, Vladimir Chebotarev, ??.
dkelmer pushed a commit that referenced this issue May 6, 2019
Baseline: 0366246

Cherry picks:

   + 3f7f255:
     Windows: fix native test wrapper's arg. escaping
   + afeb8d0:
     Flip --incompatible_windows_escape_jvm_flags
   + 4299b65:
     Sort DirectoryNode children to ensure validity.
   + 231270c:
     Conditionally use deprecated signature for initWithContentsOfURL
   + 75a3a53:
     Add http_archive entries for testing with various JDK versions.
   + 4a6354a:
     Now that ubuntu1804 uses JDK 11, remove explicit
     ubuntu1804_java11 tests.
   + ae102fb:
     Fix wrong name of ubuntu1804_javabase9 task.
   + 0020a97:
     Remove @executable_path/Frameworks from rpaths
   + 130f86d:
     Download stderr/stdout to a temporary FileOutErr

Incompatible changes:

  - (Starlark rules) The legacy "py" provider can no longer be passed
    to or produced by native Python rules; use
    [PyInfo](https://docs.bazel.build/versions/master/skylark/lib/PyIn
    fo.html) instead. See
    [#7298](#7298) for more
    information.
  - (Python rules) The `default_python_version` attribute of the
    `py_binary` and `py_test` rules has been renamed to
    `python_version`. Also, the `--force_python` flag has been
    renamed to `--python_version`. See
    [#7308](#7308) for more
    information.
  - (Python rules) The python version now changes to whatever version
    is specified in a `py_binary` or `py_test`'s `python_version`
    attribute, instead of being forced to the value set by a command
    line flag. You can temporarily revert this change with
    `--incompatible_allow_python_version_transitions=false`. See
    [#7307](#7307) for more
    information.
  - --incompatible_disable_third_party_license_checking` is enabled
    by default
  - Introduced --incompatible_use_python_toolchains, which supersedes
    --python_top/--python_path. See #7899 and #7375 for more
    information.
  - Python 3 is now the default Python version (for `py_binary` and
    `py_test` targets that don't specify the `python_version`
    attribute). Targets that are built for Python 3 will no longer
    have their output put in a separate `-py3` directory; instead
    there is now a separate `-py2` directory for Python 2 targets.
    See #7359 and #7593 for more information.
  - objc_library resource attributes are now disabled by default.
    Please migrate them to data instead. See
    #7594 for more info.
  - Flip --incompatible_windows_escape_jvm_flags to true. See
    #7486

New features:

  - genrules now support a $(RULEDIR) variable that resolves to the
    directory where the outputs of the rule are put.
  - Added --incompatible_windows_native_test_wrapper flag: enables
    using the Bash-less test wrapper on Windows. (No-op on other
    platforms.)

Important changes:

  - incompatible_use_jdk11_as_host_javabase: makes JDK 11 the default
    --host_javabase for remote jdk
    (#7219)
  - Makes genquery somepath output deterministic.
  - Tristate attributes of native rules now reject True/False (use
    1/0)
  - Rollback of "Tristate attributes of native rules now reject
    True/False (use 1/0)"
  - Tristate attributes of native rules now reject True/False (use
    1/0)
  - Added -incompatible_do_not_split_linking_cmdline flag. See #7670
  - Tristate attributes of native rules now temporarily accept
    True/False again
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set` has
    been flipped (#7008)
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set...
    RELNOTES: None.
  - --incompatible_no_transitive_loads is enabled by default.
  - Makes TreeArtifact deterministic.
  - --incompatible_no_transitive_loads is enabled by default.
  - Android NDK C++ toolchain is now configured in Starlark. This
    should be a backwards compatible change, but in case of bugs
    blame unknown commit.
  - `--incompatible_disable_legacy_crosstool_fields` has been flipped
    (#6861)
    `--incompatible_disable_expand_if_all_available_in_flag_set` has
    been flipped (#7008)
  - --incompatible_no_transitive_loads is enabled by default.
  - --incompatible_bzl_disallow_load_after_statement is enabled
  - Added `--incompatible_require_ctx_in_configure_features`, see
    #7793 for details.
  - Flag --incompatible_merge_genfiles_directory is flipped. This
    removes the directory `bazel-genfiles` in favor of `bazel-bin`.
  - previously deprecated flag --experimental_remote_spawn_cache was
    removed
  - `--incompatible_disallow_load_labels_to_cross_package_boundaries`
    is enabled by default
  - Fix an issue where the Android resource processor did not surface
    errors from aapt2 compile and link actions.
  - --incompatible_no_attr_license is enabled by default
  - `--incompatible_disable_crosstool_file` has been flipped
    (#7320)
  - A new flag `--incompatible_string_join_requires_strings` is
    introduced. The sequence argument of `string.join` must contain
    only string elements.
  - --incompatible_symlinked_sandbox_expands_tree_artifacts_in_runfile
    s_tree has been flipped
  - Incompatible flag `--incompatible_disable_legacy_cc_provider` has
    been flipped (see #7036
    for details).
  - Don't drop the analysis cache when the same --define flag is set
    multiple times and the last value is the same (e.g. if the
    current invocation was run with "--define foo=bar" and the
    previous one was run with "--define foo=baz --define foo=bar").
  - The --incompatible_disable_genrule_cc_toolchain_dependency flag
    has been flipped (see
    #6867 for details).
  - Incompatible change
    `--incompatible_remove_cpu_and_compiler_attributes_from_cc_toolcha
    in` has been flipped (see
    #7075 for details).
  - --noexperimental_java_coverage is a no-op flag.
  - --experimental_java_coverage/--incompatible_java_coverage flag was
    removed. See #7425.
  - incompatible_use_toolchain_providers_in_java_common: pass
    JavaToolchainInfo and JavaRuntimeInfo providers to java_common
    APIs instead of configured targets
    (#7186.)
  - --incompatible_remote_symlinks has been flipped. The remote
    caching and execution protocol will now represent symlinks in
    outputs as such. See
    #7917 for more details.
  - Bazel is now ~20MiB smaller, from unbundling the Android rules'
    runtime dependencies.

This release contains contributions from many people at Google, as well as Andreas Herrmann, Andrew Suffield, Andy Scott, Benjamin Peterson, Ed Baunton, George Gensure, Ian McGinnis, Ity Kaul, Jingwen Chen, John Millikin, Keith Smiley, Marwan Tammam, Mike Fourie, Oscar Bonilla, perwestling, petros, Robert Sayre, Ryan Beasley, silvergasp, Stanimir Mladenov, Travis Cline, Vladimir Chebotarev, ??.
bazel-io pushed a commit that referenced this issue May 23, 2019
Baseline: 0366246

Cherry picks:

   + 3f7f255:
     Windows: fix native test wrapper's arg. escaping
   + afeb8d0:
     Flip --incompatible_windows_escape_jvm_flags
   + 4299b65:
     Sort DirectoryNode children to ensure validity.
   + 231270c:
     Conditionally use deprecated signature for initWithContentsOfURL
   + 75a3a53:
     Add http_archive entries for testing with various JDK versions.
   + 4a6354a:
     Now that ubuntu1804 uses JDK 11, remove explicit
     ubuntu1804_java11 tests.
   + ae102fb:
     Fix wrong name of ubuntu1804_javabase9 task.
   + 0020a97:
     Remove @executable_path/Frameworks from rpaths
   + 130f86d:
     Download stderr/stdout to a temporary FileOutErr
   + 2ab3866:
     Release 0.25.0 (2019-05-01)
   + ed48a4a5fddbd93b057c3aa726e15720d79dcf8f:
     Add implementation to removed methods to address
     #8226
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + cccced1:
     Release 0.25.1 (2019-05-07)
   + 0900660d67b53a56a13d1fa16a788e4cecbb1c0e:
     Use package identifier instead of package name
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 6549ac5:
     Release 0.25.2 (2019-05-10)
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    #7486

This release contains contributions from many people at Google, as well as George Gensure, Keith Smiley, Robert Sayre.
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.
@laurentlb
Copy link
Contributor

I think it was released in 0.26 (https://blog.bazel.build/2019/05/28/bazel-0.26.0.html).

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: 0366246

Cherry picks:

   + 3f7f255:
     Windows: fix native test wrapper's arg. escaping
   + afeb8d0:
     Flip --incompatible_windows_escape_jvm_flags
   + 4299b65:
     Sort DirectoryNode children to ensure validity.
   + 231270c:
     Conditionally use deprecated signature for initWithContentsOfURL
   + 75a3a53:
     Add http_archive entries for testing with various JDK versions.
   + 4a6354a:
     Now that ubuntu1804 uses JDK 11, remove explicit
     ubuntu1804_java11 tests.
   + ae102fb:
     Fix wrong name of ubuntu1804_javabase9 task.
   + 0020a97:
     Remove @executable_path/Frameworks from rpaths
   + 130f86d:
     Download stderr/stdout to a temporary FileOutErr
   + 2ab3866:
     Release 0.25.0 (2019-05-01)
   + ed48a4a5fddbd93b057c3aa726e15720d79dcf8f:
     Add implementation to removed methods to address
     bazelbuild#8226
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + cccced1:
     Release 0.25.1 (2019-05-07)
   + 0900660d67b53a56a13d1fa16a788e4cecbb1c0e:
     Use package identifier instead of package name
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 6549ac5:
     Release 0.25.2 (2019-05-10)
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    bazelbuild#7486

This release contains contributions from many people at Google, as well as George Gensure, Keith Smiley, Robert Sayre.
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.
irengrig pushed a commit to irengrig/bazel that referenced this issue Jul 15, 2019
Baseline: 0366246

Cherry picks:

   + 3f7f255:
     Windows: fix native test wrapper's arg. escaping
   + afeb8d0:
     Flip --incompatible_windows_escape_jvm_flags
   + 4299b65:
     Sort DirectoryNode children to ensure validity.
   + 231270c:
     Conditionally use deprecated signature for initWithContentsOfURL
   + 75a3a53:
     Add http_archive entries for testing with various JDK versions.
   + 4a6354a:
     Now that ubuntu1804 uses JDK 11, remove explicit
     ubuntu1804_java11 tests.
   + ae102fb:
     Fix wrong name of ubuntu1804_javabase9 task.
   + 0020a97:
     Remove @executable_path/Frameworks from rpaths
   + 130f86d:
     Download stderr/stdout to a temporary FileOutErr
   + 2ab3866:
     Release 0.25.0 (2019-05-01)
   + ed48a4a5fddbd93b057c3aa726e15720d79dcf8f:
     Add implementation to removed methods to address
     bazelbuild#8226
   + 81aefe7:
     Remove unsupported cpu attribute from cc_toolchains.
   + cccced1:
     Release 0.25.1 (2019-05-07)
   + 0900660d67b53a56a13d1fa16a788e4cecbb1c0e:
     Use package identifier instead of package name
   + 85a5a2b:
     Configure @androidsdk//:emulator_x86 and :emulator_arm to point
     to the unified emulator binary
   + 6549ac5:
     Release 0.25.2 (2019-05-10)
   + 0ff19c6:
     Fix StandaloneTestStrategy.appendStderr

Incompatible changes:

  - Flip --incompatible_windows_escape_jvm_flags to true. See
    bazelbuild#7486

This release contains contributions from many people at Google, as well as George Gensure, Keith Smiley, Robert Sayre.
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.
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    All downstream projects are green:
    https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/903

    Fixes: bazelbuild/bazel#7486

    RELNOTES[INC]: Flip --incompatible_windows_escape_jvm_flags to true. See bazelbuild/bazel#7486

    Closes #7646.

    PiperOrigin-RevId: 242107771
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

Successfully merging a pull request may close this issue.

4 participants