The Bazel team is happy to announce a new version of Bazel, Bazel 0.22.
Breaking changes
Upcoming changes
This release is a migration window for the following changes.
--incompatible_disallow_data_transition
--incompatible_dont_emit_static_libgcc
--incompatible_linkopts_in_user_link_flags
--incompatible_disable_genrule_cc_toolchain_dependency
--incompatible_disable_legacy_crosstool_fields
--incompatible_use_aapt2_by_default
--incompatible_disable_runtimes_filegroups
--incompatible_disable_legacy_cc_provider
--incompatible_require_feature_configuration_for_pic
--incompatible_disable_expand_if_all_available_in_flag_set
--incompatible_disable_legacy_proto_provider
--incompatible_disable_proto_source_root
General Changes
https://docs.bazel.build now supports versioned documentation. Use the selector at the top of the navigation bar to switch between documentation for different Bazel releases.
set
projectId
in allPublishBuildToolEventStreamRequest
Android
mobile-install now works with aapt2. Try it out with
bazel mobile-install --android_aapt=aapt2 //my:target
Fixed issues with mobile-install v1 when deploying to Android 9 Pie devices. https://github.com/bazelbuild/bazel/issues/6814
Fixed issue where error messages from Android manifest merging actions were not fully propagated.
New incompatible change flag
--incompatible_use_aapt2_by_default
for defaulting to aapt2 in Android builds has been added. To build with aapt2 today, pass the flag--incompatible_use_aapt2_by_default=true
or--android_aapt=aapt2
, or set theaapt_version
toaapt2
on yourandroid_binary
orandroid_local_test
target.Fixed mobile-install v1 error when installing an app with native libraries onto an Android 9 (Pie) device. See https://github.com/bazelbuild/examples/issues/77
Fixed a mobile-install bug where
arm64-v8a
libraries were not deployed correctly onarm64
devices. This was done by enabling incremental native lib deployment by default. A previously undocumented--android_incremental_native_libs
flag is removed, and is now the regular behavior. See https://github.com/bazelbuild/bazel/issues/2239
Apple
The
objc_bundle
rule has been removed. Please migrate to rules_apple's applebundleimport.The
apple_stub_binary
rule has been deleted.The
--xbinary_fdo
option that passes xbinary profiles has been added.
C++
cc_toolchain.(static|dynamic)_runtime_libs
attributes are now optional
Packaging
build_tar.py
intools/build_defs/pkg
now supports a JSON manifest that can be used to add paths that have symbols that can't be specified via the command line
Query
Filtering of inputs, outputs, and mnemonic filtering have been added to aquery.
The aquery and cquery query2 tests have been open-sourced.
The Bazel query how-to recommends ":*" instead of ":all", because "all" might be the name of a target.
Testing
The
--runs_per_test
has been placed in the TESTING documentation category.A a clarifying message has been added to test case summary output when all test cases pass but the target fails.
Contributors
This release contains contributions from many people at Google, as well as Benjamin Peterson, Dave Lee, George Gensure, Gert van Dijk, Gustavo Storti Salibi, Keith Smiley, Loo Rong Jie, Lukasz Tekieli, Mikhail Mazurskiy, Thi, Travis Cline, Vladimir Chebotarev, and Yannic.