Releases: bazelbuild/bazel
9.0.0rc6
Note
If you are looking for rolling releases, please visit this page.
The following release notes are still in the process of being updated and cleaned up.
Release 9.0.0rc6 (2026-01-15)
Release Notes:
Configurability:
- The new
attr.label_list_dicttype accepts a dict in which keys are strings and values are lists of labels. (#27550) - The new
package_relative_labelfunction on the rule context (ctx) can be used to turn a user-provided label string into aLabelrelative to the target that is currently being analyzed (whereLabel(...)would return aLabelrelative to the.bzlfile containing the call). (#28185)
ExternalDeps:
- In environment variable values set via
--repo_env, the substring%bazel_workspace%is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on thePATHfor repository rules. (#27562) --override_repositorynow supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error. (#27898)- The values of keyword arguments passed to
use_repocan now contain the special substrings{name}and{version}, which are treated as equivalent to the corresponding attributes of the current module. (#28016)
General:
- 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...
9.0.0rc5
Note
If you are looking for rolling releases, please visit this page.
The following release notes are still in the process of being updated and cleaned up.
Release 9.0.0rc5 (2026-01-13)
Release Notes:
Configurability:
- The new
attr.label_list_dicttype accepts a dict in which keys are strings and values are lists of labels. (#27550) - The new
package_relative_labelfunction on the rule context (ctx) can be used to turn a user-provided label string into aLabelrelative to the target that is currently being analyzed (whereLabel(...)would return aLabelrelative to the.bzlfile containing the call). (#28185)
ExternalDeps:
- In environment variable values set via
--repo_env, the substring%bazel_workspace%is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on thePATHfor repository rules. (#27562) --override_repositorynow supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error. (#27898)- The values of keyword arguments passed to
use_repocan now contain the special substrings{name}and{version}, which are treated as equivalent to the corresponding attributes of the current module. (#28016)
General:
- 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 c...
9.0.0rc4
Note
If you are looking for rolling releases, please visit this page.
The following release notes are still in the process of being updated and cleaned up.
Release 9.0.0rc4 (2026-01-13)
Release Notes:
Configurability:
- The new
attr.label_list_dicttype accepts a dict in which keys are strings and values are lists of labels. (#27550) - The new
package_relative_labelfunction on the rule context (ctx) can be used to turn a user-provided label string into aLabelrelative to the target that is currently being analyzed (whereLabel(...)would return aLabelrelative to the.bzlfile containing the call). (#28185)
ExternalDeps:
- In environment variable values set via
--repo_env, the substring%bazel_workspace%is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on thePATHfor repository rules. (#27562) --override_repositorynow supports apparent repository names from the point of view of the main repository. An unknown apparent repo name will result in an error. (#27898)- The values of keyword arguments passed to
use_repocan now contain the special substrings{name}and{version}, which are treated as equivalent to the corresponding attributes of the current module. (#28016)
General:
- 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 c...
8.5.1
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.1 (2026-01-12)
Bazel 8.5.1 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.
Configurability
- Update skyframe error checking in case the second skyframe lookup in ToolchainTypeUtils is incomplete. (#28027)
- Fixed an issue where coverage causes conflicting actions to be generated for the repo mapping manifest file. (#28116, #28181)
External Dependencies
- Fixed a crash when mixing use_repo_rule and --inject_repository (#27995)
- Fixed a "permission denied" issue with the repository download cache when using --experimental_repository_cache_hardlinks. (#28161)
Local Execution
- Fix two incorrect usages of SkyframeLookupResult (#27994)
Remote Execution
- Add option to continue with local execution if remote cache is unavailable (#27996)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from people at Google, as well as Fabian Meumertzheim, John Cater, and Zhongpeng Lin.
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.5.1rc2
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.1rc2 (2026-01-07)
Bazel 8.5.1 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.
Configurability
- Update skyframe error checking in case the second skyframe lookup in ToolchainTypeUtils is incomplete. (#28027)
- Fixed an issue where coverage causes conflicting actions to be generated for the repo mapping manifest file. (#28116, #28181)
External Dependencies
- Fixed a crash when mixing use_repo_rule and --inject_repository (#27995)
- Fixed a "permission denied" issue with the repository download cache when using --experimental_repository_cache_hardlinks. (#28161)
Local Execution
- Fix two incorrect usages of SkyframeLookupResult (#27994)
Remote Execution
- Add option to continue with local execution if remote cache is unavailable (#27996)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from people at Google, as well as Fabian Meumertzheim, John Cater, and Zhongpeng Lin.
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.5.1rc1
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.1rc1 (2025-12-15)
Bazel 8.5.1 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.
External Dependencies
- Fix crash when mixing use_repo_rule and --inject_repository (#27995)
Local Execution
- Fix two incorrect usages of SkyframeLookupResult (#27994)
Remote Execution
- Add option to continue with local execution if remote cache is unavailable (#27996)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from people at Google, as well as Fabian Meumertzheim and Zhongpeng Lin.
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.5.0
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.0 (2025-12-11)
Bazel 8.5.0 is a minor LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
General
- With the new
--incompatible_eagerly_resolve_select_keysflag, the label string keys ofselectdicts in.bzlfiles are resolved relative to the containing file instead of relative to the BUILD file that ends up using theselect. Usenative.package_relative_labelif this is not desired. (#27429) - The contents of source directories are now tracked for invalidation. Using
globor explicit lists of files to consume source directories is still strongly preferred, but there may be cases in which this isn't feasible (e.g. file names that aren't valid labels). (#27417)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27128) - The
--module_mirrorsflag now supports specifying mirrors for individual registries via the syntax--module_mirrors=<registry>=<mirror1>[,<mirror2>,...]. (#27531)
External Dependencies
- Module extensions can store a JSON-like Starlark object in
module_ctx.extension_metadata(facts = ...)and retrieve it back in future evaluations of the extension viamodule_ctx.factswithout any invalidation taking place. (#27296) - git_repository and new_git_repository now check out the default branch of a git repository if no branch, tag or revision are specified, the repo's default branch will be checked out (#27705).
Performance
- Fixed an issue where
genqueryin external repos would evaluate labels as if they were in the main repo. (#27117) - bazel query/cquery/aquery now supports an
executables()function to find only the executable targets in a given expression (#27560)
Remote Execution
- The new
--remote_max_concurrency_per_connectioncan be used to specify the maximum number of concurrent gRPC requests Bazel will issue on a single connection to the server. The default value of 100 matches the previous behavior. (#27564)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as Bradley Bridges, cheister, David Sanderson, David Zbarsky, Fabian Meumertzheim, Jordan Mele, Keith Smiley, Peter Lukacs, Ruoyu Zhong, Ulrik Falklof, and Wade Carpenter.
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.5.0rc4
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.0rc4 (2025-12-09)
Bazel 8.5.0 is a minor LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
General
- With the new
--incompatible_eagerly_resolve_select_keysflag, the label string keys ofselectdicts in.bzlfiles are resolved relative to the containing file instead of relative to the BUILD file that ends up using theselect. Usenative.package_relative_labelif this is not desired. (#27429) - The contents of source directories are now tracked for invalidation. Using
globor explicit lists of files to consume source directories is still strongly preferred, but there may be cases in which this isn't feasible (e.g. file names that aren't valid labels). (#27417)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27128) - The
--module_mirrorsflag now supports specifying mirrors for individual registries via the syntax--module_mirrors=<registry>=<mirror1>[,<mirror2>,...]. (#27531)
External Dependencies
- Module extensions can store a JSON-like Starlark object in
module_ctx.extension_metadata(facts = ...)and retrieve it back in future evaluations of the extension viamodule_ctx.factswithout any invalidation taking place. (#27296) - git_repository and new_git_repository now check out the default branch of a git repository if no branch, tag or revision are specified, the repo's default branch will be checked out (#27705).
Performance
- Fixed an issue where
genqueryin external repos would evaluate labels as if they were in the main repo. (#27117) - bazel query/cquery/aquery now supports an
executables()function to find only the executable targets in a given expression (#27560)
Remote Execution
- The new
--remote_max_concurrency_per_connectioncan be used to specify the maximum number of concurrent gRPC requests Bazel will issue on a single connection to the server. The default value of 100 matches the previous behavior. (#27564)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as Bradley Bridges, cheister, David Sanderson, David Zbarsky, Fabian Meumertzheim, Jordan Mele, Keith Smiley, Peter Lukacs, Ruoyu Zhong, Ulrik Falklof, and Wade Carpenter.
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.5.0rc3
Note
If you are looking for rolling releases, please visit this page.
Release 8.5.0rc3 (2025-12-09)
Bazel 8.5.0 is a minor LTS release. It is fully backward compatible with Bazel 8.0 and contains selected changes by the Bazel community and Google engineers.
General
- With the new
--incompatible_eagerly_resolve_select_keysflag, the label string keys ofselectdicts in.bzlfiles are resolved relative to the containing file instead of relative to the BUILD file that ends up using theselect. Usenative.package_relative_labelif this is not desired. (#27429) - The contents of source directories are now tracked for invalidation. Using
globor explicit lists of files to consume source directories is still strongly preferred, but there may be cases in which this isn't feasible (e.g. file names that aren't valid labels). (#27417)
Configurability
- The new
ctx.configuration.short_idfield provides a short identifier for the current configuration that is understood bybazel config. (#27128) - The
--module_mirrorsflag now supports specifying mirrors for individual registries via the syntax--module_mirrors=<registry>=<mirror1>[,<mirror2>,...]. (#27531)
External Dependencies
- Module extensions can store a JSON-like Starlark object in
module_ctx.extension_metadata(facts = ...)and retrieve it back in future evaluations of the extension viamodule_ctx.factswithout any invalidation taking place. (#27296) - git_repository and new_git_repository now check out the default branch of a git repository if no branch, tag or revision are specified, the repo's default branch will be checked out (#27705).
Performance
- Fixed an issue where
genqueryin external repos would evaluate labels as if they were in the main repo. (#27117) - bazel query/cquery/aquery now supports an
executables()function to find only the executable targets in a given expression (#27560)
Remote Execution
- The new
--remote_max_concurrency_per_connectioncan be used to specify the maximum number of concurrent gRPC requests Bazel will issue on a single connection to the server. The default value of 100 matches the previous behavior. (#27564)
Refer to the full list of commits for more details.
Acknowledgements:
This release contains contributions from many people at Google, as well as Bradley Bridges, cheister, David Sanderson, David Zbarsky, Fabian Meumertzheim, Jordan Mele, Keith Smiley, Peter Lukacs, Ruoyu Zhong, Ulrik Falklof, and Wade Carpenter.
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.
9.0.0rc3
Note
If you are looking for rolling releases, please visit this page.
The following release notes are still in the process of being updated and cleaned up.
Release 9.0.0rc3 (2025-11-24)
Release Notes:
Configurability:
- The new
attr.label_list_dicttype accepts a dict in which keys are strings and values are lists of labels. (#27550)
ExternalDeps:
- In environment variable values set via
--repo_env, the substring%bazel_workspace%is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on thePATHfor repository rules. (#27562)
General:
- 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 attribut...