Bazel 3.0 is a new major release and brings the following incompatible changes:
Incompatible Changes
The following incompatible flags are now enabled by default:
-
--incompatible_remove_ram_utilization_factor
-
--incompatible_remove_local_resources
-
--incompatible_load_proto_toolchain_for_javalite_from_com_google_protobuf
-
--incompatible_always_check_depset_elements
-
--incompatible_remove_enabled_toolchain_types
-
--incompatible_validate_top_level_header_inclusions
Before upgrading to Bazel 3.0, you can test your build with Bazel 2.2 and the flags above. We expect that the migration to Bazel 3.0 will be simple for most users. Please comment on the corresponding incompatible flag issue if any of the flags causes migration problems, or open a new issue if you have other problems.
New Incompatible Changes
- Adds
--incompatible_objc_compile_info_migration
to indicate whether native Objective C/C++ rules should assume compile info has been migrated toCcInfo
.
Java
- Using JDK 9 or 10 as a
--host_javabase
is no longer officially supported. As always, you can use the@bazel_tools//tools/jdk:toolchain_vanilla
Java toolchain to use older or newer JDKs than what Bazel currently supports.
C++
- Introduce flag
--incompatible_require_linker_input_cc_api
which changes the C++ Starlark API for linking contexts, libraries to link and linker inputs. Disabled by default in this release.
Other important changes
-
--fatal_event_bus_exceptions
is deprecated and should not be used. Any crashes should be reported so that they can be fixed. - Actions' primary output details are now available in the JSON profile and
analysis_v2.proto
. New flag:
--incompatible_applicable_licenses
- Default to false
- Enables a global rule attribute
applicable_licenses
and a newpackage
attributedefault_applicable_licenses.
Both are label lists. - This is an incompatible change because rules using those attribute names may now have different behavior.
- For a description of how these attributes can be used, see: Design proposal: License Checking with Bazel
Reading the old-style binary profile format is no longer supported, use the new JSON trace profile instead.
Community update
- Jonathon Belotti has been working on bazel-linting-system, an experimental system for registering, configuring, and invoking source-code linters in Bazel.
- Jingwen Chen and Greg Estren have created a glossary for Bazel. Contributions are welcome.
- Filip Nikolovski made some recommendations for improving Bazel Performance in a CI Environment.
- John Ward shared some thoughts on When to use Google's Bazel build tool (with Remote Execution).
This release contains contributions from many people at Google, as well as Alessandro Patti, Benjamin Peterson, Christy Norman, Dave Hughes, David Haxton, David Neil, George Chiramel, George Gensure, Gibson Fahnestock, Jason Hoch, John Millikin, Jonathan Springer, Keith Smiley, Yannic Bonenberger, Yihong Wang, Yuchen Dai, and garyschulte.