Bazel 6.4.0: A Major Release with Significant Improvements

Posted on in programming

cover image for article

Bazel 6.4.0 is a major release that includes a number of new features and improvements. Some of the highlights include:

  • Remote Cache and Execution (RCE) support for multiple digest functions.
  • Support for workspace boundary files in Bash completion.
  • The ability to ignore Starlark options on commands with allowResidue = False.
  • The ability to print passed and failed methods in detailed test summaries.
  • A fix for a bug that could cause the runfiles environment variables to be cleared when running Bazel commands.

In addition to these major features, Bazel 6.4.0 also includes a number of smaller bug fixes and improvements.

Remote Cache and Execution (RCE) support for multiple digest functions

Bazel 6.4.0 adds support for multiple digest functions for Remote Cache and Execution (RCE). This allows users to choose the digest function that best suits their needs. The following digest functions are now supported:

  • BLAKE3
  • SHA-256
  • SHA-1
  • MD5

The default digest function is BLAKE3. BLAKE3 is a newer and more secure digest function than SHA-256, SHA-1, or MD5. However, some users may have existing workflows that rely on a specific digest function. Bazel 6.4.0 allows users to continue using their existing workflows by choosing the appropriate digest function.

Support for workspace boundary files in Bash completion

Bazel 6.4.0 adds support for workspace boundary files in Bash completion. Workspace boundary files are used to define the set of files that are visible to Bazel commands. This can be helpful for preventing users from accidentally modifying files that are not part of their workspace.

When Bash completion is enabled, Bazel will use the workspace boundary file to determine the set of files that are available for completion. This can help to prevent users from accidentally completing commands that involve workspace-relative paths that are not part of their workspace.

The ability to ignore Starlark options on commands with allowResidue = False

Bazel 6.4.0 adds the ability to ignore Starlark options on commands with allowResidue = False. This can be helpful for preventing errors caused by unrecognized options.

When a Bazel command is run with allowResidue = False, any unrecognized options will cause an error. This can be helpful for preventing errors caused by typos or by options that are not supported by the command.

The ability to print passed and failed methods in detailed test summaries

Bazel 6.4.0 adds the ability to print passed and failed methods in detailed test summaries. This can be helpful for debugging failing tests.

When a Bazel test fails, the detailed test summary will now include a list of all methods that were executed, along with the status of each method. This can be helpful for identifying the specific method that caused the test to fail.

A fix for a bug that could cause the runfiles environment variables to be cleared when running Bazel commands

Bazel 6.4.0 includes a fix for a bug that could cause the runfiles environment variables to be cleared when running Bazel commands. This bug could cause problems for programs that rely on the runfiles environment variables.

The bug was caused by a change in the way that Bazel handles the RUNFILES_MANIFEST file. The RUNFILES_MANIFEST file is a file that contains information about the runfiles for a Bazel target. The bug caused Bazel to clear the runfiles environment variables when the RUNFILES_MANIFEST file was changed.

The fix for this bug prevents Bazel from clearing the runfiles environment variables when the RUNFILES_MANIFEST file is changed. This ensures that programs that rely on the runfiles environment variables will continue to work correctly.

Conclusion

Bazel 6.4.0 is a major release that includes a number of new features and improvements. These features and improvements can help users to be more productive and to build more reliable software. We encourage all Bazel users to upgrade to Bazel 6.4.0.

Slaptijack's Koding Kraken