6.3.0
Baseline: 758b44d
Bazel 6.3.0 is a minor LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
Highlights
- The new bazel mod command allows users to inspect their external dependency graph in Bzlmod. See documentation for details.
- Full lockfile support has been added to Bzlmod and is now enabled by default. See documentation for details.
General
- Options specified on the pseudo-command
common
in.rc
files are now ignored by commands that do not support them as long as they are valid options for any Bazel command. Previously, commands that did not support all options given forcommon
would fail to run. These previous semantics ofcommon
are now available via the newalways
pseudo-command. (#18609) - Improve error on invalid
-//foo
and-@repo//foo
options (#18516) - Adjust
--top_level_targets_for_symlinks
:bazel-bin
,bazel-testlogs
, etc. no longer mysteriously disappear (#18916) - Fix Xcode 14.3 compatibility (#18490)
- Remove option to disable
ForkJoinPool
. (#18791)
Android
- Fix D8 dex merger failure when a synthetic class is placed on a different shard than its container class (#16368)
- Add a new provider for injecting native libs in android_binary for android_binary Starlarkification (#18753)
- Add a new provider for passing dex related artifacts in android_binary for android_binary Starlarkification (#18899)
Build Event Protocol
- Add ActionCacheStatistics to BEP (#18914)
C++ / Objective-C
- Make cpp file extensions case sensitive again (#18552)
- Add changes to cc_shared_library from head to 6.3 (#18606)
- Make grep_includes optional inside cc_common.register_linkstamp_compile_action (#18823)
- Add implementation deps support for Objective-C (#18372)
- Add external_include_paths feature on Windows toolchain (#18654)
- Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. (#18882)
- Fix VS 2022 autodetection (#18960)
Coverage
- Expose metadata_files parameter in coverage_common.instrumented_files_info (#18838)
- Check if json.gz files exist, not the gcov version. (#18889)
- Add flag
--experimental_collect_code_coverage_for_generated_files
to enable coverage collection for generated files. (#18664) - Fix split post-processing of LLVM-based coverage (#18737)
External Dependencies / Bzlmod
- Overrides specified by non-root modules no longer cause an error, and are silently ignored instead. (#18388)
- The --credential_helper flag is now stable, and works for repo fetching.
- Module extension usages can now be specified to be isolated. Each isolated usage causes a separate evaluation of the extension. See documentation for more details.
- Report percentual download progress in repository rules (#18471)
- Ignore hash string casing (#18414)
- Include actual MODULE.bazel location in stack traces (#18612)
- Fix WORKSPACE toolchain resolution with
--enable_bzlmod
(#18649) - The REPO.bazel and MODULE.bazel files are now also considered as workspace boundary markers. (#18787)
- Yanked module versions no longer contribute dependency requirements or emit DEBUG messages for print() statements (#18908)
- Report dev/non-dev deps imported via non-dev/dev usages (#18922)
- Identify isolated extensions by exported name (#18923)
Java
- Pass version to java_runtimes created by local_java_repository (#18415)
- Teach ijar about dynamic constants (#18729)
- Update to latest turbine version (#18803)
- Update Error Prone to 2.20.0 (#18885)
- Update java_tools to v12.5 (#18868)
- Disable UseCorrectAssertInTests by default (#18948)
Local Execution
- Use local_termination_grace_seconds when testing LinuxSandbox availability (#18568)
Query
- Add jsonproto option to query --output flag (#18438)
- query --output=proto --order_output=deps now returns targets in topological order (previously there was no ordering). (#18870)
Remote Execution
- Prevent CredentialHelperEnvironment crash when invoking Bazel outside of a workspace. (#18430)
- Use wall-time for credential helper invalidation (#18413)
- Move credential helper setup into remote_helpers.sh so it can be reused by other shell tests. (#18453)
- Support remote symlink outputs when building without the bytes. (#18476)
- Enrich local BEP upload errors with file path and digest possible. (#18481)
- Extend the credential helper default timeout to 10s. (#18527)
- Ignore all errors when writing to stdin of a credential helper.(#18540)
- Implement failure circuit breaker (#18541)
- Add ServerCapabilities into RemoteExecutionClient (#18442)
- RemoteExecutionService: support output_symlinks in ActionResult (#18441)
- RemoteExecutionService: Action.Command to set output_paths (#18440)
- Add
ActionExecutionMetadata
as a parameter toActionInputPrefetcher#prefetchFiles
. (#18656) - Use failure_rate instead of failure count for circuit breaker (#18559)
- Update ignored_error logic for circuit_breaker (#18662)
- Don't rewind the build if invocation id stays the same (#18670)
- Fix potential memory leak in UI when BwoB. (#18659)
- Properly handle invalid credential files (#18779)
- Report remote execution messages as events (#18780)
- Wait for outputs downloads before emitting local BEP events that reference these outputs. (#18815)
- Fix non-declared symlink issue for local actions when BwoB. (#18817)
- Download directory output for test actions (#18846)
Starlark / Build Language
- Perform builtins injection for WORKSPACE-loaded bzl files. (#18819)
Testing
- Fix test setup script to convey test exit code correctly (#18514)
- Set
GTEST_SHARD_STATUS_FILE
in test setup (#18482) - Actually check if
TEST_SHARD_STATUS_FILE
has been touched (#18418) - test-setup.sh: Attempt to raise the original signal once more (#18932)
Acknowledgements
This release contains contributions from many people at Google, as well as amishra-u, Andreas Herrmann, Andy Hamon, andyrinne12, Benjamin Lee, Benjamin Peterson, Brentley Jones, Chirag Ramani, Christopher Rydell, Daniel Wagner-Hall, Ed Schouten, Fabian Brandstetter, Fabian Meumertzheim, Greg, Ivan Golub, Jon Landis, Kai Zhang, Keith Smiley, lripoche, Rasrack, Son Luong Ngoc, Takeo Sawada, Vertexwahn, Yannic.
Notice: Bazel installers contain binaries licensed under the GPLv2 with Classpath exception. Those installers should always be redistributed along with the source code.
Some versions of Bazel contain a bundled version of OpenJDK. The license of the bundled OpenJDK and other open-source components can be displayed by running the command bazel license
. The vendor and version information of the bundled OpenJDK can be displayed by running the command bazel info java-runtime
. The binaries and source-code of the bundled OpenJDK can be downloaded from our mirror server.
Security: All our binaries are signed with our public key 3D5919B448457EE0.