github bazelbuild/bazel 8.5.0rc4

pre-release11 hours ago

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_keys flag, the label string keys of select dicts in .bzl files are resolved relative to the containing file instead of relative to the BUILD file that ends up using the select. Use native.package_relative_label if this is not desired. (#27429)
  • The contents of source directories are now tracked for invalidation. Using glob or 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_id field provides a short identifier for the current configuration that is understood by bazel config. (#27128)
  • The --module_mirrors flag 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 via module_ctx.facts without any invalidation taking place. (#27296)

Performance

  • Fixed an issue where genquery in 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_connection can 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.

Don't miss a new bazel release

NewReleases is sending notifications on new releases.