Bazel 2.2 has just been released.
Bazel 2.2 is intended to be backward-compatible with Bazel 2.0. There are no known breaking changes in this release.
Incompatible changes
- The following flags have been removed, as they were flipped in previous
releases:
-
--incompatible_windows_bashless_run_command
-
--incompatible_windows_native_test_wrapper
-
--incompatible_disallow_dict_lookup_unhashable_keys
-
--incompatible_remap_main_repo
-
--incompatible_disallow_unverified_http_downloads
-
- The following incompatible flags have been added:
cquery
- cquery's
config()
now supports arbitrary configurations. - When using cquery,
//foo:bar
now means "all configured targets with label//foo:bar
" instead of "choose an arbitrary configured target with label//foo:bar
".
External Repositories
-
WORKSPACE
andBUILD.bazel
files ofhttp_archive
repositories can now be patched using thepatch_cmds
andpatches
attributes. - Flags that affect external repositories like
--override_repository
can now be addressed inbazelrc
files using thecommon
command, without causing commands likebazel shutdown
to fail.
Starlark
- The
--starlark_cpu_profile=
flag writes a profile in pprof format containing a statistical summary of CPU usage by all Starlark execution during the bazel command. Use it to identify slow Starlark functions in loading and analysis.
Windows
- We now discourage running Bazel from MSYS2 because of a newly found bug (#10573)
Other changes
- Actions with
parse
on the critical path should no longer finish in the future. - Reduced the packaging time (package-bazel.sh) for the
//src:bazel-dev
Bazel development build target from 14s to 6s. Use//src:bazel-dev
if you're iterating rapidly on a local Bazel changes, and use//src:bazel
with--compilation_mode=opt
for release builds.
This release contains contributions from many people at Google, as well as Alessandro Patti, Alex Kirchhoff, Artur Dryomov, Benjamin Peterson, David Ostrovsky, Elliotte Rusty Harold, Eric Klein, George Chiramel, George Gensure, Guillaume Bouchard, Hui-Zhi, John Millikin, Jonathan Springer, Michael McLoughlin, Nikolaus Wittenstein, Nikolay Shelukhin, Yannic Bonenberger, aman, nikola-sh.