Aquesta és una versió anterior. La versió actual és la 9.3.0. Bazel 9.3.0 · Data de publicació:
9.0.0 forma part de la branca 9 (LTS), que té suport fins al 31 de desembre del 2028. endoflife.date
Fitxers d’instal·lació 9.0.0
| Arquitectura | Tipus | Àmbit | Mida del fitxer | Baixa | SHA256 |
|---|---|---|---|---|---|
| 64 bits | Portable | — | — | github.com | VirusTotal |
| ARM64 | Portable | — | — | github.com | VirusTotal |
L’enllaç i l’SHA256 provenen del manifest comunitari del Gestor de paquets del Windows. Convé comparar el hash del fitxer baixat abans d’executar-lo.
Notes de la versió
Release 9.0.0 (2026-01-20)
Release Notes:
Configurability:
- The new attr.label_list_dict type accepts a dict in which keys are strings and values are lists of labels. (#27550)
- The new package_relative_label function on the rule context (ctx) can be used to turn a user-provided label string into a Label relative to the target that is currently being analyzed (where Label(...) would return a Label relative to the .bzl file 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 the PATH for repository rules. (#27562)
- --override_repository now 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_repo can 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 external directory 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 --watchfs startup option is now a no-op and will be removed in April 2025. Use the --watchfs command option instead.
- repository_ctx.execute can now remove an environment variable when executing a process by associating it with the value None in the environment argument.
- 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 mod now 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_repository flag can be used to add new repositories via the CLI with --enable_bzlmod. Such repositories behave as if they were declared by local_repository via use_repo_rule in 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_under that 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_env may 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_override now accepts all attributes usable with http_archive; similar for git_override and git_repository.
- Fixed an issue where genquery in 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.bzl rule 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 SecurityManager that prevents System.exit, since SecurityManager functionality 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_secs now 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_location now 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_executable flag has been added and enabled, which makes it so that ctx.expand_location expands $(locations :x) to the executable of an extra target :x if it provides one and the number of files provided by it is not one.
- On Linux, the default limit on the number of --watchfs file 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_executable flag has been added and enabled, which makes it so that ctx.expand_location expands $(locations :x) to the executable of an extra target :x if it provides one and the number of files provided by it is not one.
- [Incompatible] The --enable_bzlmod and --enable_workspace flags 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_feature flag. 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 the name attribute as specified at the repo rule call site.
- The new no_match_error attribute on toolchain_type can be used to show a custom message when no matching toolchain is found for that type, but one is required.
- Adds ctx.rule.var to allow aspects to get rule-specific variables, and removes rule-specific variables from an aspect's ctx.var dict.
- LCOV parsing does not break on FN lines including an end line number.
- [Incompatible] The canonical names of repos created with use_repo_rule have changed, which may require updating command-line flags such as --override_repository.
- Add no_toolchain_error to the platform rule, to customize error messages when a required toolchain type cannot be found for that platform.
- Flag --incompatible_remote_use_new_exit_code_for_lost_inputs is deleted.
- None:
- The new --@bazel_tools//tools/test:incompatible_use_default_test_toolchain flag 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_tests flag.
- --experimental_downloader_config is now no longer experimental, and has been renamed to --downloader_config. The old flag name can still be used.
- The config command now reports which configurations have had the test configuration trimmed.
- Stop documenting the vestigial distribs attribute.
- Turn the distribs common 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_licenses attribute 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_changes flag rather than as if that flag was set to full.
- [Incompatible] accessing struct providers is not supported anymore