What’s new in Bazel 5.0
Bazel 5.0 includes nearly 3,000 changes since 4.2.2.[1] It’s the first major release since 4.0 was released in January of last year, and it’s Bazel’s second LTS release. Since there were so many changes, many of them quite impactful, I felt I needed to review them all and provide a nice summary for y’all. So that’s what I did 😄.
The end result was quite big though, so I’ve included a table of contents to allow easy navigation to the changes that interest you the most:
Command-line flag changes
Bazel’s LTS strategy allows for breaking changes between major versions. In particular, it allows for command-line flags to be removed, renamed, made to do nothing, or have their default values changed. In the following sections I collected all such flag changes I could find.
Renamed
--incompatible_use_lexicographical_unordered_outputis now--incompatible_lexicographical_output. (2ee3c2b)--experimental_run_validationsis now--run_validations. (374cb1f)--experimental_existing_rules_immutable_viewis now--incompatible_existing_rules_immutable_view. (3518200)--project_idis now--bes_instance_name. (2b48c6b)
Default Values Changed
--analysis_testing_deps_limit=800(de3b3ca)--experimental_enable_aggregating_middleman=false(64d5bae)--experimental_exec_groups=true(fa4e14b)--experimental_forward_instrumented_files_info_by_default=true(5b216b2)--experimental_jlpl_enforce_strict_deps=true(0c1257e)--experimental_no_product_name_out_symlink=true(06bd3e8)--experimental_profile_cpu_usage=true(f56b134)--experimental_skyframe_cpu_heavy_skykeys_thread_pool_size=HOST_CPUS(38dd8aa)--include_aspect=true(44e46b8)--incompatible_disable_depset_items=true(ef967be)--incompatible_disallow_resource_jars=true(fec2fdb)--incompatible_disallow_strict_deps_for_jlpl=true(10b3479)--incompatible_display_source_file_location=true(32721fb)--incompatible_java_common_parameters=true(cfaa88b)--incompatible_override_toolchain_transition(4b47d6f)--incompatible_require_javaplugininfo_in_javacommon=true(1c062e2)--incompatible_top_level_aspects_dependency=true(9a765c8)--incompatible_use_toolchain_resolution_for_java_rules=true(c2485f6)--trim_test_configuration=true(ebac27e)
Deprecated
--bep_publish_used_heap_size_post_build(a512791)--experimental_force_gc_after_build(ae2a6a2)--experimental_required_aspects(88a02cd)--{,no}experimental_send_archived_tree_artifact_inputs(37115a5)--experimental_spawn_scheduler(b41576b)--watchfs(03bd0eb)
No-op
These flags now do nothing, but still exist to allow for migration off of them:
--all_incompatible_changes(7300231)--bep_publish_used_heap_size_post_build(d9a523e)--check_constraint(d623892)--experimental_cc_skylark_api_enabled_packages(ba258e8)--experimental_force_gc_after_build(cdeb49f)--{experimental_,}json_trace_compression(8d39164)--experimental_shadowed_action(3e8cda1)--experimental_skyframe_eval_with_ordered_list(35ef799)--experimental_starlark_config_transitions(6619d77)--experimental_multi_threaded_digest(6ac6954)--experimental_profile_cpu_usage(3c5e531)--incompatible_applicable_licenses(af3add8)--incompatible_dont_collect_so_artifacts(144a62a)--incompatible_load_python_rules(253933f)--incompatible_use_toolchain_resolution_for_java_rules(5b8f054)--legacy_dynamic_scheduler(5b04895)--use_singlejar_apkbuilder(b213637)
Removed
--apple_sdk(166771e)--bep_publish_used_heap_size_post_build(6555d95)--enable_apple_binary_native_protos(3135f49)--enable_runfiles(5a91c25)--experimental_dynamic_configs(e68a7d0)--experimental_enable_aggregating_middleman(e956469)--experimental_exec_groups(3973b5f)--experimental_forward_instrumented_files_info_by_default(c411d9a)--experimental_interleave_loading_and_analysis(544b51d)--experimental_nested_set_as_skykey_threshold(359ceb4)--experimental_no_product_name_out_symlink(b621b1b)--experimental_objc_enable_module_maps(427b4dd)--experimental_query_failure_exit_code_behavior(c1695ef)--experimental_starlark_config_transitions(28a1e6e)--experimental_ui_mode(5752762)--incompatible_enable_execution_transition(f0c6eab)--incompatible_ignore_duplicate_top_level_aspects(ed25118)--incompatible_objc_compile_info_migration(bcdd55d)--incompatible_objc_provider_remove_compile_info(952c0d7)--incompatible_prefer_unordered_output(e7202e3)--incompatible_prohibit_aapt1(aefd107)--incompatible_require_java_toolchain_header_compiler_direct(f9db4fb)--is_stderr_atty(4d9c6f9)--javabaseand--java_toolchain(e1c404e)
Remote
One of Bazel’s most powerful features is its ability to use remote caching and remote execution. Numerous improvements and fixes to Bazel’s remote capabilities are included in Bazel 5.0.
gRPC
Bazel uses gRPC as a protocol for most of its remote capabilities. There were a couple changes that applied at this foundational level:
- Added mnemonic and label to remote cache and remote execution requests. (a750a56)
- Bazel no longer crashes on errors returned while creating a gRPC connection. (b0ae0af)
Remote caching (RBC)
Using a remote cache is one of the most popular ways of speeding up a Bazel build. Thankfully these changes make using a remote cache both more performant and more reliable:
- Added the
--experimental_remote_cache_compressionflag, which compresses gRPC uploads/downloads. (50274a9) - Added the
--experimental_remote_cache_asyncflag, which makes uploads happen in the background. (7f08b78) - Added the
--experimental_remote_merkle_tree_cacheflag, which can speed up action cache hit checking. (3947c83) - Added the
--experimental_action_cache_store_output_metadataflag, which can speed up Remote Build without the Bytes after a Bazel server restart. (4e29042) - Added the
no-remote-cache-uploadtag, which allows downloading, but not uploading, outputs from the remote cache. (bfc2413) - Reduced
FindMissingBlobscalls when using a combined cache. (dc32f0b) FindMissingBlobscalls and file uploads are now deduplicated. (db15e47)- Fixed “file not found” errors when remote cache is changed from enabled to disabled. (f948989)
chmod 0555is now consistently set on outputs. (11066c7)
Remote execution (RBE)
For some projects, using remote execution is the ultimate performance unlock for their Bazel builds. In addition to the remote caching changes covered above, which also apply to remote execution, the following changes improve the remote execution experience:
- Added the
--experimental_dynamic_skip_first_buildflag, which skips dynamic execution until there has been a successful build. (1e42b94) - Improved debug output when using the
--experimental_debug_spawn_schedulerflag. (060d596) - Improved performance of workers when using dynamic execution. (6080c1e)
- Improved dynamic execution’s local execution delay logic. (04754ef)
- The disk cache can now be used with remote execution. (cf57d03)
- Target-level
exec_propertiesnow merge with values from--remote_default_exec_properties. (713abde) - Failure messages from remote execution are now propagated. (399a5be)
Build Event Service (BES)
Using a build event service can give you unparalleled insight into your Bazel builds at scale. There were some nice changes to BES support, though I think the improvements to how it interacts with the remote cache are especially noteworthy.
- Added the
--incompatible_remote_build_event_upload_respect_no_cacheflag, which prevents the BES uploader from uploading the outputs of actions that shouldn’t be cached remotely. (bfc2413) - Added the
--bes_headerflag, which allows passing extra headers to the BES server. (ef42d13) - Added logging when a blob upload isn’t uploaded in time. (71b50f6)
- The
--build_event_binary_fileflag now implies--bes_upload_mode=wait_for_upload_complete. (62060ba) - BES referenced blobs are no longer stored in the disk cache. (dc59d9e)
- The BES uploader now uses the same code as the remote cache uploader and is now more robust to errors. (e855a26)
- Fixed the BES uploader to handle errors in more edge cases. (c51eb57)
Logging
Bazel offers various ways to gain insight into your build. It’s not too surprising then that there were over 30 changes to these capabilities in Bazel 5.0.
Build Event Protocol (BEP)
The build event protocol is used by build event services, so all of these changes could have also been listed in that section as well. The BEP can also be collected locally with --build_event_json_file and --build_event_binary_file.
The vast majority of changes added additional information to the BEP, though some are fixes and improvements:
- Added
cumulative_metricsfield toBuildMetrics. (77a980f) - Added
worker_metricsfield toBuildMetrics. (c674101) - Added
action_datafield toBuildMetrics.ActionSummary. (f572d3b) - Added
source_artifact_bytes_readfield toBuildMetrics.ActionSummary. (0a23a5e) - Added
analysis_phase_time_in_msfield toBuildMetrics.TimingMetrics. (34b2947) - Added
garbage_metricsfield toBuildMetrics.MemoryMetrics. (8965d25) - Added count and size of output files and top-level files seen during a build to
BuildMetrics.ArtifactMetrics. (dd8afa0) - Added
incompletefield toTargetComplete.OutputGroup. (3e1ba0c) - Added the
--experimental_bep_target_summaryflag, which adds theTargetSummary event, which is intended to summarize allTargetComplete(including for aspects) andTestSummarymessages for a given configured target. (8d48154) - Added
attempt_countfield toTestSummary. (766cd0e) - Added test suite expansions. (7fb0c16)
- Added conflicting action output reporting. (2487920)
- Replaced
remote_cache_hitsfield with a more detailedrunner_count. (f880948) - Timestamps and durations now use Well Known Types. (e5c832a)
- Improved reporting of Starlark build settings. (bf31feb)
- The
used_heap_size_post_buildfield is now populated when the--memory_profileflag is set. (3d58523) - Made
--bep_publish_used_heap_size_post_buildwork forqueryand other non-buildcommands. (1c3bc90) - You can now assume the
named_set_of_filesevent will appear before any event referencing thatnamed_setby ID; this allows consumers to process the files for such events (eg.TargetCompleted) immediately. (fcf9dd5) - The BEP now includes all files from successful actions in requested output groups; previously, an output group’s files were excluded if any file in the output group was not produced due to a failing action. (d2f93fd)
Timing profile
The action timing profile, which is enabled by default with --profile, is viewable both locally in Chrome and on build event services. These changes add more detail and clarity to the profile:
- Added server heap usage. (f4fbbd6)
- Added system CPU and memory metrics. (ec2eda1)
- Added file system traversal tracing. (45d82ca)
- Added
mobile-installtracing. (559db4e) - Added worker execution tracing. (786b418)
- Renamed action count field from
cputoaction. (c5f87ea) - Renamed “grpc-command” and “Service Thread” threads to “Main Thread” and “Garbage Collector”. (a03674e)
- The profile now mentions when an action is acquiring resources. (fa9fabb)
Execution log
Bazel logs all of the spawns it executes in the execution log, which is enabled with the --execution_log_json_file or --execution_log_binary_file flags. This feature is relatively stable, with just a single noticeable change:
- Added wall time duration. (f92d80c)
Query
bazel build wasn’t the only command to get improvements in this release. Here are some changes that were made to the query family of commands:
- Added the
--incompatible_lexicographical_outputflag (on by default), which lexicographically sorts the output ofquery --order_output=auto. (acbcedd) - Added the
--deduplicate_depsetsflag (on by default) toaquery, which removes duplicate subsets indep_set_of_files. (28ffaa2) - Added
--keep_goingfunctionality to graphlessquery. (a01371a) - Added execution platform information to
aqueryoutput. (11c09c5) - Fixed output of
config_settingvisibility. (5dfffef)
Dependency management
A new (currently experimental) external dependency system, codenamed Bzlmod, was added in Bazel 5.0. Besides for all of the changes needed to support Bzlmod, there was one more notable dependency management related change:
- Added the
--experimental_repository_downloader_retriesflag, which allows Bazel to retry certain repository download errors. (a1137ec)
Platforms and toolchains
The C++, Android, and Apple rules are being migrated to support building with Platforms. While progress has been made, they don’t fully support it yet in Bazel 5.0. For C++ projects, it’s recommended that the --incompatible_enable_cc_toolchain_resolution flag is used, to help the Bazel team discover any issues in the wide variety of projects that exist.
Here are some of the platforms and toolchains related changes which weren’t tied to any of those migrations:
- Added the
--experimental_platform_in_output_dirflag, which causes the output dir name to use a non-default platform name instead of the CPU. (daecf42) target_compatible_withcan now be used with all non-workspace rules. (d052ece)- The
--toolchain_resolution_debugflag now accepts regexes matching targets, as well as toolchain types, when choosing what debug messages to print. (545befb) - The toolchain transition is now enabled for all toolchains. (4b47d6f)
- Progress is being made on changing all
hostconfigurations toexec. (8d66a41)
Execution platforms
Execution platforms are platforms which build tools execute on. These include the host platform on which Bazel runs.
In the following sections I collected notable changes for Linux and macOS. I’m sure there were some for Windows as well, but since I don’t use Bazel on Windows, none of the changes stood out to me as pertaining only to it.
Linux
I only noticed a single change that was directly related to Linux execution:
- Added the
--experimental_use_hermetic_linux_sandboxflag, which configureslinux-sandboxto use achrootenvironment. (11f7d80)
macOS
On the other hand, macOS had a lot of changes related to it:
- Added the
xcode_version_flag.precisionattribute to allow matching a subset of the version components. (7484c98) - Added progress reporting in
xcode_configure. (762f9e2) - Toolchain tools now compile as universal binaries if possible. (de5fc19)
xcode-locatoris now built as a universal binary. (6916fc1)- Sandboxed actions can now run
/bin/ps. (652d1cc) - If
--experimental_prefer_mutual_xcodeis passed, Bazel chooses the local default (instead of the newest mutually available version) if it’s available both locally and remotely. (4bef502) - Generated
xcode_versiontargets now include product version aliases. (f52e218) osx_archs.bzlis now explicitly exported from the crosstool. (aeec9a8)- Fixed typo in the cache directory name. (b5bbe28)
- Fixed
libtoolwith params files. (48dd159) - Fixed the
--experimental_prefer_mutual_xcodeflag not being used correctly for all parts of the build. (bb41ebc) - Fixed a crash when a custom crosstool specifies a
DEVELOPER_DIRenvironment variable. (1811e82) - Fixed JSON output for
xcode-locator. (1bae172)
Target platforms
Target platforms are platforms which you are ultimately building for. I cover the Android and Apple platforms in the following sections, as they still have some functionality provided by Bazel core, instead of being fully supported by standalone Starlark rules.
Android
- Added the
--experimental_run_android_lint_on_java_rulesflag, which causes Java rules to invoke Android Lint. (909bec5) - Added the
android_sdk.legacy_main_dex_list_generatorattribute. (0ccbbde) - Added support for location expansion in the
java_toolchain.android_lint_optsattribute. (1c0194c) - Added support for symlinks in Android SDK repositories. (e41440e)
- The minimum Android build tools version for the Android rules is now 30.0.0. (0e65273)
--apk_signing_methodnow accepts the valuev4. (f9df9d7)- Tags are now propagated to
AndroidBinaryactions. (8f927d2) aapt2 convertis now used instead of relinking final APK as static lib. (8465c17)- The
--no-proguard-location-referenceflag is now passed toaapt2when linking and generating proguard configurations. (705b419) - Made Android Lint worker compatible. (65dc407)
- Made
AarGeneratorActionworker compatible. (64ffc09) - Android Lint validations are now correctly propagated through
android_binary’s split transition. (c6c6389) android_binarynow always uses the bytecode optimizer’s mnemonic. (c381a27)- Fixed Android API level support in NDK crosstools. (b4c637c)
- Fixed
AarResourcesExtractoraction to produce consistent zips. (85ab374) - Fixed
--fat_apk_hwasanwhen using--{,android_}cpuinstead of--fat_apk_cpu. (a38eb75)
Apple
- Added support for the Apple Silicon iOS simulator. (c1ea2d4)
- Added support for the Apple Silicon watchOS simulator. (9c1c622)
- Added the
--host_macos_minimum_osflag. (6345c80) - Added support for LLVM BC files. (f53c389)
- Added the
--incompatible_disable_native_apple_binary_ruleflag, which disables the nativeapple_binaryrule. (65e9732) - When building an iOS target it now defaults to the Apple Silicon iOS simulator when building on an Apple Silicon host. (ca5f67f)
- Made
-c optstrip dead code by default. (3114e80) - Timestamps are now disabled in linking actions. (073ae81)
--apple_bitcode=embeddednow applies tocc_librarytargets. (3439a52)- Removed support for “nodeps” dynamic libraries. (ec55533)
- Lipo operations are now conditional with the
linkMultiArchBinaryApple binary Starlark API. (066fba3) --apple_crostool_topis now preserved in host/exec transitions. (3ece10a)
Languages
While there are lots of programming languages that are supported through standalone Starlark rules, some are still written as “native” rules in Bazel core, or are bundled Starlark rules while Starlarkification is in progress. In the following sections I summarize the notable changes in support of these languages.
C and C++
- Added support for CUDA header file type (.cuh). (c750c52)
- Added
.rlibas an allowed extension for static libraries. (ad03823) - Added support for location expansion in
cc_*.definesattributes. (28fc8a1) - Added the
cc_toolchain.target_transition_for_inputsattribute. (26abd97) - Added native options for
cc_shared_library. (96afa0f) - Added
-ginper_object_debug_infofor Clang 12 and GCC 11. (fa69b78) - Added support for clang’s
libc++to the Unix toolchain. (f1531dc) - Added support for LLD to the Unix toolchain. (00e30ca)
- Added the
external_include_pathsfeature, which disables warnings from external headers. (08936ae) - Added the
--incompatible_enable_cc_test_featureflag, which switches from the use of build variables to the feature of the same name. (c74ae11) - Added the
--experimental_cpp_compile_resource_estimationflag, which estimates precise resource usage for local execution ofCppCompileAction. (f5196e2) - Added the
--experimental_use_cpp_compile_action_args_params_fileflag, which causesCppCompileActionto write exposedaction.argsto a parameters file. (dc914c6) - Added support for Starlark transitions on
--incompatible_enable_cc_toolchain_resolution. (c4357cf) - Added the
dynamic_modeattribute to thecppfragment. (e2915a8) - C++ modules are no longer created if there are no modular headers. (09cba3b)
- Made the
abi_versionandabi_glibc_versionattributes optional for cc toolchains. (9a5bef9) - Made
gcovoptional in cc toolchains. (e8a95ca) - Renamed
target_transition_for_inputstoexec_transition_for_inputsto better reflect the mechanism at play. (5448c7c) - The
oso_prefix_is_pwdfeature now applies to C++ link actions. (9b4844a) - Fixed
CppCompileActionTemplate’s handling of PIC. (0349360) - Fixed build failures when the same shared lib is depended on multiple times. (b571f2c)
- Fixed C++ code coverage when using remote execution. (ab1da7b)
- Fixed a performance issue when
cc_binarydepended oncc_shared_librarytargets. (503d56e) - Fixed a crash when feature configuration or cc toolchain were
None. (d3b3425)
Java
- Upgraded JDK11. (698c17a)
- Removed JDK14. (06f7340)
- Added JDK16. (e2ed2fd)
- Added JDK17. (eb7bf8c)
- Added support for Java versions with a single component. (2a3e194)
- Added support for worker cancellation. (05d0446)
- Added support for record attributes to
ijar. (26229fe) - Added support for sealed class attributes to
ijar. (70ae390) - Added the
--host_jvmoptflag. (570f019) - Added the
javabuilder_dataandturbine_dataattributes tojava_toolchain. (a1b19df) - Added the
http_jar.downloaded_file_pathattribute. (15b1840) - Added mnenomic tags for java toolchain actions. (120ea6c)
- Added
java_outputstoJavaPluginInfo. (f73e28c) - Java rules now use toolchain resolution.
- Java branch coverage now applies Jacoco’s coverage filters. (065e2e8)
- The local JDK is now attached to
JVM8_TOOLCHAIN_CONFIGURATION. (7e48642) - Only JDK repositories that are needed are downloaded now. (903c272)
java_testnow has therequires-darwinexecution requirement on macOS. (ca39c05)- Removed
ABSOLUTE_JAVABASE. (2a07fed) - Removed the
jarFiles,resourcesandsourceJarsForJarFilesattributes fromJavaSourceInfoProvider. (34cfab5) - Removed the
JavaInfo.add_compile_time_jdepsandcompile_time_jdepsattributes. (4d54234)
Objective-C
- Added support for location expansion in the
objc_library.coptsattribute. (d966a0d) - Swift module maps are no longer generated in
objc_libraryandobjc_importtargets. (31bec27) - Removed the
generate_dsymmethod from theobjcfragment. (1bf5843)
Rules authoring
Bazel’s extensibility is powered by the ability to write custom rules. Most rules used in a project will be provided by open source rule sets, but projects may also define rules themselves. Bazel 5.0 includes numerous changes that make custom rules more performant, easier to write, or even expand what is possible to do with them.
Aspects
Aspects allow augmenting build dependency graphs with additional information and actions. These changes expanded their capabilities:
- Added the
--experimental_enable_aspect_hintsflag,](https://github.com/bazelbuild/bazel/commit/60ebb105dbf34f0b267ea7573157246b4c9bfcaf) [which adds theaspect_hintsattribute to rules. (a2856bf) - Added the
--experimental_required_aspectsflag, which allows aspects to depend on other aspects. (f8c3408) - Added the
--incompatible_top_level_aspects_dependencyflag, which allows top-level aspect dependencies. (ed25118) - When using the
--allow_analysis_failuresflag (for example, viabazel-skylib’sanalysistestwithexpect_failure = True), analysis-time failures in aspect implementation functions will now be propagated and saved inAnalysisFailureInfo, just like analysis-time failures in rules. (020dd5f)
Persistent workers
Persistent workers improve build performance by sending multiple requests to long-running processes. Here are some notable changes to persistent worker support:
- Added support for worker cancellation. (e0d6f8b)
- Added the
verbosityfield to the worker protocol, primarily controlled by the--worker_verboseflag. (40d3363) - JSON based workers now have their requests formatted according to the ndjson spec. (299e50a)
Starlark
As mentioned at Bazelcon, progress is being made on migrating natives rules out of Bazel and into standalone Starlark rules. In the Bazel 5.0 release progress was made on the Android, C++, Java, and Objective-C rules.
In addition to changes directly needed for Starlarkification, for which there were many and I’m not going to list them here, the Starlark language itself received performance and feature improvements:
- Added support for nested
defstatements. (5ca2064) - Added support for lambda expressions. (50ce3f9)
- Added support for
allow_closurein theargs.add_allandargs.add_joinedmethods. (6e0050d) - Added support for augmented field assignment (
y.f += x). (fbbac6b) - Added support for
%x,%X, and%oconversions instring % number. (99b7226) - Added 64-bit integer support to
StarlarkInt.{floordiv,mod}. (3e45967) - Added support for some subsitutions in action progress messages. (bfa3643)
- Added support for string build settings which accept multiple values. (a13f590)
- Starlark rules can now use native transitions in the
cfgparameter. (d1619b7) - Optimized
str(int). (8f97db1) - Optimized
() + tupleandtuple + (). (0ebb269) - Optimized long integer multiplication. (9d3f225)
- Optimized
&,|,^, and~for 64-bit integers. (fa421b8) - Optimized
list(list). (d7d7f82) - Optimized Starlark transitions. (5b4fb02)
- Optimized
--experimental_existing_rules_immutable_view. (dec8b5a) - Fixed
Label()behavior when called with@repoparts. (463e8c8) - Propagated
DefaultInfono longer loses runfiles. (62582bd)
Misc
There were a handful of changes that I couldn’t find a nice home for in the sections above, but I still felt were important or interesting enough to call attention to:
- Added the the
--incompatible_enforce_config_setting_visibilityflag, which makesconfig_settinghonor thevisibilityattribute (defaulting to//visibility:public). (79989f9) - Added the
--remove_all_convenience_symlinksflag to thecleancommand, which deletes all symlinks in the workspace that have thesymlink_prefixprefix and point into the output directory. (f3513c1) - Added the
--no-log-initflag to docker sandbox. (d4390f8) - Added the
--experimental_keep_config_nodes_on_analysis_discardflag (default on), which reduces long-running memory usage. (2f4ed67) - Added the
--experimental_reuse_sandbox_directoriesflag, which causes reuse of already-created non-worker sandboxes with cleanup. (1adb512) - Added the
--experimental_skyframe_cpu_heavy_skykeys_thread_pool_sizeflag, which causes the loading/analysis phase of Skyframe to use 2 independent thread pools. (16c0408) - Added the
--experimental_oom_sensitive_skyfunctions_semaphore_sizeflag, which configures the semaphore inConfiguredTagetFunction. (b5bfcc1) - Added the
--experimental_retain_test_configuration_across_testonlyflag, which skips configuration trimming when whentestonlyistrueon non-test targets. (309f4e1) - Test configurations are no longer trimmed when
--nodistinct_host_configurationis on. (0b51d43) - The
canonicalize-flagscommand now inherits from thebuildcommand in order to pick up build-specified--flag_aliassettings from rc files. (3e6e975) - Bazel will no longer create a
bazel-outsymlink if--symlink_prefixis specified: the directory pointed to via thebazel-outsymlink is accessible via${symlink_prefix}-out. (06bd3e8) - Set
TEST_RUN_NUMBERwhen the test runs multiple times. (9e4216e) - All (instead of just C++) source files are now filtered for coverage output according to
--instrumentation_filterand--instrument_test_targets. (f38e293) genrule.srcsis now considered a source attribute for coverage. (fa118ae)label_keyed_string_dictattributes are now considered when gathering instrumented files for coverage. (9015f38)- Changed
DEFAULT_STUB_SHEBANGto use python3 instead of python. (2945ef5) - Added the default
solibdir to therpathfor shared libs with transitions. (20061f8) - Removed
//visibility:legacy_public. (0803ce4) - Removed
--action_graphfrom the dump command. (7cf0c34) - Added some fixes for the Starlark transition hash computation. (557a7e7)
Summary
As you can see, Bazel 5.0 was a massive release. Thankfully, through the rolling releases process, people were able to test, or even actively depend on, these changes well before the first 5.0 release candidate was cut.
I expect Bazel 5.1 to be a fast follow with some changes that missed the final release candidate. Work on Bazel 6.0 is well underway as well, and I look forward to summarizing its changes later this year.
The GitHub UI shows some commits that already exist in the 4.x series of releases due to cherry-picking, so the number of unique commits is actually smaller. ↩︎