has just been released.
Bazel 2.1 is intended to be backward-compatible with Bazel 2.0. However it contains a single incompatible change that was deemed a bug fix and thus eligible for inclusion. We haven’t found any code broken by this change, but if it causes any burden to you.
- The following attributes of
CcToolchainProvider, which formerly were accessible both as fields
x.fand as methods
x.f(), are now only fields:
x.f()is now equivalent to
y=x.f; y(). That is,
x.fshould return the same attribute value regardless of whether it is accessed as a field or called like a method. Any arguments to the call are evaluated after the
- Keyword-only arguments are now allowed:
python def foo(a, *, k): pass def foo(a, *b, k): pass foo(5, k = 6) # k can be specified only by keyword
- A new boolean field
ctx.target_platform_has_constraintis added to allow rules to check the target platform's constraints.
- Similar to the .bazelignore in the main repository, a .bazelignore file in external repository now causes the specified directories to be ignored by Bazel. Bazel doesn't try to identify any packages under the directories, but the files can still be referenced in other BUILD files.
.bazelignorefiles now support line comments, e.g.
# this is a comment.
- Experimental support for d8 merger is now available for use using
RoleManager#addRoleHolderAsUsernow supports desugaring.
- Total critical path runtime will not be longer than total execution runtime.
- A new
BuildEventProtocolmessage is added for listing the convenience symlinks that get created in the workspace (such as
bazel-out). Enable it with the
cquery 'somepath(...)'returns more reliable results when the dependency has a different configuration than the parent. To get a result for
//barisn't in the top-level configuration, run your query with
--universe_scope=//foo. See cquery docs for details.
- P.J. McNerney wrote a new book: .
- Oreilly published a report: by Benjamin Muschko.
rules_nodejsmade its .
- Judah Jacobson published , a tool that lets you interactively develop Haskell code. It uses Bazel to compile your code's dependencies, and then loads your modules into an interpreter.
- The Bazel Community Experts page has been updated.
- BazelCon 2019: The video recordings have been posted. VMWare open-source team shared their , and about it. thundergolfer shared about BazelCon talks.
This release contains contributions from many people at Google, as well as Adam Liddell, Alessandro Patti, Andreas Herrmann, Bor Kae Hwang, Brian Silverman, Emran BatmanGhelich, George Gensure, Jeff Palm, Jonathan Beverly, Mark Nevill, Patrick Niklaus, Peter, Ryan Beasley, Shin Yamamoto, and Yen-Chi Chen.