Releases: bazelbuild/bazel
7.0.1rc2
Note
If you are looking for rolling releases, please visit this page.
C++ / Objective-C
- Fix linker feature detection being performed on wrong linker (#20901)
External Deps
- Let module extensions track calls to
Label()
(#20750) - Fix bootstrapped Bazel binary (#20612)
- Attempt to make main repo mapping inverse more efficient (#20625)
- Let .bzl files record their usages of repo mapping (#20848)
- Consider MODULE.bazel for workspace detection in bazel.sh (#20594)
- Avoid emitting canonical labels into generated repos (#20840)
Java
- Auto-create deploy jars for Bazel
java_test
targets if requested (#20602) java_binary
wrapper should forwardrestricted_to
(#20611)- Fix singlejar resource mapping for external repositories (#20904)
Local Execution
- Mount user-specified bind mounts before Bazel's own magic. (#20609)
- Print interactive sandboxed shell command with
--sandbox_debug
(#20734) - Fix two issues with --incompatible_sandbox_hermetic_tmp that manifested themselves when the output base was under /tmp (#20718)
- Add support for bind mounts under
/tmp
with hermetic tmp (#20749)
Remote Execution
- Force output checking for incremental run commands without the bytes. (#20881)
6.5.0rc1
Note
If you are looking for rolling releases, please visit this page.
General
- Fix tree file materialized as symlink to another file when building without the bytes. (#20409)
- Fix bootstrapped Bazel binary (#20804)
- Ignore read-only errors when updating the
mtime
of theinstall_base
(#20568)
C++ / Objective-C
- Fix versioned shared libraries for macOS toolchain (#20847)
Configurability
- Flip
--incompatible_visibility_private_attributes_at_definition
(#20520)
External Dependencies
- Fix extraction of tar archives containing sparse files. (#20531)
- Restart at most once when prepopulating repository rule environment (#20667)
Java
- Don't pass
--add-opens=
to javac (#20472)
Remote Execution
- RemoteSpawnRunner: record inbetween phases in timing profile (#20550)
- Add profiling to
remoteActionBuildingSemaphore.acquire()
(#20549) - Add flag
experimental_throttle_remote_action_building
(#20861)
Starlark / Build API
- Various methods and fields related to labels and repos are deprecated in favor of new options with clearer naming and intent. The deprecated APIs can be disabled by setting
--noincompatible_enable_deprecated_label_apis
. (#20590)native.repository_name()
is deprecated in favor of the newnative.repo_name()
.Label.workspace_name
is deprecated in favor of the newLabel.repo_name
.Label.relative()
is deprecated in favor of the newLabel.same_package_label()
alongside the existingnative.package_relative_label()
andLabel()
.
7.0.1rc1
External Deps
- Let module extensions track calls to
Label()
(#20750) - Fix bootstrapped Bazel binary (#20612)
- Attempt to make main repo mapping inverse more efficient (#20625)
Local Execution
- Mount user-specified bind mounts before Bazel's own magic. (#20609)
- Print interactive sandboxed shell command with
--sandbox_debug
(#20734) - Fix two issues with --incompatible_sandbox_hermetic_tmp that manifested themselves when the output base was under /tmp (#20718)
- Add support for bind mounts under
/tmp
with hermetic tmp (#20749)
Java
7.0.0
Bazel 7.0 is a major LTS release. It contains new features and backwards incompatible changes.
Blog post: https://blog.bazel.build/2023/12/11/bazel-7-release.html
Highlights
- Bzlmod (Bazel’s new way to manage 3rd party dependencies) is now enabled by default (--enable_bzlmod).
- With Bazel 7 you can still use WORKSPACE, but you should plan migrating your external dependencies from WORKSPACE to MODULE.bazel. With Bazel 8, we plan to disable WORKSPACE by default (can still be enabled) and with Bazel 9 we plan to remove the legacy WORKSPACE based dependency system. See the Bzlmod migration guide for more information.
- Bazel now starts executing actions while it is still analyzing other top-level targets (Project Skymeld).
- This reduces end-to-end wall time for multi-target builds by up to 15%.
- Platform-based toolchain resolution is now enabled for Android and C++.
- Android rules now use platforms and toolchains to control the target devices.. Android projects will need to stop passing the legacy flag
--fat_apk_cpu
, and instead use--android_platforms
using platforms defined with the@platforms//os:android
constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules,@rules_android//:armeabi-v7a
,@rules_android//:arm64-v8a
,@rules_android//:x86
,@rules_android//:x86_64
. Full details are available in the Android Platforms announcement.
- Android rules now use platforms and toolchains to control the target devices.. Android projects will need to stop passing the legacy flag
- Build without the Bytes (BwoB) is now enabled by default (
--remote_download_outputs
now defaults totoplevel
).- This reduces the number of downloaded artifacts when using remote caching and execution significantly, speeding up builds by up to 40%.
- This mode also enables Bazel to gracefully handle remote cache evictions.
Migration-Ready Incompatible Flags
Prepare for future Bazel changes by using the following incompatible flags for early migration:
- --incompatible_auto_exec_groups
- --incompatible_disable_non_executable_java_binary
- --incompatible_disallow_struct_provider_syntax
- --incompatible_disable_target_provider_fields
- --incompatible_struct_has_no_methods
- --incompatible_stop_exporting_language_modules
- --incompatible_disallow_empty_glob
- --incompatible_disable_starlark_host_transitions
- --incompatible_config_setting_private_default_visibility
Already flipped and will be removed at head:
- --incompatible_no_attr_license
- --incompatible_disable_objc_library_transition
- --incompatible_fail_on_unknown_attributes
- --incompatible_enable_cc_toolchain_resolution
- --incompatible_existing_rules_immutable_view
- --incompatible_always_check_depset_elements
- --incompatible_visibility_private_attributes_at_definition
- --incompatible_disallow_unsound_directory_outputs
General
- [Incompatible] Many flags have been removed as part of the effort to remove and clean up unused flags (see the appendix for a full list; also #19296).
- [Incompatible]
--incompatible_check_sharding_support
is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to #18339 for migration advice.
Bazel’s embedded JVM has been upgraded to JDK 21.
Android
- [Incompatible] The flag --android_include_proguard_location_references is removed and --no_proguard_location_reference is now added unconditionally to the command line of aapt2.
- Updated Android manifest merger to v30.1.3.
- Dropped support for legacy (pre-D8) desugaring.
- Added support for optimizers rewriting baseline profiles.
- Android resources will no longer propagate through neverlinked libraries by default.
- Set Android Databinding to v2 and Databinding AndroidX to true and remove support for Databinding V1.
C++ / Objective-C
- [Incompatible] Added a new flag
--incompatible_use_host_features
. When this flag is enabled,--features
only applies to targets built in the target configuration, and--host_features
is used for the host / exec configuration - [Incompatible] C++ rules use platform-based toolchain resolution (
--incompatible_enable_cc_toolchain_resolution
is now on). See #7260. - [Incompatible] Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead
- [Incompatible] cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_librarys. Enable the feature exclude_bazel_rpaths_in_transitive_libs or use_rpath_instead_of_runpath for those cc_shared_librarys.
- [Incompatible] The
cc_host_toolchain_alias
rule is deleted. Please usecc_toolchain_alias
rule instead. - [Incompatible] Removed apple_crosstool_transition. Use transition_support.apple_rule_transition from rules_apple instead.
- [Incompatible] The
BAZEL_CURRENT_REPOSITORY
preprocessor variable, which holds the canonical name of the Bazel repository containing acc_*
target, is now only set during compilation if the target depends on the C/C++ runfiles library@bazel_tools//tools/cpp/runfiles
viadeps
orimplementation_deps
. - C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs check whether each target of the rule type should produce a dynamic library. This check used to be part of cc_common API, but is now moved to the caller rules instead.
- C++ branch coverage is now enabled if gcov version is 8 or newer.
- cc_shared_library is no longer experimental, see #16709 for details
- cc_test can now be configured by using a native.toolchain()
objc_library
now produces better error messages while expanding make variables.- Unexpected C/C++ absolute includes now result in more descriptive error messages for unexpected cc absolute includes. They are not reported anymore reported as "undeclared inclusion(s)"
- Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed.
- Fixed includes attribute of
objc_library
when sibling repository layout is used.
Configurability
- [Incompatible] The flag
--extra_execution_platforms
no longer accumulates values over multiple specifications. To use multiple execution platforms, set--extra_execution_platforms=platform1,platform2
instead of--extra_execution_platforms=platform1 --extra_execution-platforms=platform2
. The former registers bothplatform1
andplatform2
while the latter overridesplatform1
withplatform2
. - [Incompatible]
copy_from_rule
on exec_group is deprecated (#17668).
[Incompatible]platform
,constraint_setting
, andconstraint_value
no longer take anapplicable_licenses
value. Use package level defaults instead. - [Incompatible]
default_package_metadata
doesn't apply toplatform
,constraint_setting
, orconstraint_value
anymore. - [Incompatible] Duplicates in when using
query --output=xml --aspect_deps=precise
are removed. - [Incompatible] Starlark API: removed outdated
ctx.host_fragments
,ctx.host_configuration
. - [Incompatible]
genrule.exec_tools
is removed. Usegenrule.tools
instead. - [Incompatible]
@bazel_tools//config:common_settings.bzl
has been removed. Use@bazel_skylib//rules:common_settings.bzl
instead. - [Incompatible]
--incompatible_visibility_private_attributes_at_definition
is flipped to true. This supports prohibiting references to tools andconfig_settings
used by internal rule logic. See #19330. - The new flag
--use_target_platform_for_tests
allows one to execute tests with the target platform instead of the execution platform. - The new flag
--skip_incompatible_explicit_targets
can be used to skip incompatible targets even when explicitly requested on the command line. This changes the default behavior of reporting an error in this case. See https://bazel.build/extending/platforms#when-targets-skipped. - Added flag
--proto:include_attribute_source_aspects
that will include a new fieldsource_aspect_name
to theAttribute
message that indicates the source aspect that the attribute comes from. default_applicable_licenses
inpackage()
now applies to the entire BUILD file, regardless of where in the BUILD thatpackage()
is called.
Core
- [Incompatible] When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect.
- [Incompatible] JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server anymore; use --host_jvm_args instead.
- [Incompatible]
--incompatible_disallow_unsound_directory_outputs
is enabled by default: actions are now forbidden from creating an output directory where a file was expected. - The location of rules that explicitly specify `generator_na...
6.4.0
Note
If you are looking for rolling releases, please visit this page.
Baseline: 0f231ac
Bazel 6.4.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.
General
- Add support for more workspace boundary files to bash completion (#19281)
- Ignore Starlark options on commands with
allowResidue = False
(#19417) - Print Passed and Failed methods in detailed test summary (#19505)
- Keep leading zero in formatted date (#19694)
- Merge rule and aspect validation output groups (#19745)
- Bazel release process: Fix push justification. (#19768)
- Clear runfiles environment variables for
bazel run
(#19606)
Android
- Add a Starlark flag that allows disabling proguard. This will be useful for testing later. (#19179)
C++ / Objective-C
- Fix a bug where frozen targets list was mutated while expanding env attribute (#19053)
- Advertise CcInfo from cc_import (#19086) (#19088)
- Enable cc toolchain resolution when cross compiling to windows arm64. (#19198)
- Add Starlark implementation for several CcCommon methods. (#19076)
- Rename
cc_test_wrapper
tocc_test
(#19231) - Add
additional_linker_inputs
option tocc_library
rule (#19264) - Add --incompatible_disable_objc_library_transition (#19393)
- Wrong include path to Clang 16 on Windows (#19430)
- Remove default -s flag from macOS libtool invocation (#19454)
- Only use
/showIncludes
if supported (#19521) - Advertise CcInfo from cc_proto_library (#19534)
- Update unknown Xcode version error message and provide an environment variable to force re-evaluation (#19540)
- cc_library: propagate data dependencies via implementation_deps. (#19590)
- Error on potential unsupported
/showIncludes
lines (#19611) - Flip --experimental_cc_implementation_deps (#19751)
- Bump c++ standard to c++14 per default (#19794)
- Collect debug info context from implementation deps (#19836)
Configurability
- Performance improvement:
--allow_analysis_cache_discard=false
aborts the build if changed build flags would otherwise discard the analysis cache (#19503) - Performance, correctness improvement: add diff_against_dynamic_baseline option to --experimental_output_directory_naming_scheme (#19514)
- Improve error when a label is provided in
config_setting
'svalues
(#19484) - Do not allow applicable_licenses on platform (#19426)
- Raise an early error on invalid labels in transitions inputs/outputs (#19764)
- Fix unconditional Skyframe invalidation with --lockfile_mode=update
External Dependencies / Bzlmod
- Merge
use_repo
buildifier fixups into a single command (#19134) - Ensure that extension unique names followed by
~
are prefix-free (#19164) - Lockfile updates & fixes (#19153)
- A new attribute 'environ' is added to module extension to allow depending on environment variables.
- The module extension will be re-evaluated in response to changes in the files it depends on.
- Lockfile version bump will prompt users to run it in 'lockfile_mode=update'.
- Friendlier error message for
bazel_dep
s withoutversion
(#19196) - Use
debugPrint
instead ofstr
forfail
arguments (#19283) - Download
BazelRegistryJson
only once per registry (#19300) - Make module extension tag's
debugPrint
useful for error messages (#19285) - Intern repository mapping entries (#19293)
- Do not rerun module extensions when only imports or locations change (#19284)
- Fetch
RepoSpecs
in parallel (#19354) - Make
MODULE.bazel.lock
deterministic (#19370) - Ensure lockfile is updated after reset to pre-build state (#19371)
- Add visionOS support (#19436)
- Cherry pick platform dependent lockfile (#19498)
- New attributes 'os' and 'arch' added to module extension to signify its reliance on the operating system or system architecture.
- When either the 'os' attribute, the 'arch' attribute, or both are set to 'true,' separate module extensions will be stored in the lockfile for each distinct combination of operating system and architecture.
- Print dep chain leading to a module that is in error (#19543)
- Show fetch progress for the
mod
command (#19542) - Explain the use of
str(Label(...))
in the docs (#19554) - Inject builtin modules at the end of the MODULE.bazel file (#19573)
- Use case-insensitive comparison for Windows paths in
runfiles.bash
(#19626) - Show test labels in summaries in display form (#19625)
- Remove stale extension entries from lockfile (#19683)
- Bzlmod lockfile: fix pretty printing for attributes (#19691)
- Fixed a case where the MODULE.bazel.lock file contains user specific paths (#19698)
- Consider RCs equivalent to release for
bazel_compatibility
(#19689) - Remove stale extension entries from lockfile if module order changes (#19730)
- Make lockfile's
RepoSpec
attributes more readable (#19748) - Fix handling of non-ASCII characters in archive entry file names (#19765)
- Fix crash when
environ
contains duplicate entries (#19827)
Java
- Add toolchain type for Java bootstrap runtime (#19220)
- Add formatted timestamp entries to volatile workspace status file (#19499)
- Update java_tools to v12.7 (#19522)
- Use
Label
in@bazel_tools//tools/jdk
macros (#19675) - Update rules_java to 5.5.1 (#19701)
- Fix Java compilation for jdk21 (#19735)
- Handle synthetic method parameters entries that don't have names (#19758)
Performance
- Add profiling for Bzlmod operations (#19313)
- Intern empty
Depset
s (#19443) - Optimize classpath pre-processing in java_stub_template.txt (#19491)
- Also apply
NestedSet
optimizations toDepset
(#19492)
Query
- Fix valid json when using jsonproto output in queries with new
--output=streamed_jsonproto
implementation. (#19226) - Add
--consistent_labels
flag to all query commands (#19567)
Remote Cache and Execution
6.3.2
Release 6.3.2 (2023-08-08)
Baseline: 283ed36
Bazel 6.3.2 is a patch LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
- Ensure that extension unique names followed by
~
are prefix-free (#19167) - Module extensions can now specify a list of environment variables to watch through the environ parameter.
- The module lockfile can now deal with missing fields due to Bazel version upgrades. (#19175)
- Module extensions are now re-evaluated if any labels they depend on change, similar to repo rules. (#19175)
Acknowledgements:
This release contains contributions from many people at Google, as well as Fabian Meumertzheim.
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.
6.3.1
Release 6.3.1 (2023-07-31)
Baseline: 0f231ac
Bazel 6.3.1 is a patch LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
- Disabled lockfile support by default due to issue reports (#19105 and #19068). Will be re-enabled in the next minor release.
- Mark isolated extension usages as experimental (#19050)
- Fix a bug where frozen targets list was mutated while expanding env attribute (#19052)
- Advertise CcInfo from cc_import (#19086)
- Update java_tools to v12.6 (#19091)
Acknowledgements
This release contains contributions from many people at Google, as well as Brentley Jones and Fabian Meumertzheim.
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.
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 ex...
6.2.1
Release 6.2.1 (2023-06-02)
Baseline: 758b44d
Bazel 6.2.1 is a patch LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
General
- Fix bazel run test_target exit code issue (#18512)
- Use extension rather than local names in ModuleExtensionMetadata (#18535)
Acknowledgements
This release contains contributions from many people at Google, as well as Fabian Meumertzheim.
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.
6.2.0
Baseline: d60ce2c
Bazel 6.2.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
- Added preliminary support for a lockfile for Bzlmod. It's disabled by default; use
--lockfile_mode=update
to enable it. Check flag documentation here. This lockfile contains only Bazel module information; it does not involve module extensions. (#18143)
General
@foo
labels can now be used on the command line as the top-level target (that is,bazel build @foo
now works). Double-dot syntax is now forbidden (bazel build ../foo
will no longer work). (#17945)- The aquery and cquery commands now respect the --query_file flag just like the query command. (#17823)
- Patch zlib to fix compatibility with latest Xcode (#18000)
- profile: add profile_finish_ts (#18129)
- Use ctime in file digest cache key (#18105)
- Include cause when reporting
ActionExecutionException
(#18185) - Check for the nullness of
AspectValue
. (#18186) - Force the Bazel server Java runtime to use the root locale (#17733)
- Fix message generation of
ActionExecutionException
(#18257)
Android
- Added coverage metric support to android_local_test (#17467)
- Include build-tools/X.Y.Z/{lib,lib64}/** in the minimal set of SDK files used by the Android integration tests. (#17826)
- Fix worker and multiplex workers for DexBuilder and Desugar actions (#17965)
C++ / Objective-C
- Fix wasm dynamic library extension crash (#17765)
- Enable C++ deps pruning on Windows when PARSE_SHOWINCLUDES is available. (#17957)
- Add attribute provides = [CcInfo] to _cc_proto_aspect (#17979)
- Expose cc_proto_aspect as a top level symbol. (#17980)
CLI
- Handle
SIGWINCH
underbazel run //some:test
(i.e. test rules) correctly. (#17760) - Use less subshells and
tee
s in running tests withbazel run
. (#17869)
Configurability
- Allow multiple matching select branches if they resolve to the same value (#18066)
- cquery --output-starlark: better alias support (#17786)
- Fix crashes on select()able target_compatible_with attributes. (#18135)
- Add "did you mean?" suggestions for typoed rule attribute names (#17855)
- Turn applicable_licenses on platform() into a no-op. (#18089)
External Dependencies
- Added
native.module_name()
andnative.module_version()
to allow BUILD macro authors to acquire information about which Bazel module the current repo is associated with. (#17893) - Added a new
max_compatibility_level
attribute to thebazel_dep
directive, which allows version selection to upgrade a dependency up to the specified compatibility level. (#18178) - Added
module_ctx.is_dev_dependency
, allowing an extension to see whether a tag is specified to be a dev dependency. (#17934) - Added
module_ctx.extension_metadata
, allowing the extension to specify the list of repos the root module canuse_repo
on. If the root module violates this list, Bazel will print out a Buildozer command to automatically fix the use_repo directive. (#18174) - Fixed an issue where WORKSPACE and WORKSPACE-loaded .bzl files couldn't see the Bzlmod root module's mappings when Bzlmod is enabled. (#17818)
- Added suggestions to invalid tag class errors. (#17896)
- Workspace relative paths are now supported in --override_module. (#17906)
- Fail early if
use_extension
has a bad label (#17926) - Added
dev_dependency
toregister_{execution_platforms,toolchains}
. (#18259)
Java
- Silence setlocale warnings in Java stub (#17741)
- Split darwin java_tools to x86_64 and arm64 (#18197)
- Upgrade Azul JDK 17 archives. (#17852)
- Add version to JavaRuntimeInfo (#17913)
- Update default_java_toolchain.bzl to fix a regression (#18225)
- Updated java_tools to v12.3 to fix BazelTestRunner compatibility with jre8 (#18328)
Python
- Removed temporary module space created for zip-based binaries (#17764)
- Set envvar for runfiles manifest, not runfiles dir, when using a manifest (#18133)
Remote Execution
- Skip empty directories instead of throwing in the prefetcher. (#17718)
- Remove actionId from
RemoteFileArtifactValue
. (#17724) - Correctly handle templated tree artifacts in the prefetcher. (#17735)
- [credentialhelper] Ignore failing to provide request (#17745)
- [remote] upload: treat
ALREADY_EXISTS
as success (#17732) - Fix data race in prefetcher. (#17744)
- Clear all remote metadata if any of them are evicted from remote cache (#17770)
- Fix seeking of empty chunkers. (#17830)
- Rework ByteStreamUploader early return logic. (#17832)
- Avoid unnecessary copying when building Merkle trees. (#17930)
- Cache Merkle trees for tree artifacts. (#17998)
- Deduplicate concurrent computations of the same Merkle tree. (#18015)
- Add exception message to 'failed to create output directory' (#18067)
- Prevent failures creating output directories (#18062)
- Gracefully handle output symlinks with BwoB (#18106)
- Automatically retry the build if encountered remote cache eviction error (#18171)
- Allow remote retry max delay to be user configurable (#18061)
- Rename --experimental_remote_grpc_log to --remote_grpc_log (#18193)
- Construct TreeArtifactValues on multiple threads. (#18194)
- Fix crash on multiple output symlinks with BwoB (#18226)
Starlark / Build Language
- Relax JSON parser, ensure duplicate keys are overridden (#17868)
Acknowledgements
This release contains contributions from many people at Google, as well as Adam Lavin, Alessandro Patti, Ben Lee, Benjamin Lee, Benjamin Peterson, Brentley Jones, Ed Schouten, Ezekiel Warren, Fabian Meumertzheim, George Gensure, Joel Jeske, Julio Merino, Konstantin Erman, Patrick Balestra, Son Luong Ngoc, Yannic Bonenberger.
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.