We’ve just released Bazel 0.28! Bazel 0.28 is intended to be backward-compatible with Bazel 0.27. Please report any update problem.
Note: there is a known issue when using Bazel 0.28.0 with the IntelliJ/CLion/Android Studio plugins. Please update to 0.28.1 to resolve the issue. See the tracking issue for more information.
Starlark
- The flag
--incompatible_restrict_escape_sequencesis added. This will affect escape sequences in Starlark strings. - The
outputsparameter of therule()function is deprecated and attached to flag--incompatible_no_rule_outputs_param. Migrate rules to useOutputGroupInfoorattr.outputinstead. See migration notes for more information. - Attribute names are going to be restricted and must be syntactically valid identifiers.
- The
infocommand now supports thestarlark-semanticsargument, which outputs a representation of the effective Starlark semantics option values. - The
commandparameter of theactions.run_shell()function will be restricted to only accept strings (and not string sequences). This check is attached to flag--incompatible_run_shell_command_string. One may migrate by using theargumentsparameter ofactions.run()instead. See migration notes for more information.
Android
-
aapthas been marked as a deprecated value for theaapt_versionattribute onandroid_binaryandandroid_local_test. Please useaapt2instead for faster incremental resource processing and smaller APKs. Bazel will switch to aapt2 by default at Bazel 1.0. - Fixed treatment of
<dist:module />tags in AndroidManifest.xml. - Fixed treatment of AndroidManifest.xml attributes which contained XML escaping.
- Fixed asset precedence for
android_binaryrules with aapt2.
Java
-
@bazel_tools//tools/jdk:toolchain_java10and@bazel_tools//tools/jdk:toolchain_java11are now available to enable java 10, respectively java 11 language level support. -
--incompatible_load_java_rules_from_bzlwas added to forbid loading the native java rules directly. See more on tracking issue #8746
C++
- Bazel's C++ autoconfiguration now understands
BAZEL_LINKLIBSenvironment variable to specify system libraries that should be appended to the link command line. -
--incompatible_disable_nocoptsflag has been added. - The runtime dynamic libraries are no longer in default output group of
cc_binary. - The experimental flag
experimental_link_compile_output_separatelyis removed. The same behavior is available through the featuredynamic_link_test_srcs. - Set the FDOBuildType as CSFDO for binaries built with
--cs_fdo_absolute_path.
Configurations
- Turn on
--experimental_build_setting_apiby default to allow user-defined build settings. - The incompatible change
--incompatible_use_platforms_repo_for_constraintshas been added.
Remote Execution
- All known issues (#8646, #8385) of "Builds without the Bytes" have been fixed.
- “Builds without the Bytes” now supports the Build Event Service (BES).
- The dynamic spawn strategy is now supported by remote execution.
Other changes
- Bazel now supports hiding compiler warnings for targets that you're not explicitly building. See the flag
--auto_output_filter. - Add
--incompatible_enable_profile_by_defaultto enable the JSON profile by default. - When
--incompatible_strict_action_envis enabled, the defaultPATHnow includes/usr/local/bin. - Paths under the execution root starting with
.or_will be re-linked across builds - Bazel now officially supports running on CentOS 7.
- Bazel can now be bootstrapped and built on arm64 platforms without requiring any flags or patches.
Community
- Grakn published Bazel rules for assembling and deploying software distributions.
- Dan Frank created databazel - build rules for executing machine learning workflows.
- Lewis Hemens from Dataform wrote an article about Building a TypeScript monorepo with Bazel.
This release contains contributions from many people at Google, as well as Ben Diuguid, Benjamin Peterson, Dave Lee, Loo Rong Jie, Mark Butcher, Marwan Tammam, and Pedro Alvarez.