Bazel Blog

Bazel 0.28

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 with the IntelliJ plugin. Please see the tracking issue for updates. A patch release containing the fix will be shipped shortly.

Starlark

  • The flag --incompatible_restrict_escape_sequences is added. This will affect escape sequences in Starlark strings.
  • The outputs parameter of the rule() function is deprecated and attached to flag --incompatible_no_rule_outputs_param. Migrate rules to use OutputGroupInfo or attr.output instead. See migration notes for more information.
  • Attribute names are going to be restricted and must be syntactically valid identifiers.
  • The info command now supports the starlark-semantics argument, which outputs a representation of the effective Starlark semantics option values.
  • The command parameter of the actions.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 the arguments parameter of actions.run() instead. See migration notes for more information.

Android

  • aapt has been marked as a deprecated value for the aapt_version attribute on android_binary and android_local_test. Please use aapt2 instead 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_binary rules with aapt2.

Java

  • @bazel_tools//tools/jdk:toolchain_java10 and @bazel_tools//tools/jdk:toolchain_java11 are now available to enable java 10, respectively java 11 language level support.
  • --incompatible_load_java_rules_from_bzl was added to forbid loading the native java rules directly. See more on tracking issue #8746

C++

  • Bazel's C++ autoconfiguration now understands BAZEL_LINKLIBS environment variable to specify system libraries that should be appended to the link command line.
  • --incompatible_disable_nocopts flag has been added.
  • The runtime dynamic libraries are no longer in default output group of cc_binary.
  • The experimental flag experimental_link_compile_output_separately is removed. The same behavior is available through the feature dynamic_link_test_srcs.
  • Set the FDOBuildType as CSFDO for binaries built with --cs_fdo_absolute_path.

Configurations

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_default to enable the JSON profile by default.
  • When --incompatible_strict_action_env is enabled, the default PATH now 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

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.