Releases: bazelbuild/bazel
6.1.2
Release 6.1.2 (2023-04-18)
Baseline: d60ce2c
Bazel 6.1.2 is a patch LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
- Patch zlib to fix compatibility with Xcode 14.3 (#18039)
- Use ctime in file digest cache key (#18101)
- Turn applicable_licenses on platforms into a no-op (#18082)
This release contains contributions from many people at Google, as well as Fabian Meumertzheim.
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.
6.1.1
Baseline: d60ce2c
Bazel 6.1.1 is patch LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes (for bug fixes) by the Bazel community and Google engineers.
C++ / Objective-C
- Revert addition of -dead_strip in default opt link flags for darwin (#17686)
- Fix wasm dynamic library extension crash (#17698)
Acknowledgements
This release contains contributions from many people at Google, as well as Ezekiel Warren, Fabian Meumertzheim, and Keith Smiley.
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.
6.1.0
Baseline: d60ce2c
Bazel 6.1.0 is a minor LTS release. It is fully backward compatible with Bazel 6.0 and contains selected changes by the Bazel community and Google engineers.
General
- Do not count tests as failed that have not started (#17269)
- Add an
--incompatible_strict_conflict_checks
alias for--experimental_strict_conflict_checks
. (#17589) - Rerun the artifact conflict check when --incompatible_strict_conflict_checks changes. (#17592)
- Add exec transition to Java version of
py_test
(#17594)
Android
- Multiplex worker fixes and tests for Android busybox tools (#17371)
- Make desugar dependencies deterministic (#17217)
Apple / Xcode
- Allow the timeout value for execute calls on a mac to be set via an environment variable
C++ / Objective-C
- Use
xcrun
to invokeinstall_name_tool
(#17253) - Add sanitizer features to
unix_cc_toolchain_config
(#17263) - Rulesets can start using the new optional form of
find_cpp_toolchain
now and benefit from the toolchain actually being optional once that has been implemented in a future version of Bazel. (#17331) - Enable
archive_param_file
feature by default for Windows (#17344) - Only try to create groups of test actions in the ui. (#17343)
- Find
libtool
when usingBAZEL_USE_CPP_ONLY_TOOLCHAIN
. (#17327) - Add
-dead_strip
in default opt link flags for darwin (#17312) - Fix a
cc_binary
bug forcc_shared_library
on Windows which preventedcc_shared_librarys
from working across packages (#17445) - Remove O1 from sanitizer feature flag defaults (#17439)
- Allow -v to libtool (#17459)
- Fix RPATHs for cc toolchain solib when sibling layout is used (#17506)
- Add
--host_features
flag (#17528) - Only fetch
@remote_coverage_tools
when collecting coverage (#17512, #17287) - Bump minimum supported macOS versions to 10.13 (#17570)
- Allow
.wasm
cc executable and dynamic library extension (#17440)
Configurability
- Do not clear
--platforms
on no-op change to--cpu
(#17273) - Set
--experimental_action_listeners
to default inexec
config (#17284) - Fix Bazel 6.0 crash regression when incompatible target skipping mixes with
--auto_cpu_environment_group
(#17613)
Coverage
- Emit LLVM coverage for source file paths with a
tmp
segment (#17324)
External Dependencies
- Fix
git_repository
with the latest version of Git. (#17247) - Add
SpellChecker
suggestions for common Bzlmod errors (#17216) - Accept tildes in
--override_module
(#17313) - Test and fix root symlink edge case in runfiles library (#17365)
- Fix Bash
runfiles_current_repository
for tools (#17329) - Fix label unambiguous canonical form to correctly report non-visible repo names (#17326)
- Prettify labels in action progress messages with Bzlmod (#17278)
- Do not recommend
shallow_since
forgit_repository
(#17356) - Bump version number in runfiles.bash init code (#17539)
- Properly report repo fetch progress during main repo mapping computation (#17544)
Java
- Register JavaCompileActionContext in Bazel (#17325)
- Fix Java coverage collection with Java 8 runtime (#17491)
- Make AutoBazelRepositoryProcessor compatible with Java 8 (#17504)
Local Execution
- Added support for user-specified resource types in the resource manager. The available amount of extra resources can be specified using the new
--local_extra_resources=<resourcename>=<amount>
command line flag, which is analogous to the existing--local_cpu_resources
and--local_memory_resources
flags. (#17229) - Allow Java coverage collection for external targets. (#17360)
- Add support for wrapping system streams in
WorkRequestHandler
(#17583)
Remote Execution
- Fix an issue where some intermediate outputs are downloaded with minimal mode when doing
bazel test
(#17234) - Make download progress not jumpy by always emitting trailing zero (#17290)
- Upload all logs in BEP even with minimal upload (#17299)
- Do the AC integrity check for disk part of the combined cache.(#17309)
- Improve BES uploader performance by not querying remote cache but always using bytestream protocol (#17352)
- Improve error message for concurrent modifications (#17396)
- Make bazel coverage work with minimal mode (#17397)
- Make Bazel more responsive and use less memory when
--jobs
is high (#17398) - Remove usage of gRPC Context cancellation in the remote execution client. (#17438)
- Reduce flakiness on Windows for BwoB tests (#17513)
- Exit with code 39 if remote cache evicted blobs that Bazel need during an invocation (#17496)
- Fix symlink file creation overhead (#17488)
- Allow following builds to continue when remote cache evicted files (#17538, #17601, #17605)
- Report background downloads for BwoB (#17619)
- Add flag
--experimental_writable_outputs
to allow Bazel generate writable outputs (#17617)
Starlark / Build Language
- Allow
map_each
to returnNone
inTemplateDict#add_joined
(#17288) - Allow
TemplateDict#map_each
callback to return a list of strings (#17306) - Added
native.package_relative_label
function (#17435)
Acknowledgements
This release contains contributions from many people at Google, as well as Ben Lee, Brentley Jones, Daniel Wagner, Ed Schouten, Ezekiel Warren, Fabian Meumertzheim, Keith Smiley, Krzysztof Naglik, Mathieu Olivari, Ted Kaplan, UebelAndre, Ozio85, Yannic, lunch-glide-pepper, and yuzhy8701.
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.
6.0.0
Bazel 6.0 is a major LTS release. It contains new features and backwards incompatible changes.
Highlights
- Bzlmod, the new external dependency system in Bazel, is now generally available (though still disabled by default). Use
--enable_bzlmod
to enable it. - Toolchain types may now be optional, in addition to mandatory.
- The author of a
.bzl
file can now callvisibility()
to declare a load visibility for that file. Load visibility is a new concept that governs which other.bzl
andBUILD
files may load.bzl
code.
General
- [Incompatible]
genrule
is switched to use exec transition instead of host. This can break targets with hardcoded output paths. To avoid using hardcoded paths use make variables, see Predefined source/output path variables. - The Build Event Protocol now contains file digests and sizes along with the file name and URI.
- Introduced a new canonical label literal syntax
@@canonical_repo_name//foo:bar
that skips repository mapping. When Bzlmod is enabled, callingstr()
on a Label object will return literals of this form. - [Incompatible] Added a new flag
--incompatible_unambiguous_label_stringification
(defaults totrue
), which causes labels in the main repo to stringify into unambiguous forms starting with an@
. (#15916) - The
some
function inquery
now contains an optional parameter that specifies the maximum number of targets to return. - Bazel no longer increases the delay between progress updates when there is no cursor control.(#16119)
Android
- D8 is used for dexing and Java 8 desugaring.
- Bazel uses the D8 jar from Maven instead of the Android SDK.
- D8 dependency updated to v. 3.3.28.
- Worker mode for D8 desugaring and dexing is supported.
--persistent_multiplex_android_tools
added to enable persistent multiplex workers for Android resource processing, dexing, and desugaring.- Merging "uses-permissions" tags in Android manifests available with
--merge_android_manifest_permissions
- Start of DX removal: Migrate
main_dex_list_creator
to D8. - Deleted the
--extra_proguard_specs
Blaze flag.
Apple / Xcode
- Bazel now matches remote and local xcode versions by the most granular version.
- Introduced an experimental static library linking API under
apple_common.link_multi_arch_static_library
. - Bazel now no longer includes system headers on macOS in coverage reports (#14969).
C++ / Objective-C
- Bazel no longer stamps
cc_common.link
actions for tool dependencies. - Switched
cc_test
,cc_binary
andcc_library
implementations to Starlark. cc_test
will now link statically when targeting Windows regardless of host platform (rather than always linking statically when Windows is the host).- [Incompatible] Split up the C++ archive from the C++ link action and set
CppArchive
as mnemonic. - [Incompatible]
objc_library
now requiresCcInfo
in its deps. If this breaks you, add emptyCcInfo()
to your rule. - The
@bazel_tools//tools/cpp:compiler
flag now has the valuegcc
if the configured compiler is detected to be gcc rather than the generic valuecompiler
. A branch forgcc
may have to be added toselect
statements that do not have a default case that handles gcc appropriately. - The
@bazel_tools//tools/cpp:compiler
flag now has the valueclang
for the auto-configured Xcode toolchain rather than the generic valuecompiler
. A branch forclang
may have to be added to select statements that do not have a default case that handles this toolchain appropriately. - [Incompatible]
include_prefix
andstrip_include_prefix
for cc rules will no longer accept an empty string (see code); use a dot instead. (#17039)
Configurability
cquery
's new--output=files
lists the output files that targets produce.genquery.scope
is faster.- New
--experimental_output_directory_naming_scheme=diff_against_baseline
may improve build speed for builds that use transitions. - Incompatible target skipping works when dependencies lack platform-appropriate toolchains.
- Enable
--use_top_level_targets_for_symlinks
so targets with transitions are more likely to appear inbazel-out/…/bin
. bazel config
now only reports info from the last build. To compare configurations across multiple builds, redirectbazel config
output to a file and run your favorite diff tool.cquery
proto formatted output now includes more information about configurations. This deprecates theconfiguration
field ofAnalysisProtosV2.ConfiguredTarget
, and adds a new field,configuration_id
, to be used instead.- [Incompatible]
--incompatible_override_toolchain_transition
is now always set and will be removed in the future.--noincompatible_override_toolchain_transition
has no effect and the value of theincompatible_use_toolchain_transition
parameter inaspect()
andrule()
builtins is ignored. select()
: improved support forconstraint_value
with new alias and specialization supportselect()
no longer reports inaccurate "Duplicate label" errors.- Bazel now correctly configures shell actions for multiplatform builds.
- [Incompatible]
--incompatible_use_platforms_repo_for_constraints
is now always set and will be removed in the future.
External Dependencies
- [Incompatible]
--noincompatible_disable_managed_directories
, and with that,workspace(managed_directories=)
is not supported anymore. - The
get_child
method ofpath
now accepts an arbitrary number of relative path strings as positional arguments. - The
new_git_repository
repository rule has been deprecated in favor ofgit_repository
. (#16064)
Java
- Packaging support for deploy JAR embedded JDK files (hermetic Java).
- Make
ijar
/java_import
preserve classes with@kotlin.Metadata
annotations. - Singlejar accepts runtime
Created-By
field. - Change singlejar metadata to report
Created-By
Bazel. - Record hermetic packaged JDK modules file size in deploy JAR manifest
JDK-Lib-Modules-Size
attribute.
Local Execution
- Made multiple improvements to dynamic execution to manage local machine resources:
--experimental_dynamic_exclude_tools
,--experimental_dynamic_load_factor
, support for ignoring certain errors in one branch, and better prioritization of local-only actions. - Fixed a race condition in dynamic execution that caused occasional crashes.
- The Linux sandbox can now run in a chroot jail only allowing access to allowlisted directories (#13279)
- Added more data to the profile: system load average (
--experimental_collect_load_average_in_profiler
), worker memory usage (--experimental_collect_worker_data_in_profiler
), system network usage (--experimental_collect_system_network_usage
), and system CPU/memory metrics. - Added option to include spawn metrics in execution log (
--experimental_execution_log_spawn_metrics
) - It is now possible to use pseudoterminals in the Linux sandbox (#14072)
- Added the
--incompatible_sandbox_hermetic_tmp
flag that makes sandboxed actions have separate/tmp
directories (Linux only). (#16336)
Packaging
- Further deprecation and removal of
pkg_tar
. Stop supporting legacy use offiles
attribute, where it could be a list of labels instead of a map of paths to labels. - Removed
--incompatible_no_build_defs_pkg
fla...
5.4.0
Release 5.4.0 (2022-12-15)
Baseline: 8d66a41
Release Notes
Bazel 5.4.0 is a minor LTS release. It is fully backward compatible with Bazel 5.0 and contains selected changes by the Bazel community and Google engineers.
- Added
rlocationpath(s)
functions suitable for theRlocation
function offered by runfiles libraries for smoother transition from Bazel 5.x.x to Bazel 6.0.0 (#16668) package(default_package_metadata=[...])
is now the preferred alternative todefault_applicable_liceneses
.default_applicable_liceneses
will be removed in a future release. (#16892)- Fixed hanging issue when Bazel fails to upload action inputs. (#16819)
- Upgraded google-auth-library-oauth2-http dependencies and fixed transitive dependency on opencensus-contrib-http-util 0.31.0. (#15639)
- Fixed coverage generation for C++ when multiple files with the same name are present. (#16672)
- Moved analysis_test into testing.analysis_test, an experimental function intended to be used only by the rules_testing repository. The move makes it easier to support both Bazel 5.4.0 and Bazel 6.0.0. (#16702)
- Keep credentials obtained from a credential helper cached across build commands.(#16884)
- Add 'toolchain' parameter to actions.{run,run_shell} (#16964)
Acknowledgements
This release contains contributions from many people at Google, as well as Andreas Fuchs, Benjamin Peterson, Brentley Jones, Dan Fleming, Danny Wolf, Emil Kattainen, Fabian Meumertzheim, Juh-Roch, Keith Smiley, Krzysztof Naglik, Niyas Sait, Noa Resare, Oliver Eikemeier, Peter Mounce, Philipp Schrader, Ryan Beasley, Thi Doãn, Yannic, Zhongpeng Lin.
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.
5.3.2
Release 5.3.2 (2022-10-19)
Baseline: 8d66a41
Cherry picks:
- 77f0233:
Update GrpcRemoteDownloader to only include relevant headers. (#16450) - 42ff95a:
Avoid unnecessary iteration on action inputs.(#16462) - d29034e:
Update flag--experimental_remote_download_regex
to accept
multiple regular expressions. (#16478)
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.
4.2.3
Release 4.2.3 (2022-10-18)
Baseline: 37a429a
Cherry picks:
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.
5.3.1
Release 5.3.1 (2022-09-19)
Baseline: 8d66a41
Cherry picks:
- 0f18786:
Do not crash on URIs without a host component.(#16199) - 9c0940d:
Add profiler task for calling a credential helper.(#16237) - 1e25152:
Fix local execution of external dynamically linked cc_* targets (#16253) - f6cccae:
add change to allow blaze info to skip Starlark build settings
that start with --no prefix (#16258)
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.
5.3.0
Release 5.3.0 (2022-08-23)
Release notes: https://blog.bazel.build/2022/08/23/bazel-5.3.html
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.
5.2.0
Release 5.2.0 (2022-06-08)
Release notes: https://blog.bazel.build/2022/06/08/bazel-5.2.html
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.