Bazel Blog

Bazel 2.0

A new major version of Bazel, Bazel 2.0 has just been released. In particular, it brings some important flag flips that did not make it into Bazel 1.0.

Incompatible changes

Bazel 2.0 is a new major release and brings the following incompatible changes.

Aquery

  • Proto v2 for aquery proto output formats, which reduces the output size compared to v1, guarded behind the flag --incompatible_proto_output_v2. This proto format is still experimental and subject to further changes.

Platforms

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 <WORKSPACE>/.bazelversion files and the $USE_BAZEL_VERSION environment variable. This is similar to what Bazelisk offers, 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.