Bazel Blog

Bazel 2.2

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


  • 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 and BUILD.bazel files of http_archive repositories can now be patched using the patch_cmds and patches attributes.
  • Flags that affect external repositories like --override_repository can now be addressed in bazelrc files using the common command, without causing commands like bazel shutdown to fail.


  • 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.


  • 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 ( 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.