Releases: bazelbuild/bazel
9.0.0rc1
Note
If you are looking for rolling releases, please visit this page.
The following release notes are still in the process of being updated. For a more up-to-date version, take a look at the release announcements doc.
Release 9.0.0rc1 (2025-11-03)
Baseline: 72afe97
Release Notes:
- The Python six library is no longer part of @external_tools.
- The "blaze --quiet" command line option can now be used to make Blaze emit much less output.
- The stripPrefix parameter of repository_ctx.download_and_extract() and repository_ctx.extract() has been renamed to strip_prefix; the deprecated stripPrefix name remains usable for compatibility.
- A no-config transition is now available as
config.no_config(). - Actions that create runfiles trees are now considered regular actions. This means that they are now reported in statistics, critical paths and the like.
- External repositories that are managed by Bzlmod can now contain a top-level
externaldirectory or package. - [Incompatible] On Windows, a change to the output base locking protocol might cause an older Bazel invoked immediately after a newer Bazel (on the same output base) to error out instead of blocking for the lock, even if --block_for_lock is enabled.
- REPO.bazel now allows another directive, "ignore_directories()". It takes a list of directories to ignore just like .bazelignore does, but with glob semantics.
- [Incompatible] The
--watchfsstartup option is now a no-op and will be removed in April 2025. Use the--watchfscommand option instead. repository_ctx.executecan now remove an environment variable when executing a process by associating it with the valueNonein theenvironmentargument.- Add inherit_attrs param to macro() to allow symbolic macros to inherit attributes from rules or other symbolic macros.
- [Incompatible] The mnemonic passed to --worker_extra_flag is now matched against the worker key mnemonic when one is available, instead of the action mnemonic. This makes it consistent with other worker flags taking a mnemonic.
bazel modnow tries to evaluate all module extensions, even when some have failed to evaluate.- Commands executed by "bazel run" now have two extra environment variables: $BUILD_ID indicates the id of the Bazel command and $BUILD_EXECROOT indicates the execroot of the Bazel server.
- The new
--inject_repositoryflag can be used to add new repositories via the CLI with--enable_bzlmod. Such repositories behave as if they were declared bylocal_repositoryviause_repo_rulein the root module. - Add a set data type to Starlark, guarded by the --experimental_enable_starlark_set flag.
- symbolic macro attribute inheritance is now marked experimental; set --experimental_enable_macro_inherit_attrs flag to enable it.
- Changing any part of
--run_underthat isn't the label (such as the shell command) no longer invalidates the analysis cache. - [Incompatible] Changing --test_env no longer invalidates the analysis cache.
ctx.configuration.test_envmay be empty for non-test rules and should not be used by such rules. - The progress of completed configured aspects is now shown in the UI, next to the number of completed targets. Example: "(100 packages loaded, 10000 targets and 500 aspects configured)".
archive_overridenow accepts all attributes usable withhttp_archive; similar forgit_overrideandgit_repository.- Fixed an issue where
genqueryin external repos would evaluate labels as if they were in the main repo. - Re-enable symbolic macro attribute inheritance.
- [Incompatible] The legacy
@bazel_tools//tools/build_defs/repo:maven_rules.bzlrule for downloading Maven artifacts has been deleted. Consider migrating to rules_jvm_external if you are using this rule. - Fix starlark_doc_extract proto output for symbolic macro visibility, attribute inheritance, and rule finalizers; and remove non-existent "name" attribute from starlark_doc_extract output for aspects.
- Java tests are no longer run with a
SecurityManagerthat preventsSystem.exit, sinceSecurityManagerfunctionality is being removed from the JDK. - Baseline coverage files are no longer ignored.
- select() on
cpu,host_cpu, or `crosstool_top now emits a "deprecated flag" warning --max_idle_secsnow takes system sleep time into account when deciding when to shutdown the blaze server.- Flip --experimental_enable_starlark_set and enable the Starlark set data type by default.
- Materializer functions now have access to the label of the rule they are running on as ctx.label .
- Extra targets provided to
ctx.expand_locationnow expand to their executable (if any) instead of resulting in an error if they provide a number of files different from one. [Incompatible] The--incompatible_locations_prefers_executableflag has been added and enabled, which makes it so thatctx.expand_locationexpands$(locations :x)to the executable of an extra target:xif it provides one and the number of files provided by it is not one. - On Linux, the default limit on the number of
--watchfsfile events per directory has been raised to 10,000 (from 500). If needed, it can be increased further via--host_jvm_args=-Djdk.nio.file.WatchService.maxEventsPerPoll=<limit>. - Add a definition of the pacakge_metadata attribute.
- [Incompatible] The
--incompatible_locations_prefers_executableflag has been added and enabled, which makes it so thatctx.expand_locationexpands$(locations :x)to the executable of an extra target:xif it provides one and the number of files provided by it is not one. - [Incompatible] The
--enable_bzlmodand--enable_workspaceflags are now no-ops. Bzlmod is now always enabled, and WORKSPACE is always disabled. - The new exec_group_compatible_with attribute on all rules accepts a dictionary mapping exec group names to lists of additional constraints to request from the exec group's execution platform.
- Removes the
--incompatible_enable_cc_test_featureflag. The functionality this was intended for was never completed, and is no longer needed. - [Incompatible] Constraints and toolchain requirements added to the default exec group, for example via the toolchains parameter of the rule function or the exec_compatible_with attribute on all rules, no longer apply to the test exec group, which contains the test action on test rules. Instead, use exec_group_compatible_with to apply constraints and/or define an explicit test exec group with toolchain requirements on test rules that require it.
- Added
repository_ctx.original_name, which contains the original value of thenameattribute as specified at the repo rule call site. - The new
no_match_errorattribute ontoolchain_typecan be used to show a custom message when no matching toolchain is found for that type, but one is required. - Adds
ctx.rule.varto allow aspects to get rule-specific variables, and removes rule-specific variables from an aspect'sctx.vardict. - LCOV parsing does not break on FN lines including an end line number.
- [Incompatible] The canonical names of repos created with
use_repo_rulehave changed, which may require updating command-line flags such as--override_repository. - Add
no_toolchain_errorto theplatformrule, to customize error messages when a required toolchain type cannot be found for that platform. - Flag
--incompatible_remote_use_new_exit_code_for_lost_inputsis deleted. - None:
- The new
--@bazel_tools//tools/test:incompatible_use_default_test_toolchainflag can be used to have test actions select an execution platform that has all the constraints provided by the target platform instead of always selecting the first available execution platform. This supersedes the--use_target_platform_for_testsflag. --experimental_downloader_configis now no longer experimental, and has been renamed to--downloader_config. The old flag name can still be used.- The
configcommand now reports which configurations have had the test configuration trimmed. - Stop documenting the vestigial
distribsattribute. - Turn the
distribscommon attribute into a no-op. See #19369 - Set generator_name, generator_function, generator_location, and the full Starlark stack for rule targets instantiated in a symbolic macro.
- Soft deprecate bazel startup option --write_command_log. User should switch to use command option with the same name or look at the build event messages.
- Add better defaults for mobile-install flags
- [Incompatible] struct providers are not supported in aspects
- The (deprecated)
output_licensesattribute is now a string list rather than an internal data type. The only visible change may be that some query output may change from printing capitalized values of inputs will now show lower case. - [Incompatible] When remote execution fails and an action is executed locally, modifications of its inputs during execution are now checked according to the value of the
--guard_against_concurrent_changesflag rather than as if that flag was set tofull. - [Incompatible] accessing struct providers is not supported anymore
- [Incompatible] The
--verbose_explanationsflag is now a no-op: the additional information it produced wasn't useful enough to justify the memory cost of the additional bookkeeping. - User-provided repo names may now start with a number.
- java_import.jars attributes can no longer be empty, and --noincompatible_disallow_java_import_empty_jars is no longer supported
- Added
--verbose_visibility_errorsfor printing more information when a visibility violation occurs. - **[Incompatibl...
7.7.0
Note
If you are looking for rolling releases, please visit this page.
Release 7.7.0 (2025-10-30)
Bazel 7.7.0 is a minor LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
General
- Bazel now requires the minimal glibc version of 2.25.
- Fixed a compatibility issue with macOS Tahoe. (#27088)
C++ / Objective-C
- Fix virtual headers symlink action for C++ headers (#27411)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27219)
External Deps
- Added
repository_ctx.original_name, which contains the original value of thenameattribute as specified at the repo rule call site. (#27034) - Modules backed by
http_archiveorgit_repositoryno longer require a MODULE.bazel file to be contained in the source archive. (#27216) - source.json now supports a new attribute mirror_urls as backup URLs for the source archive. (#27004)
- Fixed bazel mod path/all_paths behavior. (#26937)
- The flag_alias directive is added to MODULE.bazel as a no-op for forward compatibility. (#27335)
single_version_override()now accepts patch_cmds with no patches (#27418)- Fall back to rctx.name if $original_name is empty (#27437)
- Don't suggest updates to private repo rule attributes (#27436)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as David Sanderson, David Zbarsky, Fabian Meumertzheim, Grzegorz Lukasik, Ruoyu Zhong, Son Luong Ngoc, Ulrik Falklof, and wudisheng.
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.
7.7.0rc3
Note
If you are looking for rolling releases, please visit this page.
Release 7.7.0rc3 (2025-10-28)
Bazel 7.7.0 is a minor LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
General
- Bazel now requires the minimal glibc version of 2.25.
- Fixed a compatibility issue with macOS Tahoe. (#27088)
C++ / Objective-C
- Fix virtual headers symlink action for C++ headers (#27411)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27219)
External Deps
- Added
repository_ctx.original_name, which contains the original value of thenameattribute as specified at the repo rule call site. (#27034) - Modules backed by
http_archiveorgit_repositoryno longer require a MODULE.bazel file to be contained in the source archive. (#27216) - source.json now supports a new attribute mirror_urls as backup URLs for the source archive. (#27004)
- Fixed bazel mod path/all_paths behavior. (#26937)
- The flag_alias directive is added to MODULE.bazel as a no-op for forward compatibility. (#27335)
single_version_override()now accepts patch_cmds with no patches (#27418)- Fall back to rctx.name if $original_name is empty (#27437)
- Don't suggest updates to private repo rule attributes (#27436)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as David Sanderson, David Zbarsky, Fabian Meumertzheim, Grzegorz Lukasik, Ruoyu Zhong, Son Luong Ngoc, Ulrik Falklof, and wudisheng.
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.
7.7.0rc2
Note
If you are looking for rolling releases, please visit this page.
Release 7.7.0rc2 (2025-10-27)
Bazel 7.7.0 is a minor LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
General
- Bazel now requires the minimal glibc version of 2.25.
- Fixed a compatibility issue with macOS Tahoe. (#27088)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27219)
External Deps
- Added
repository_ctx.original_name, which contains the original value of thenameattribute as specified at the repo rule call site. (#27034) - Modules backed by
http_archiveorgit_repositoryno longer require a MODULE.bazel file to be contained in the source archive. (#27216) - source.json now supports a new attribute mirror_urls as backup URLs for the source archive. (#27004)
- Fixed bazel mod path/all_paths behavior. (#26937)
- The flag_alias directive is added to MODULE.bazel as a no-op for forward compatibility. (#27335)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as David Sanderson, David Zbarsky, Fabian Meumertzheim, Grzegorz Lukasik, Ruoyu Zhong, Son Luong Ngoc, Ulrik Falklof, and wudisheng.
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.
7.7.0rc1
Note
If you are looking for rolling releases, please visit this page.
Release 7.7.0rc1 (2025-10-20)
Bazel 7.7.0 is a minor LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
General
- Bazel now requires the minimal glibc version of 2.25.
- Fixed a compatibility issue with macOS Tahoe. (#27088)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27219)
External Deps
- Added
repository_ctx.original_name, which contains the original value of thenameattribute as specified at the repo rule call site. (#27034) - Modules backed by
http_archiveorgit_repositoryno longer require a MODULE.bazel file to be contained in the source archive. (#27216) - source.json now supports a new attribute mirror_urls as backup URLs for the source archive. (#27004)
- Fixed bazel mod path/all_paths behavior. (#26937)
- The flag_alias directive is added to MODULE.bazel as a no-op for forward compatibility. (#27335)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as David Zbarsky, Fabian Meumertzheim, Grzegorz Lukasik, Ruoyu Zhong, Son Luong Ngoc, and Ulrik Falklof.
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.
7.6.2
Note
If you are looking for rolling releases, please visit this page.
Release 7.6.2 (2025-10-08)
Bazel 7.6.2 is a patch LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
- Fixed a compatibility issue with macOS Tahoe. (#27160)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from Fabian Meumertzheim and Ruoyu Zhong.
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.
7.6.2rc1
Note
If you are looking for rolling releases, please visit this page.
Release 7.6.2rc1 (2025-10-06)
Bazel 7.6.2 is a patch LTS release. It is fully backward compatible with Bazel 7.0 and contains selected changes by the Bazel community and Google engineers.
- Fixed a compatibility issue with macOS Tahoe. (#27160)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from Fabian Meumertzheim and Ruoyu Zhong.
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.
8.4.2
Note
If you are looking for rolling releases, please visit this page.
Release 8.4.2 (2025-10-01)
Bazel 8.4.2 is a patch LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from Fabian Meumertzheim and Ruoyu Zhong.
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.
8.4.2rc2
Note
If you are looking for rolling releases, please visit this page.
Release 8.4.2rc2 (2025-09-29)
Bazel 8.4.2 is a patch LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from Fabian Meumertzheim and Ruoyu Zhong.
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.
8.4.2rc1
Note
If you are looking for rolling releases, please visit this page.
Release 8.4.2rc1 (2025-09-26)
Bazel 8.4.2 is a patch LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
- Fixed a compatibility issue with macOS Tahoe. (#27014)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from Fabian Meumertzheim and Ruoyu Zhong.
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.