The Bazel team is happy to announce a new version of Bazel, Bazel 0.20.
With this release, we communicate breaking changes following our communication policy.
--incompatible_remove_native_http_archive--incompatible_remove_native_git_repository--incompatible_disable_cc_toolchain_label_from_crosstool_proto--incompatible_disable_depset_in_cc_user_flags--incompatible_disable_cc_configuration_make_variables--incompatible_disallow_conflicting_providers--incompatible_range_type
Changes for which 0.20 is a migration window are marked with GitHub label 'migration-0.20'
Breaking changes in the next release (0.21) are marked with GitHub label 'breaking-change-0.21'
General Changes
- (Linux only) Bazel now shuts down when idle for 5 minutes and the system is low on RAM.
- We're deprecating
--genrule_strategy=<value>with the intent of removing it in early 2019; please use--strategy=Genrule=<value>instead (see #6760). - Bazel now queryies remote server Capabilities (per REAPI v2)
- Use different server log files per Bazel server process; java.log is now a symlink to the latest log.
- The code coverage report now includes the actual paths to header files instead of the ugly, Bazel generated, virtual includes path.
- Bazel sorts remote Platform properties for remote execution.
C++
- The
--experimental_no_dotd_scanning_with_modulescommand line argument is not supported anymore. - The
--prune_cpp_modulescommand line option is not supported anymore. - The
--experimental_prune_cpp_input_discoverycommand line option is not supported anymore. - All
cc_toolchainsdepended on fromcc_toolchain_suite.toolchainsare now analyzed when not using platforms in order to select the rightcc_toolchain. - CROSSTOOL file is now read from the package of
cc_toolchain, not from the package ofcc_toolchain_suite. This is not expected to break anybody sincecc_toolchain_suiteandcc_toolchainare commonly in the same package. - All
cc_toolchainsdependent on fromcc_toolchain_suite.toolchainsare now analyzed when not using platforms in order to select the rightcc_toolchain.
Java
- The
--explicit_jre_depsflag is removed. - If the
--javabaseflag is unset, Bazel locates a JDK using theJAVA_HOMEenvironment variable and searching the PATH. If no JDK is found,--javabaseis empty and builds targeting Java will not be supported. Previously Bazel would fall back to using the embedded JDK as a--javabase, but this is no longer default behaviour. A JDK should be explicitly installed instead to enable Java development.
Android
- Added support for Android NDK r18.
- Make legacy-test-support (
legacy_test-<api-level>) fromandroid_sdk_repositoryneverlink. The legacy test support libraries shouldn't be built into test binaries. To make them available at runtime, developers should declare them via uses-library.
Starlark
- All overrides of Starlark's
ctx.new_filefunction are now deprecated. Try the--incompatible_new_actions_apiflag to ensure your code is forward-compatible. - The function
attr.licenseis deprecated. It can be disabled now with--incompatible_no_attr_license. - The 'default' parameter of
attr.outputandattr.output_listhas been removed. This is controlled by--incompatible_no_output_attr_default - A number of platform-related Starlark APIs which were previously
marked "experimental" are now disabled by default, and may be
enabled via
--experimental_platforms_api
Community
- Jetbrains published a Bazel plugin for the TeamCity CI system.
- Tony Aiuto talked about Bazel in a Google Cloud Platform postcast.
- Martin Probst made a presentation of Bazel at AngularConnect 2018, called “Why you need a build system, and why it should be Bazel”.
- Minko Gechev wrote a blog post about how to build TypeScript projects with Bazel.
- Torgeir Helgevold wrote about Remote Build Execution With Bazel And Svelte.
- Matteo Di Lena started a new rule for building Maya plugins.