github bazelbuild/bazel 8.2.0rc1

latest releases: 8.2.1, 8.2.1rc1, 9.0.0-pre.20250408.2...
pre-release14 days ago

Note

If you are looking for rolling releases, please visit this page.

Release 8.2.0rc1 (2025-04-07)

Bazel 8.2.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.

Build Event Protocol

  • BEP will now always attempt to set exit_code on TestResult from the result of the test runner. (#25278)

Configurability

  • Add missing_toolchain_error to the platform rule, to customize error messages when a required toolchain type can't be found for a platform. (#25284)
  • Add use_target_platform_constraints attribute to the toolchain rule. Although it is not used, it enables writing custom test toolchains that will more naturally match the target platform in Bazel 9.0. (#25685)
  • Skylib's analysis_test supports testing Starlark analysis logic with --experimental_* and --incompatible_* flags. (#25536)
  • Include DefaultInfo in cquery's Starlark output. (#25719)

External Dependencies

  • The repo_name parameter of bazel_dep can now be set to None to mark it a "nodep" dependency -- that is, the bazel_dep specification is only honored if the target module already exists in the dependency graph by some other means. (#25381)
  • --experimental_downloader_config is now no longer experimental, and has been renamed to --downloader_config. The old flag name can still be used. (#25660)
  • Added sparse_checkout_patterns and sparse_checkout_file arguments to the git_repository rule. If non-empty, this will cause the rule to perform a sparse checkout of the repository, only checking out files that match the .gitignore-style patterns in this list. (#25765)
  • Literal dicts are now allowed as extra keyword args in MODULE.bazel files. This makes it possible to use repo names that are not valid Starlark identifiers in override_repo and use_repo. (#25611)

Starlark / Build Language

  • Set generator_name, generator_function, generator_location, and the full Starlark stack for rule targets instantiated in a symbolic macro. (#25772)
  • Added a new boolean flag --incompatible_disable_autoloads_in_main_repo, defaulting to false. When set to true, autoloads specified by --incompatible_autoload_externally are fully disabled in the main repo. This flag will be flipped to true by default in Bazel 9. (#25530)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Aaron Sky, Chuck Grindel, Fabian Meumertzheim, Jim Carroll, jjudd, Keith Lea, kxxt, Roman Salvador, and Tyler French.

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.