From b47686ccce228fe28ce6969df4fcc67506815f8a Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 17 Dec 2019 15:45:49 +0100 Subject: [PATCH] Bazel 2.0 --- _posts/2019-12-20-bazel-2.0.md | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 _posts/2019-12-20-bazel-2.0.md diff --git a/_posts/2019-12-20-bazel-2.0.md b/_posts/2019-12-20-bazel-2.0.md new file mode 100644 index 00000000..cd40a407 --- /dev/null +++ b/_posts/2019-12-20-bazel-2.0.md @@ -0,0 +1,76 @@ +--- +layout: posts +title: "Bazel 2.0" +authors: + - aehlig +--- + +A new major version of Bazel, +[Bazel 2.0](https://github.com/bazelbuild/bazel/releases/tag/2.0.0) has just +been released. In particular, it brings some important flag flips that did +not make it into +[Bazel 1.0](https://blog.bazel.build/2019/10/10/bazel-1.0.html). + +## Incompatible changes +Bazel 2.0 is a new major release and brings the following incompatible changes. + +* [`--incompatible_remap_main_repo`](https://github.com/bazelbuild/bazel/issues/7130) + is enabled by default. Both ways of addressing the main repository (by its + name and by '@') are now considered referring to the same repository. + +* [`--incompatible_disallow_dict_lookup_unhashable_keys`](https://github.com/bazelbuild/bazel/issues/9184) + is enabled by default. + +* [`--incompatible_remove_native_maven_jar`](https://github.com/bazelbuild/bazel/issues/6799) + is now enabled by default and the flag removed. + +* [`--incompatible_prohibit_aapt1`](https://github.com/bazelbuild/bazel/issues/10000) + is enabled by default. + +## Aquery + +* Proto v2 for aquery proto output formats, which reduces the output size + compared to v1, guarded behind the flag + [`--incompatible_proto_output_v2`](https://github.com/bazelbuild/bazel/issues/10358). + This proto format is still experimental and subject to further changes. + +## Platforms + +* New incompatible flag, [`--incompatible_remove_enabled_toolchain_types`](https://github.com/bazelbuild/bazel/issues/10262), + which allows removing the `PlatformConfiguration.enabled_toolchain_types` + field. + +## Other important changes + +* Package loading now consistently fails if package loading had a glob + evaluation that encountered a symlink cycle or symlink infinite + expansion. Previously, such package loading with such glob evaluations would + fail only in some cases. + + +* The `--disk_cache` flag can now also be used together with the gRPC remote + cache. + +* An action's discover inputs runtime metrics is now categorized as parse time + on the CriticalPathComponent. + +* Bazel's Debian package and the binary installer now include an improved + wrapper that understands `/.bazelversion` files and the + `$USE_BAZEL_VERSION` environment variable. This is similar to [what Bazelisk + offers](https://github.com/bazelbuild/bazelisk#how-does-bazelisk-know-which-bazel-version-to-run-and-where-to-get-it-from), + except that it works offline and integrates with apt-get. + +* We are planning to deprecate the runfiles manifest files, which aren't safe in + the presence of whitespace, and also unnecessarily require local CPU when + remote execution is used. This release adds + `--experimental_skip_runfiles_manifests` to disable the generation of the + input manifests (rule.manifest files) in most cases. This can be used for + initial testing, but the exact semantics are still subject to change; let us + know if this is causing problems. Note that this flag has no effect on Windows + by default or if `--experimental_enable_runfiles` is explicitly set to false. + +## Community + +This release contains contributions from many people at Google, as well as +aldersondrive, Benjamin Peterson, Bor Kae Hwang, David Ostrovsky, John Millikin, +Keith Smiley, Lauri Peltonen, nikola-sh, Peter Mounce, Tony Hsu.