We’ve just released Bazel 0.29! Bazel 0.29 is intended to be backward-compatible with Bazel 0.28 and 0.27, and will be the final release before Bazel 1.0.
Following our backward compatibility policy, Bazel 1.0 will introduce some breaking changes. Please follow "Updating Bazel" guide to prepare your project for those changes.
Please report any update problems.
Starlark
-
repository_ctx.read
can now read files from anywhere on the system, and not just within the repository rule context. - A new incompatible flag
--incompatible_disallow_unverified_http_download
has been added that disallows downloads viahttp
(as opposed tohttps
) unless a checksum is given. The flag will be flipped in Bazel 1.0 (but remain present throughout the 1.x cycle). To migrate, add a known-good checksum or at least onehttps
source for downloading the file. - A new incompatible flag
--incompatible_disable_target_provider_fields
removes the ability to access a target's providers via the field syntax (for example,ctx.attr.dep.my_provider
). The provider-key syntax should be used instead (for example,ctx.attr.dep[MyProvider]
).
Execution
- Added two new tags to better control remote caching/execution:
no-remote-cache
andno-remote-exec
. Read the docs for details. - The docker sandbox and the execution log now respect
--remote_default_platform_properties
. - The platform attribute
remote_execution_properties
has been deprecated in favor of the newly introducedexec_properties
attribute.
Java
- We fixed remote execution on Windows for the Java rules. See #8614.
- You can now use a new
java_toolchain
target@remote_java_tools_<PLATFORM>//:prebuilt_toolchain
(where<PLATFORM>
is one ofdarwin
,linux
, orwindows
) in your builds. The new toolchain uses only pre-built tools, including singlejar and ijar, even on remote execution. The prebuilt toolchain should be used only when host and execution platform are the same, otherwise the binaries will not work on the execution platform. -
java_common.compile
supports specifyingannotation_processor_additional_inputs
andannotation_processor_additional_outputs
. The API for the Java compilation action enables supporting annotation processors that consume or produce artifacts.
Android
- The Android NDK is now integrated with toolchains. To use them, pass the
--extra_toolchains=@androidndk//:all
flag or register them in your WORKSPACE withregister_toolchains("@androidndk//:all")
. Learn more here. - There is now documentation on optimizing Android app build performance. Read it here.
Python
- Added
--incompatible_load_python_rules_from_bzl
, which will be flipped in a future Bazel version. To migrate, load Python rules from@rules_python
. See #9006.
Other
- Add new incompatible flag
--incompatible_load_proto_rules_from_bzl
to forbid loading the native proto rules. For migration instructions, see tracking issue #8922 -
rule_test
: fix Bazel 0.27 regression ("tags" attribute was ignored, #8723) - The
objc_proto_library
rule has been deleted from Bazel. -
@build_tools/tools/build_defs/pkg:pkg_deb
,:pkg_rpm
, and:pkg_tar
are documented as deprecated. These features are now available independently of Bazel releases on therules_pkg
repository. The original rules will continue to exist until Bazel 2.0. - Added a new flag
--//tools/build_defs/pkg:incompatible_no_build_defs_pkg
to forbid loading rules from//tools/build_defs/pkg:pkg_deb
,:pkg_rpm
, and:pkg_tar
. - Stdout and stderr are checked to determine if output is going to a terminal.
--is_stderr_atty
is deprecated and--isatty
is undeprecated. -
genrule
now supportscmd_bash
,cmd_ps
, andcmd_bat
attributes. Find more details here.
Community
- Li Haoyi from Databricks wrote about Fast Parallel Testing at Databricks with Bazel on their journey on reducing PR wait times for CI from ~3 hours with SBT to ~40 minutes with Bazel.
- Alex Eagle recorded screencasts on writing Bazel rules for Stylus (tweet, screencasts)
- Alex Eagle talked about Bazel on the Adventures in Angular 247 podcast.
- Vamsi Vempati wrote Angular 8 - Bazel Walkthrough.
- Wassim Chegham talked about Bazel for Angular developers at Angular In Depth 2019.
This release contains contributions from many people at Google, as well as Alexander Ilyin, Arek Sredzki, Artem Zinnatullin, Benjamin Peterson, Fan Wu, John Millikin, Loo Rong Jie, Marwan Tammam, Oscar Bonilla, Peter Mounce, Sergio Rodriguez Orellana, Takeo Sawada, and Yannic Bonenberger.