Skip to content

Releases: bazelbuild/bazel

7.4.0rc1

10 Oct 21:50
067ce4d
Compare
Choose a tag to compare
7.4.0rc1 Pre-release
Pre-release

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 7.4.0rc1 (2024-10-10)

Release Notes:

Configurability:

  • Bazel now supports all characters in the rlocation and target paths of runfiles and can be run from workspaces with a space in their full path. (#23912)

ExternalDeps:

  • Overrides in the root MODULE.bazel file are now ignored with --ignore_dev_dependency. (Overrides in non-root modules are already ignored.) (#23550)
  • Repository rules instantiated in the same module extensions can now refer to each other by their extension-specified names in label attributes. (#23585)
  • Bazel fetch and vendor command now supports --target_pattern_file for specifying target patterns. (#23663)
  • Patches to the module file in single_version_override are now effective as long as the patch file lies in the root module. (#23757)
  • override_repo and inject_repo can be used to override and inject repos in module extensions. (#23938)

Remote-Exec:

  • Improve progress message in case there are no actions in flight, and display explicitly "no actions running" in that case. (#23357)
  • Added support for using a remote cache that evicts blobs and doesn't have AC integrity check (e.g. HTTP cache). (#23561)

Rules-CPP:

  • The new cc_static_library rule produces a static library that bundles given targets and all their transitive dependencies. It has to be enabled via --experimental_cc_static_library. (#23392)
  • Add conlyopts and cxxopts attributes to cc rules (#23904)

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, bazel.build machine account, Benjamin Peterson, Cornelius Riemenschneider, Daniel Wagner-Hall, David Sanderson, Dennis van den Berg, Fabian Meumertzheim, FaBrand, Fredrik Medley, George Gensure, Grzegorz Lukasik, Jamison Lahman, Jay Conrod, Jordan Mele, Keith Smiley, Laurent Le Brun, lberki, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, xinyu.wang, Xùdōng Yáng.

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.0.0rc1

08 Oct 02:38
Compare
Choose a tag to compare
8.0.0rc1 Pre-release
Pre-release

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 8.0.0rc1 (2024-10-08)

Release Notes:

  • [Incompatible] Java runtime toolchains created via local_java_repository from @bazel_tools//tools/jdk:local_java_repository.bzl, which includes local_jdk, now have target_compatible_with set to the auto-detected host constraints. This can result in errors about toolchain resolution failures for @bazel_tools//tools/jdk:runtime_toolchain_type, especially when cross-compiling. These failures can be fixed in the following ways (listed in decreasing order of preference): * Replace java_binary targets that aren't meant to be run with bazel run or as tools during the build with java_single_jar (available in @rules_java//java:java_single_jar.bzl). Such targets do not require a Java runtime for the target configuration. * Set --java_runtime_version=remotejdk_N for some Java version N to let Bazel choose and download an appropriate remote JDK for the current target platform. This setting defaults to local_jdk, which means that Bazel can only use the local JDK, which isn't compatible with any other platform. * Manually define and register a local_java_runtime with no value set for exec_compatible_with (defaults to []) and select it by setting --java_runtime_version to its name. This fully restores the previous behavior, but can result in incorrect results when cross-compiling (see #18265).
  • "bazel aquery" now returns the headers C++ compilation actions can include if the --include_scheduling_dependencies command line option is set.
  • [Incompatible] transition is removed from objc_library (#19688)
  • This change will set the default size limit for named set of files in BEP from unlimited to 5000. In the event that the limit is reached, the message will be split.
  • [Incompatible] The attribute new_local_repository.build_file no longer accepts a path; a label must be passed instead.
  • [Incompatible] Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead.
  • [Incompatible] The --experimental_repository_cache_urls_as_default_canonical_id flag is no longer available. Instead, the http_archive, http_file, http_jar, jvm_maven_import_external, and jvm_import_external repository rules now use the URLs as the canonical ID if none is provided explicitly. If this behavior is not desired, it can be disabled via --repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0.
  • [Incompatible] --incompatible_sandbox_hermetic_tmp is enabled by default. See #19915 for migration advice.
  • [Incompatible] All labels in Bazel error messages, log output, Build Event Protocol, etc. are now prefixed with double-at (@@) instead of single-at (@) where applicable, to properly denote that they contain canonical repo names.
  • [Incompatible] Incoming transitions on rules can't be set to "exec" transition.
  • The global "applicable_licenses" attribute has been renamed to "package_metadata". The older name may be used for creating targets, but starlark code must use the name "package_metadata" to retrieve it. Breaking change.
  • WorkerMetrics of killed workers are logged (max 50 based on custom prioritization and then arranged in order of worker id). WorkerMetrics also includes the number of actions executed by each worker are now logged in the BEP. The semantics of WorkerPoolStats.evicted_count to refer to the workers that are killed (destroyed) as a result of memory pressure (evicted_count <= destroyed_count).
  • --incompatible_depset_for_java_output_source_jars is a no-op
  • JavaInfo.compilation_info.javac_options now returns a depset. Use tokenize_javacopts from @rules_java to get the options as a correctly ordered list.
  • The invocation URL in the terminal is now prominently colorized in blue.
  • [Incompatible] The BAZEL_CURRENT_REPOSITORY preprocessor variable, which holds the canonical name of the Bazel repository containing a cc_* target, is now only set during compilation if the target depends on the C/C++ runfiles library @bazel_tools//tools/cpp/runfiles via deps or implementation_deps.
  • --zip_undeclared_test_outputs now preserves symlinks when zipping $TEST_UNDECLARED_OUTPUTS_DIR.
  • [Incompatible] Toolchains and execution platforms are now registered in the following order with --enable_bzlmod: 1. root module's module file 2. WORKSPACE or WORKSPACE.bzlmod 3. non-root modules' module files 4. default toolchains registered by Bazel (does not apply with WORKSPACE.bzlmod or execution platforms)
  • [Incompatible] incompatible_enable_cc_toolchain_resolution is a no-op, enabled by default (#7260)
  • [Incompatible] cc_toolchain_suite is a no op rule (#7260).
  • [Incompatible] * On Linux, Bazel's RAM estimate for the host machine is now aware of container resource limits. * On macOS, Bazel no longer consistently overestimates the total RAM by ~5% (1024^2/1000^2). * On Windows, Bazel's RAM estimate is now generally more accurate as it is no longer influenced by JVM heuristics.
  • Log all WorkerPoolStats for all worker pools (even though workers aren't created or destroyed). Also add unknown_destroyed_count and alive_count to the WorkerPoolStats proto.
  • Added a flag --enable_workspace (defaults to True) that allows the user to completely disable WORKSPACE logic when turned off.
  • Various methods and fields related to labels and repos are deprecated in favor of new options with clearer naming and intent. The deprecated APIs can be disabled by setting --noincompatible_enable_deprecated_label_apis. * native.repository_name() is deprecated in favor of the new native.repo_name(). * Label.workspace_name is deprecated in favor of the new Label.repo_name. * Label.relative() is deprecated in favor of the new Label.local_target_label() alongside the existing native.package_relative_label() and Label().
  • [Incompatible] Passing a FilesToRunProvider to coverage_support_files will now result in an error as opposed to being silently ignored.
  • The invocation URL is re-colorized to cyan from blue due to readability issues with dark backgrounds.
  • Label.local_target_label is renamed to Label.same_package_label.
  • [Incompatible] progress messages print short primary input and output without root base
  • Update iOS tutorial link.
  • The package(distribs=[...]) attribute has been removed It has been a no-op for several years now.
  • Prevent linux-sandbox(ed) spawns from being able to write in the cgroups mount.
  • modifies visibility error to be more readable.
  • fixes overly-broad test assertion
  • The deprecated fragments["apple"].bitcode_mode and fragments["cpp"].apple_bitcode_mode APIs have been removed from Bazel. Apple deprecated Bitcode in Xcode 14.
  • [Incompatible] CppLinkAction returns 2 args to aspects that have correct quoting set (before it was always 1 args object defaulting to bash escaping)
  • bazel mod dump_repo_mapping <canonical repo name>... returns the repository mappings of the given repositories in NDJSON. This information can be used by IDEs and Starlark language servers to resolve labels with --enable_bzlmod.
  • The flag --experimental_worker_for_repo_fetching now defaults to auto, which uses virtual threads from JDK 21 if it's available. This eliminates restarts during repo fetching.
  • Bazel's Bash completion can now complete external repository labels when using --enable_bzlmod.
  • [Incompatible] The --host_jvm_profile command line argument is not supported anymore.
  • [Incompatible] The "input_manifests" argument of ctx.actions.{run,run_shell} is now a no-op. resolve_command and resolve_tools always return the empty list as the input manifest list.
  • BEP's execution_phase_time_in_ms no longer includes the analysis-only part at the beginning of the build. Artificial downtrend in execution_phase_time_in_ms expected.
  • The new bazel mod tidy subcommand automatically updates use_repo calls in the MODULE.bazel file for extensions that use module_ctx.extension_metadata.
  • Introduce new flag --experimental_worker_use_cgroups_on_linux that uses cgroups to track memory usage for singleplex workers (on Linux).
  • The scheme for generating canonical repository names has changed to improve cacheability of actions across dependency version updates. Note that canonical names are not considered to be public API and can change at any time. See https://bazel.build/external/module#repository_names_and_strict_deps for advice on how to avoid hardcoding canonical repository names.
  • [Incompatible] Coverage report generators don't get anymore the JAVA_RUNFILES and PYTHON_RUNFILES environment variables.
  • [Incompatible] apple_cc_toolchain rule was removed, use regular cc_toolchain
  • [Incompatible] "bazel query" and "bazel print_action" can't run under the output base anymore.
  • Added a new method, repository_ctx.watch(), which asks Bazel to watch for changes to an arbitrary file. When said file changes, Bazel will refetch the repo.
  • [Incompatible] The Starlark methods copts, generate_linkmap, should_strip_binary in objc fragment have been deleted. Please use the equivalent methods objccopts, objc_generate_linkmap, objc_should_strip_binary in cpp fragments instead.
  • Bazel now respects expires from Credential Helpers.
  • genrule now...
Read more

7.3.2

01 Oct 18:43
Compare
Choose a tag to compare

Note

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

Release 7.3.2 (2024-10-01)

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

Java

  • Add support for using the java rules from @rules_java (#23779)

Refer to the full list of commits for more details.

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.3.2rc1

27 Sep 15:45
c3b6ec3
Compare
Choose a tag to compare
7.3.2rc1 Pre-release
Pre-release

Note

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

Release 7.3.2rc1 (2024-09-27)

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

Java

  • Add support for using the java rules from @rules_java (#23779)

Refer to the full list of commits for more details.

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.3.1

19 Aug 17:09
Compare
Choose a tag to compare

Note

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

Release 7.3.1 (2024-08-19)

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

ExternalDeps

  • Fixed the lockfile always being considered out of date when --incompatible_use_plus_in_repo_names is set. (#23281)
  • Fixed a crash when vendoring alias targets. (#23309)

Performance

  • Revert "Deduplicate locally executed path mapped spawns” (#23290)

Refer to the full list of commits for more details.

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.3.1rc2

14 Aug 21:26
9b381af
Compare
Choose a tag to compare
7.3.1rc2 Pre-release
Pre-release

Note

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

Release 7.3.1rc2 (2024-08-14)

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

ExternalDeps

  • Fixed the lockfile always being considered out of date when --incompatible_use_plus_in_repo_names is set. (#23281)
  • Fixed a crash when vendoring alias targets. (#23309)

Performance

  • Revert "Deduplicate locally executed path mapped spawns” (#23290)

Refer to the full list of commits for more details.

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.3.1rc1

13 Aug 16:32
d89b97d
Compare
Choose a tag to compare
7.3.1rc1 Pre-release
Pre-release

Note

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

Release 7.3.1rc1 (2024-08-13)

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

ExternalDeps

  • Fixed the lockfile always being considered out of date when --incompatible_use_plus_in_repo_names is set. (#23281)

Refer to the full list of commits for more details.

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.3.0

12 Aug 16:58
Compare
Choose a tag to compare

Note

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

Release 7.3.0 (2024-08-12)

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

External Deps

  • Bazel now supports vendoring external dependencies with Bzlmod, see https://bazel.build/external/vendor for details. (#22794)
  • Added a new flag, --incompatible_use_plus_in_repo_names, which uses the plus character (+) instead of the tilde (~) in canonical repo names. This flag will be flipped to true in Bazel 8.0. (#23127)
  • The extract method is now available on module_ctx. (#22825)

Performance

  • Experimental support for path mapping CppCompile actions can be enabled via --modify_execution_info=CppCompile=+supports-path-mapping. For more information, refer to the discussion #22658. (#22876)
  • Actions that become identical when path mapped are now deduplicated during local execution (#21043)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Cornelius Riemenschneider, David Sanderson, Fabian Meumertzheim, Honnix, Jordan Mele, Laurent Le Brun, and Simon Mavi Stewart.

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.3.0rc2

07 Aug 16:24
acc1ff6
Compare
Choose a tag to compare
7.3.0rc2 Pre-release
Pre-release

Note

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

Release 7.3.0rc2 (2024-08-07)

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

External Deps

  • Bazel now supports vendoring external dependencies with Bzlmod, see https://bazel.build/external/vendor for details. (#22794)
  • Added a new flag, --incompatible_use_plus_in_repo_names, which uses the plus character (+) instead of the tilde (~) in canonical repo names. This flag will be flipped to true in Bazel 8.0. (#23127)
  • The extract method is now available on module_ctx. (#22825)

Performance

  • Experimental support for path mapping CppCompile actions can be enabled via --modify_execution_info=CppCompile=+supports-path-mapping. For more information, refer to the discussion #22658. (#22876)
  • Actions that become identical when path mapped are now deduplicated during local execution (#21043)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Cornelius Riemenschneider, David Sanderson, Fabian Meumertzheim, Honnix, Jordan Mele, Laurent Le Brun, and Simon Mavi Stewart.

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.3.0rc1

29 Jul 20:22
5f5355b
Compare
Choose a tag to compare
7.3.0rc1 Pre-release
Pre-release

Note

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

Release 7.3.0rc1 (2024-07-29)

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

External Deps

  • Bazel now supports vendoring external dependencies with Bzlmod, see https://bazel.build/external/vendor for details. (#22794)
  • Added a new flag, --incompatible_use_plus_in_repo_names, which uses the plus character (+) instead of the tilde (~) in canonical repo names. This flag will be flipped to true in Bazel 8.0. (#23127)
  • The extract method is now available on module_ctx. (#22825)

Performance

  • Experimental support for path mapping CppCompile actions can be enabled via --modify_execution_info=CppCompile=+supports-path-mapping. For more information, refer to the discussion #22658. (#22876)
  • Actions that become identical when path mapped are now deduplicated during local execution (#21043)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Cornelius Riemenschneider, David Sanderson, Fabian Meumertzheim, Honnix, Jordan Mele, Laurent Le Brun, and Simon Mavi Stewart.

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.