Skip to content

Releases: bazelbuild/bazel

7.4.1

12 Nov 18:43
Compare
Choose a tag to compare

Note

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

Release 7.4.1 (2024-11-12)

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

Core

  • Prevent excessive thread creation in disk cache garbage collection (#24114)

External Deps

  • Fixed an issue where changes to --experimental_downloader_config aren't reflected in registry access until a Bazel server restart. (#24228)

Local Execution

  • Fix double encoding of inputs in worker request (#24123)

Performance

  • Skip over runfiles middleman artifacts without a RunfilesSupplier (#24086)

Remote Execution

  • Correctly compute the number of threads to use for garbage collection. (#24111)

C++ / Objective-C

  • Revert "Propagate linkopts of header-only libraries to cc_shared_library" (#24087)
  • Revert "Fix ml path for Windows clang-cl cc toolchain (#23406)" (#24211)

Java

  • Expose last remaining private APIs for java rules migration (#24084)
  • Add missing private API for tokenizing javacopts (#24153)

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, Fabian Meumertzheim, Honnix, Matt Brown, and Roman Salvador.

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

06 Nov 19:13
24caa1d
Compare
Choose a tag to compare
7.4.1rc2 Pre-release
Pre-release

Note

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

Release 7.4.1rc2 (2024-11-06)

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

Core

  • Prevent excessive thread creation in disk cache garbage collection (#24114)

External Deps

  • Fixed an issue where changes to --experimental_downloader_config aren't reflected in registry access until a Bazel server restart. (#24228)

Local Execution

  • Fix double encoding of inputs in worker request (#24123)

Performance

  • Skip over runfiles middleman artifacts without a RunfilesSupplier (#24086)

Remote Execution

  • Correctly compute the number of threads to use for garbage collection. (#24111)

C++ / Objective-C

  • Revert "Propagate linkopts of header-only libraries to cc_shared_library" (#24087)
  • Revert "Fix ml path for Windows clang-cl cc toolchain (#23406)" (#24211)

Java

  • Expose last remaining private APIs for java rules migration (#24084)
  • Add missing private API for tokenizing javacopts (#24153)

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, Fabian Meumertzheim, Honnix, Matt Brown, and Roman Salvador.

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

29 Oct 20:37
3d8da1c
Compare
Choose a tag to compare
7.4.1rc1 Pre-release
Pre-release

Note

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

Release 7.4.1rc1 (2024-10-30)

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

Core

  • Prevent excessive thread creation in disk cache garbage collection (#24114)

Local Execution

  • Fix double encoding of inputs in worker request (#24123)

Performance

  • Skip over runfiles middleman artifacts without a RunfilesSupplier (#24086)

Remote Execution

  • Correctly compute the number of threads to use for garbage collection. (#24111)

C++ / Objective-C

  • Revert "Propagate linkopts of header-only libraries to cc_shared_library" (#24087)

Java

  • Expose last remaining private APIs for java rules migration (#24084)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Fabian Meumertzheim, Honnix, Matt Brown, and Roman Salvador.

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

28 Oct 22:46
ea35fc8
Compare
Choose a tag to compare
8.0.0rc2 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.0rc2 (2024-10-28)

Baseline: d028522

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 res...
Read more

7.4.0

22 Oct 18:21
Compare
Choose a tag to compare

Note

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

Release 7.4.0 (2024-10-22)

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

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)

External Deps

  • 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)
  • When using vendor mode, the vendor dir is automatically ignored while package loading (#23919)

Remote Execution

  • 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)
  • Implemented disk cache garbage collection (#23833)

C++ / Objective-C

  • 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)
  • Auto-load with language specific rules that're removed from Bazel with --incompatible_autoload_externally (#23906)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, 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, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, and xinyu.wang.

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.4.0rc4

18 Oct 16:21
aa47fd1
Compare
Choose a tag to compare
7.4.0rc4 Pre-release
Pre-release

Note

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

Release 7.4.0rc4 (2024-10-18)

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

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)

External Deps

  • 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)
  • When using vendor mode, the vendor dir is automatically ignored while package loading (#23919)

Remote Execution

  • 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)
  • Implemented disk cache garbage collection (#23833)

C++ / Objective-C

  • 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)
  • Auto-load with language specific rules that're removed from Bazel with --incompatible_autoload_externally (#23906)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, 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, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, and xinyu.wang.

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.4.0rc3

17 Oct 16:21
a99de87
Compare
Choose a tag to compare
7.4.0rc3 Pre-release
Pre-release

Note

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

Release 7.4.0rc3 (2024-10-17)

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

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)

External Deps

  • 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)
  • When using vendor mode, the vendor dir is automatically ignored while package loading (#23919)

Remote Execution

  • 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)
  • Implemented disk cache garbage collection (#23833)

C++ / Objective-C

  • 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)
  • Auto-load with language specific rules that're removed from Bazel with --incompatible_autoload_externally (#23906)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, 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, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, and xinyu.wang.

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

15 Oct 18:14
f0268e3
Compare
Choose a tag to compare
7.4.0rc2 Pre-release
Pre-release

Note

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

Release 7.4.0rc2 (2024-10-15)

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

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)

External Deps

  • 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)
  • When using vendor mode, the vendor dir is automatically ignored while package loading (#23919)

Remote Execution

  • 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)
  • Implemented disk cache garbage collection (#23833)

C++ / Objective-C

  • 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)
  • Auto-load with language specific rules that're removed from Bazel with --incompatible_autoload_externally (#23906)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, 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, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, and xinyu.wang.

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

Release 7.4.0rc1 (2024-10-10)

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

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)

External Deps

  • 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)
  • When using vendor mode, the vendor dir is automatically ignored while package loading (#23919)

Remote Execution

  • 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)
  • Implemented disk cache garbage collection (#23833)

C++ / Objective-C

  • 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)
  • Auto-load with language specific rules that're removed from Bazel with --incompatible_autoload_externally (#23906)

Refer to the full list of commits for more details.

Acknowledgements:

This release contains contributions from many people at Google, as well as Alessandro Patti, 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, Lior Gorelik, Luis Padron, Michael Siegrist, Son Luong Ngoc, Tom Renn, and xinyu.wang.

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)

Baseline: d028522

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 res...
Read more