-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incompatible_enable_cc_toolchain_resolution: Turn on toolchain resolution for cc rules #7260
Comments
Note that this flag will supercede and replace the previous |
New flag: --incompatible_enable_cc_toolchain_resolution This deprecates and replaces the previous flag, --enabled_toolchain_types. Part of #7260. RELNOTES[INC]: Toolchain resolution for cc rules is now enabled via an incompatible flag, --incompatible_enable_cc_toolchain_resolution. The previous flag, --enabled_toolchain_types, is deprecated and will be removed. PiperOrigin-RevId: 231277726
…lark and update find_cpp_toolchain to use it. Part of #7260. PiperOrigin-RevId: 231400764
Will native transitions like bazel/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java Line 252 in 4b00ab1
|
Yes, @aragos and I have been discussing a plan. We will probably not be able to flip this flag until we have a solution, so I am removing the "Will be flipped in" tag. |
New flag: --incompatible_enable_cc_toolchain_resolution This deprecates and replaces the previous flag, --enabled_toolchain_types. Part of bazelbuild#7260. RELNOTES[INC]: Toolchain resolution for cc rules is now enabled via an incompatible flag, --incompatible_enable_cc_toolchain_resolution. The previous flag, --enabled_toolchain_types, is deprecated and will be removed. PiperOrigin-RevId: 231277726
…lark and update find_cpp_toolchain to use it. Part of bazelbuild#7260. PiperOrigin-RevId: 231400764
Please do not assign issues to more than one team |
In order to implement this correctly (without changing the existing API) we need to thread CppConfiguration passed in cc_common.configure_feature along with FeatureConfiguration to cc_toolchain.use_pic_for_binaries. Hence FeatureConfigurationForStarlark wrapper class. This workaround will be removed once #7260 is flipped. Progress towards #6516. RELNOTES: None. PiperOrigin-RevId: 240177498
Hi all, confirming if we still plan to flip this flag in 7.0? |
Baseline: d60ce2c Cherry picks: + 490f8ba: kshyanashree is the release manager of 6.0.0 + 4e66d93: Automated rollback of commit 2a28909. + 48a8d01: Allow C/C++ coverage collection for external targets + ec7be34: Temporarily set parent directory of the input to writable if it is not. + b098434: Infer CPUs for tvOS and watchOS when on Apple Silicon + 5cea7dd: Improve the documentation for ctx.actions.symlink. + a82d26f: Add quotes to "Tip" + 75b0f3a: Write a repo mapping manifest in the runfiles directory (#16555) + 07c5c1a: Ensure repository names don't start with `~` + 30f6c82: Escape tilde more gracefully + cf3f48c: Relax `Label` repo visibility validation + 4477823: Use "apparent name" instead of "local name" in Bzlmod docs + 55f4f48: Bazel DevSite: Add required css file. + a706994: Remove logic that increases delay between progress updates over time + 1d514ab: Remove references to io_bazel repository + b0357bd: Relnotes python script + 8f95651: Allow Java coverage collection for external targets + bddb191: Fix race condition in package-bazel.sh + a757852: Decanonicalize labels emitted by {a,c,}query if possible + 9d250ed: Add uniquify parameter to TemplateDict.add_joined + f02bcf8: Fix identical gcov json file name problem + a159330: Add `$(rlocationpath(s) ...)` expansion + 56f54da: Rollup of SBOM correctness fixes (#16655) + 72e6e94: [cc] Add cc toolchain to starlark cc_proto_library (#16661) + 8f28513: Make C++ runfiles library repo mapping aware + 95f9adc: Always collect FileProvider's filesToBuild as data runfiles + 4959d34: fix: export constraints.bzl file from @local_config_platform so it can be used in downstream bzl_library targets + 4919d4a: Add --host_per_file_copt (#16695) + 0a23d46: Moving some tests for `RemoteActionFileSystem` of BwoB to a base class. + 9296068: [remote/downloader] Don't include headers in `FetchBlobRequest` + 128d833: [remote] Respect whether the server supports action cache updates + 38c5019: [remote/downloader] Migrate `Downloader` to take `Credentials` (#16732) + 5929cb7: Stage repository mapping manifest as a root symlink (#16733) + 455454a: Expose current repository name to Java with @AutoBazelRepository + 97dea59: Implement getDirectoryEntries and readdir for RemoteActionFileSystem. + aa45f5f: Move integration tests for BwoB to a base class and add more tests there. + 1b073ac: Make Java runfiles library repo mapping aware + 148bbb1: Use `_repo_mapping` in C++ runfiles library (#16752) + 25558ad: Add --experimental_action_cache_store_output_metadata to the expansio… + 6e945e8: Treat `DEBUG` events as progress-like. + 1940c5d: redact 'token' strings from logging + 0b64525: Make Bash runfiles library repo mapping aware (#16753) + 4caae75: Automated rollback of commit 8f95651. + 13ff6d9: Fix Bash rlocation failure with stricter Bash options + bd88c7e: Make bazel Android remote deps compatible with bzlmod (#16772) + 6f6d4cc: Flip `--incompatible_always_include_files_in_data` + 94355b1: Add required `--add-opens` server JVM args also with non-embedded JDK + 8349c95: Also collect clang resource directory with `-no-canonical-prefixes` + dce6ed7: Make `bazel run` works with minimal mode + ca8674c: Include source files with `cquery --output=files` (#16826) + 9cb5e0a: Fsync before rename after copy in DiskCacheClient + 23ffce5: Update GetActionResult for disk cache to check referenced files when … + 0bc0ff5: Make Java runfiles library compilable with JDK 8 + fe16965: [6.0.0] Default --incompatible_strict_conflict_checks to true. (#16864) + 99ca86f: Revert "[6.0.0] Default --incompatible_strict_conflict_checks to true. (#16864)" (#16872) + 312238f: Make C++ runfiles library build with `-Werror=shadow` + 2baa5a4: Keep credentials cached across build commands. + 8818a57: [6.0.0] Only inject metadata for outputs that cannot be reconstructed by skyf… (#16879) + 31e4bf4: Update java_tools v11.9 + cd40666: replace _get_canonical_form(label) with str(label) + e2bc237: Avoid exceptions from hermetic sandbox for unsupported artifact subclasses + b564d14: Remove warnings about ignored starlark options + 7ccc661: [6.0.0] Emit Tree objects in topological order (#16904) + 86dee6d: Correctly match regex with tree artifact + 14925b5: Always use target's attributes to set Python version (#16959) + a247502: Add 'toolchain' parameter to actions.{run,run_shell} + 497b7e4: Fix Bash `runfiles_current_repository` with RBE + 0a2c4ed: Fix corner cases in Bash runfiles library + 33b514b: Fix runfiles creation with MANIFEST when building without the bytes + 3a13af4: Remove LCOV merger dependency of `cc_test` without coverage (#17004) + 25ba76c: Include full tree artifact in inputs when prefetcher doesn't support partial tree artifacts. Incompatible changes: - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since the path would refer to a netrc file inside the external repository by absolute path. Migration should be straightforward. - genrule 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 https://docs.bazel.build/versions/4.2.2/be/make-variables.html#pre defined_label_variables - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since... - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - The --incompatible_existing_rules_immutable_view flag has been flipped to true. See #13907 for migration notes. - Split up the C++ archive from the C++ link action and set `CppArchive` as mnemonic. - workspace(managed_directories=) is not available anymore. - --legacy_important_outputs now has a default of false. - --legacy_important_outputs default reverted to true. - objc_library now requires CcInfo in its deps. If this breaks you, add empty CcInfo() to your rule. - Flag --experimental_local_memory_estimate removed. - Added a new flag --incompatible_unambiguous_label_stringification, which causes labels in the main repo to stringify into unambiguous forms starting with an @. See #15916 for more information. - analysis_test moved into testing.analysis_test - Flip incompatible_enable_cc_toolchain_resolution (#7260) - (Rollback) Flip incompatible_enable_cc_toolchain_resolution (#7260) - name parameter is removed from rule call (#16301) - name parameter is removed from rule call (#16301) - name parameter is removed from rule call (#16301) - --incompatible_remote_downloader_send_all_headers is flipped to true. See #16356 for details. - GrpcRemoteDownloader only includes relevant headers instead of sending all credentials. - In package_group's `packages` attribute, the syntax "//..." now refers to all packages in the same repository as the package group, rather than all packages everywhere. The new item "public" can be used instead to obtain the old behavior. In `bazel query --output=proto` (and `--output=xml`), the `packages` attribute now serializes with the leading double slash included (for instance, `//foo/bar/...` instead of `foo/bar/...`). See also #16355, #16323, and #16391. - Bazel no longer increases the delay between progress updates when there is no cursor control. - `--incompatible_always_include_files_in_data` is flipped to true. See #16654 for details. - `cquery --output=files` also outputs source files. Closes #16602. - `--incompatible_strict_conflict_checks` is flipped to true. See #16729 for details. - This changes the behavior of Python version in exec/host configuration. Mitigation is to set Python version on the targets. New features: - Support local_repository in Bazel Registry's source.json file Important changes: - Deprecate --incompatible_applicable_licenses flag, in preparation for removal in Bazel 6.x. - Treat py_*.srcs_version="PY2" the same as "PY2ONLY". - The Build Event Protocol now contains file digests and sizes along with the file name and URI. - Refactor system suspend event handling. - alias() can now select() directly on constraint_value() - Allow \a \b \f \v escape sequences in Starlark. - Match remote and local xcode version by most granular version. - Adds `--experimental_worker_multiplex_sandboxing` flag that controls whether to sandbox multiplex workers that support it. - provider() has a new parameter: init, a callback for performing pre-processing and validation of field values. Iff this parameter is set, provider() returns a tuple of 2 elements: the usual provider symbol (which, when called, invokes init) and a raw constructor (which bypasses init). - Tests that fail to create or complete their `TestAttemptContinuation` by throwing an `ExecException` will report an `INCOMPLETE` status. Previously, Bazel would fail to report any status for the test attempt. - Fixed an issue where Bazel could erroneously report a test passes in coverage mode without actually running the test. - Include more information about configurations in cquery proto formatted output. This deprecates the configuration field of AnalysisProtosV2.ConfiguredTarget, and adds a new field, configuration_id, to be used instead. - experimental cc_library.implementation_deps inverted to interface_deps - In aquery and cquery proto output, indicate if a configuration is a tool or non-tool configuration. - Include complete configurations in cquery proto output. - experimental cc_library.implementation_deps inverted to interface_deps - Make protocOpts() publicly accessible. - Add some documentation about how configuration information is conveyed in cquery proto output. - Introduces experimental static library linking API under apple_common.link_multi_arch_static_library - Further deprecation and removal of pkg_tar. Stop supporting legacy use of 'files' attribute, where it could be a list of labels instead of a map of paths to labels. - Removed --incompatible_no_build_defs_pkg flag. It never fulfilled its purpose because --all_incompatible_changes would never set it. The last rule it gated (pkg_tar) is scheduled to be removed in Bazel 6.x. - Add coverage configuration fragment, used to expose output_generator label. - Bazel now no longer includes system headers on macOS in coverage reports (#14969). - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - The default dexer is now d8. dx can be optionally enabled using: --define=android_dexmerger_tool=dx_dexmerger \ --define=android_incremental_dexing_tool=dx_dexbuilder \ --define=android_standalone_dexing_tool=dx_compat_dx \ --use_workers_with_dexbuilder - Packaging support for deploy JAR embedded JDK files (hermetic Java). - Don't stamp cc_common.link actions for tool dependencies. - Starlark test rules can use the new inherited_environment parameter of testing.TestEnvironment to specify environment variables whose values should be inherited from the shell environment. - Enable merging permissions during Android manifest merging with the --merge_android_manifest_permissions flag. - Allow specialization to work with constraint_values. - Bazel uses the D8 jar from Maven instead of the SDK. - Make ijar / java_import preserve classes with `@kotlin.Metadata` annotations - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Add devtools/build/lib/worker:work_request_handlers to the remote android tools release package. This will be transitively packaged into all_android_tools. - Bazel uses the D8 jar from Maven instead of the SDK. - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - Advance android_tools_pkg version to 0.24.0. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Bazel uses the D8 jar from Maven instead of the SDK. - "blaze config" now only reports info from the last build. To compare configurations across multiple builds, redirect "blaze config" output to a file and run your favorite diff tool. - The --incompatible_override_toolchain_transition flag is now always set, and will be removed in the future. Thus, --noincompatible_override_toolchain_transition has no effect, and the value of the incompatible_use_toolchain_transition parameter in aspect() and rule() builtins is ignored. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Toolchain types may now be optional, in addition to mandatory. See https://bazel.build/docs/toolchains#optional-toolchains for further details. - Add six to deps of has_services=1 py_proto_librarys. - pkg_tar(symlinks) has been removed. Users needing that feature should migrate to @rules_pkg. - Aspects can now define and use exec groups using the same API as rules. - Removed the obsolete --incompatible_applicable_licenses flag. The feature is permanently enabled. - embedded_tools packages R8 desugarer again - Bazel now selects sh path based on execution platform instead of host platform, making it possible to execute sh actions in multiplatform builds. --shell_executable now only applies to actions configured for host. - labels in genquery.scope are no longer configured. - When Bzlmod is enabled, all Bzlmod-generated repos will have an extra '@' prepended to their names. This effectively enables the canonical label literal syntax for Bzlmod-generated repos (`@@canonicalRepoName//pkg:target`; see https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDo t7bdUsjz6JFC4/edit?usp=sharing). - Exposed `CcSharedLibraryInfo` to Starlark builtins. - Enable --use_top_level_targets_for_symlinks by default. - Singlejar accepts runtime Created-By field - --noincompatible_disable_managed_directories, and with that, workspace(managed_directories=) is not supported anymore. - Bazel supports D8 desugaring, albeit without persistent workers - Remove mtime options from pkg_tar. Users should migrate to @rules_pkg. - Test for experimental multiplexed persistent resource processor. - Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive. - The legacy pkg_tar no longer supports the ability to untar and repackage an input tar file (`deps` attribute). Users needed that capability must switch to github.com/bazelbuild/rules_pkg. - `cquery`'s new output mode [`--output=files`](https://bazel.build/docs/cquery#files-output) lists the output files of the targets matching the query. It takes the current value of `--output_groups` into account. - Change singlejar metadata to report Created-By Bazel - Add support for fetching RPC credentials from credential helper. - Revert interface_deps back to implementation_deps after problem reported in. Use `buildozer 'rename deps implementation_deps' //...:%cc_library; buildozer 'rename interface_deps deps' //...:%cc_library` - Fix for desugaring failure on Bazel+Android+Windows build scenario. - D8 is the default desugarer - Migrate main_dex_list_creator to D8 (DX deprecation) - --experimental_enable_bzlmod has been renamed --enable_bzlmod, and still defaults to false. - selects() no longer produce irrelevant duplicate label checks - Adds a dexer output cache to CompatDexBuilder to improve build speed. - Improved error messages when analyzing inline bzl code - Improved error messages when analyzing inline bzl code - The `@bazel_tools//tools/cpp:compiler` flag now has the value `gcc` if the configured compiler is detected to be gcc rather than the generic value `compiler`. A branch for `gcc` may have to be added to `select` statements that do not have a default case that handles gcc appropriately. - The `get_child` method of `path` now accepts an arbitrary number of relative path strings as positional arguments. - SourceManifestAction supports `Action.content` - Add --incompatible_build_transitive_python_runfiles alias. See #16303 - The @bazel_tools//tools/cpp:compiler flag now has the value `clang` for the auto-configured Xcode toolchain rather than the generic value compiler. A branch for `clang` may have to be added to select statements that do not have a default case that handles this toolchain appropriately. - added additional debug message to warn of skipped toolchains during resolution - The deprecated --remote_allow_symlink_upload flag has been removed. Symlinks in local action outputs are always permitted, even with remote caching. Whether they're uploaded as symlinks or as the files/directories they point to is still determined by the --incompatible_remote_symlinks flag. - Added `struct`, `json`, `proto`, and `depset` to the starlark environment of Bazel's cquery (--output=starlark) command - Added three `package_group`-related flags: `--incompatible_package_group_includes_double_slash` (#16391), `--incompatible_package_group_has_public_syntax` (#16355), and `--incompatible_fix_package_group_reporoot_syntax` (#16323). With these flags, `package_group` can now easily specify "all packages", "no packages", and "all packages in the current repo". - Record hermetic packaged JDK modules file size in deploy JAR manifest 'JDK-Lib-Modules-Size' attribute. - .bzl files may now set a visibility to guard what other .bzl and BUILD files may load them. See [...] for more information. - Deletes the --extra_proguard_specs Blaze flag - The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). Work towards #16124 Fixes #10923 Closes #16428. - Starlark `print()` statements are now emitted iff the line of code is executed. They are no longer replayed on subsequent invocations unless the Starlark code is re-executed. Additionally, multiple identical `print()` statements (same string from the same line of code, e.g. from a loop) are all emitted and no longer deduplicated. - Fixes a bug where some compilation flags would not be applied to a cc_test This release contains contributions from many people at Google, as well as Adam Azarchs, Adam Singer, Adam Wolf, Albert Lloveras, Alessandro Patti, Alex Eagle, Alex Scott, Alex Torok, Andreas Fuchs, Andreas Herrmann, Andrew Katson, Andrew Klotz, Ara Nguyen, arunkumar9t2, arun.sampathkumar, Ast-x64, Benedek Thaler, Benjamin Lee, Benjamin Peterson, Ben Lee, Bohdan Vanieiev, Bo Zhang, Bo Zhang, Bradley Burns, Brandon Duffany, Brandon Jacklyn, Brentley Jones, Brentley Jones, Chad Miller, Charles-Francois Natali, Chris Clearwater, Chris Fredrickson, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, ckiffel, Cristian Hancila, crydell-ericsson, Dan Fleming, Daniel Wagner-Hall, Danny Wolf, David Ostrovsky, David Sanderson, Denys Kurylenko, dhmemi, Dimi Shahbaz, divanorama, dmaclach, Ed Schouten, Emil Kattainen, Eric Song, Eric Wendelin, Fabian Brandstetter, Fabian Meumertzheim, floriographygoth, Fredrik Medley, George Prekas, gkgoat1, gkorlam, Greg Estren, Greg, Gregory Fong, Greg Roodt, Grzegorz Lukasik, Halil Sener, Hannes Kufler, homuler, hvadehra, hvd, Igor Nazarenko, James Broadhead, Jan, Jason Tan, Jay Bazuzi, Jeremy Volkman, jheaff1, Jiawen Chen, Joel Williamson, John Laxson, John Millikin, Jonathan Gerrish, Jon Shea, Jordan, juanchoviedo, Kaiqin Chen, Keith Smiley, Ken Micklas, Kevin Lin, Kirill Zabelin, Kiron, Krishna Ersson, Krzysztof Naglik, kshyanashree, lihu, Luc Bertrand, Luis Fernando Pino Duque, lunch-glide-pepper, Marek uppa, Matt Clarkson, Matt Mackay, Michael P. Nitowski, Mikhail Balabin, Mostyn Bramley-Moore, Nick Korostelev, Nitesh Anandan, Niyas Sait, Noa Resare, Olek Wojnar, Oscar Bonilla, Patrick Balestra, Paul Tarjan, Peter Mounce, Philipp Schrader, Pras Velagapudi, Rahul Butani, Rajeshwar Reddy T, Rifqi Mulya Fahmi, Roman Salvador, rustberry, Ryan Beasley, Ryan Schmidt, Sahin Yort, Saleem Abdulrasool, Sara Adams, Shuai Zhang, Simon Bjorklen, Son Luong Ngoc, Stephan Wolski, Steve Vermeulen, Stiopa Koltsov, Sven Tiffe, Takeo Sawada, Tao Wang, Ted Kaplan, Tetsuo Kiso, Thi Doan, Thomas Chen, ThomasCJY, Thomas, Thomas Zayouna, Timothe Peignier, Tomas Volf, Tom de Goede, UebelAndre, Ulf Adams, Ulrik Falklof, vardaro, Vasilios Pantazopoulos, Vladimir Tagakov, Waleed Khan, William Muir, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic Bonenberger, Yannic Bonenberger, Yannic, Yannic, Yesudeep Mangalapilly, Yuval K, Zhongpeng Lin.
Baseline: 0a47a1f Incompatible changes: - Removing java_common.javac_jar Starlark call. - native.existing_rule now returns select values in a form that is accepted by rule instantiation. This is a breaking API change because there is some code that relies on the precise type returned, including brittle workarounds for this bug specifically and insufficiently flexible workarounds for other issues with the intersection of select and native.existing_rule. - flipped incompatible_use_toolchain_resolution_for_java_rules, see #7849 - Query output=xml/proto/location for source files will now show the location of line 1 of the source file (as the new default) instead of its location in the BUILD file. - Specifying a target pattern underneath a directory specified by .bazelignore will now emit a warning, not an error. - Query `--order_output=auto` will now sort lexicographically. However, when `somepath` is used as a top level function (e.g. `query 'somepath(a, b)'`), it will continue to output in dependency order. If you do not want the lexicographical output ordering, specify another `--order_output` value (`no`, `deps` or `full`) based on what ordering you require. - In the build event stream, BuildMetrics.TargetMetrics.targets_loaded is no longer populated. Its value was always mostly meaningless. BuildMetrics.TargetMetrics.targets_configured and BuildMetrics.ActionSummary.actions_created now include configured aspect data. - //visibility:legacy_public has been removed. - Flip and remove incompatible_dont_collect_so_artifacts (#13043). - Remove flag --experimental_no_product_name_out_symlink: it is always true. - The Starlark method generate_dsym in objc fragment has been deleted. Please use the equivalent apple_generate_dsym in cpp fragment instead. - Native libraries in data attribute are not collected. See #13550 for details - Enforce the `--profile` path to be absolute. - Enforce the --memory_profile path to be absolute. - JavaToolchainInfo.jvm_opt returns Depset instead of a list. - --apple_sdk has been deleted. It is a no-op. - --bep_publish_used_heap_size_post_build is now a no-op and will be deleted in a future release. Use --memory_profile=/dev/null instead. - Flipped --incompatible_disallow_resource_jars (see #13221). - Remove --bep_publish_used_heap_size_post_build - JSON trace profile: rename counter names. - Removed --action_graph from the dump command. - Remove `--{experimental_,}json_trace_compression` option. - Remove `--experimental_profile_cpu_usage`. - flipped --incompatible_java_common_parameters (see #12373) - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since the path would refer to a netrc file inside the external repository by absolute path. Migration should be straightforward. - genrule 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 https://docs.bazel.build/versions/4.2.2/be/make-variables.html#pre defined_label_variables - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since... - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - The --incompatible_existing_rules_immutable_view flag has been flipped to true. See #13907 for migration notes. - Split up the C++ archive from the C++ link action and set `CppArchive` as mnemonic. - workspace(managed_directories=) is not available anymore. - --legacy_important_outputs now has a default of false. - --legacy_important_outputs default reverted to true. - objc_library now requires CcInfo in its deps. If this breaks you, add empty CcInfo() to your rule. - Flag --experimental_local_memory_estimate removed. - Added a new flag --incompatible_unambiguous_label_stringification, which causes labels in the main repo to stringify into unambiguous forms starting with an @. See #15916 for more information. - analysis_test moved into testing.analysis_test - Flip incompatible_enable_cc_toolchain_resolution (#7260) - (Rollback) Flip incompatible_enable_cc_toolchain_resolution (#7260) - name parameter is removed from rule call (#16301) - name parameter is removed from rule call (#16301) - name parameter is removed from rule call (#16301) - --incompatible_remote_downloader_send_all_headers is flipped to true. See #16356 for details. - GrpcRemoteDownloader only includes relevant headers instead of sending all credentials. - In package_group's `packages` attribute, the syntax "//..." now refers to all packages in the same repository as the package group, rather than all packages everywhere. The new item "public" can be used instead to obtain the old behavior. In `bazel query --output=proto` (and `--output=xml`), the `packages` attribute now serializes with the leading double slash included (for instance, `//foo/bar/...` instead of `foo/bar/...`). See also #16355, #16323, and #16391. - This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` - Bazel no longer increases the delay between progress updates when there is no cursor control. - This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` - the --experimental_async_execution flag is now a no-op. - --experimental_replay_action_out_err is not a no-op. - `cquery --output=files` also outputs source files. - `--incompatible_strict_conflict_checks` is flipped to true. See #16729 for details. - `--incompatible_strict_conflict_checks` is flipped to true. See #16729 for details. - `--incompatible_always_include_files_in_data` is flipped to true. See #16654 for details. - This changes the behavior of Python version in exec/host configuration. Mitigation is to set Python version on the targets. - When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. - This has the side effect of changing the message on unsuccessful builds from - JSON profile: Use doubles instead of strings for counter series. - query --output=proto --order_output=deps now returns targets in topological order (previously there was no ordering). - --experimental_build_transitive_python_runfiles is flipped to false. See #16303 for details - --incompatible_python_disable_py2 is flipped to true. See #17293 for details. - When remote cache evicts blobs, Bazel will exit with code 39. - `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) - `--incompatible_strict_conflict_checks` is flipped to true. See #16729 for details. - Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. - `copy_from_rule` is exec_groups is deprecated (#17668). - --legacy_bazel_java_test is now a no-op - --legacy_bazel_java_test is now a no-op - --legacy_bazel_java_test is now a no-op - `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. - Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead - Remove high priority workers functionality from blaze. New features: - Args.add_all and Args.add_joined can now accept closures in map_each if explicitly enabled via allow_closure. - Add `--bes_header` flag to pass extra headers to the BES server. - Support local_repository in Bazel Registry's source.json file - The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. Important changes: - Flag --incompatible_objc_compile_info_migration is removed. See #10854. - Flag --incompatible_objc_compile_info_migration is removed. See #10854. - Flag --incompatible_objc_compile_info_migration is removed. See #10854. - none PAIR=cmita - The --incompatible_load_python_rules_from_bzl flag is now a no-op. - Filter all (instead of just C++) source files for coverage output according to --instrumentation_filter and --instrument_test_targets. - The `--incompatible_disable_native_apple_binary_rule` flag has been added which disables the native `apple_binary` rule. Users who need to use `apple_binary` directly (if they cannot use one of the more specific Apple rules) should load it from https://github.com/bazelbuild/rules_apple. - The Android rules' --use_singlejar_apkbuilder is now a no-op. SingleJar will always be used to build APKs. - dict.setdefault(key, ...) now fails if dict is frozen, even if it already contains key. This is an incompatible API change. - Flag --incompatible_objc_provider_remove_compile_info is removed. See #11359. - Starlark now permits def statements to be nested (closures). - native.existing_rule now returns select values in a form that is accepted by rule instantiation. This is a breaking API change, though the fallout is expected to be small. - Starlark now supports lambda (anonymous function) expressions. - The "test" and "coverage" commands no longer return 3 when a test action fails because of a system error. Instead, the exit code reflects the type of system error. - The undocumented ctx.expand feature no longer exists. - Make --legacy_dynamic_scheduler a no-op flag. - Multiplex persistent workers can now use the JSON protocol. - native.existing_rule now returns a mutable list, not a tuple, for a list-valued attributes. This is an incompatible API change. - Roll back change to have native.existing_rules use list instead of tuple. - BEP includes test suite expansions. - config_setting now honors `visibility` attribute (and defaults to `//visibility:public`) - Change the MultiArchSplitTransitionProvider to be based on platform type + CPU instead of fixed "ios_" + cpu. - enforce config_setting visibility. See #12932 for details. - add a flag to build v4 signature file - Added _direct_source_jars output group to Java related targets. END_PUBLIC - pkg_deb is no longer part of @bazel_tools//build_defs/pkg:pkg.bzl. Use https://github.com/bazelbuild/rules_pkg/tree/main/pkg instead - Allowing the lipo operations to be conditional in the linkMultiArchBinary API for Apple binaries. Single architecture slices are now returned through AppleBinaryOutput and the Starlark API. - Release restriction for "-" in the package name for Python sources. Now `py_binary` and `py_test` targets can have main source file with "-" in the path. - Users consuming BEP may assume that a `named_set_of_files` event will appear before any event referencing that `named_set` by ID. This allows consumers to process the files for such events (eg. `TargetCompleted`) immediately. - BEP includes all files from successful actions in requested output groups. Previously, an output group's files were excluded if any file in the output group was not produced due to a failing action. Users can expect BEP output to be larger for failed builds. - In BEP, TargetComplete.output_group has a new field `incomplete` indicating that the file_sets field is missing one or more declared artifacts whose generating actions failed. - The flag `--toolchain_resolution_debug` now takes a regex argument, which is used to check which toolchain types should have debug info printed. You may use `.*` as an argument to keep the current behavior of debugging every toolchain type. - Add runfiles.merge_all() for merging a sequence of runfiles objects. - runfiles.merge() and merge_all() now respect --nested_set_depth_limit. If you hit the depth limit because you were calling merge() in a loop, use merge_all() on a sequence of runfiles objects instead. - Bazel will no longer create a bazel-out symlink if --symlink_prefix is specified: the directory pointed to via the bazel-out symlink is accessible via ${symlink_prefix}-out. If this causes problems for you, set --experimental_no_product_name_out_symlink=false in your builds and file an issue. - Updates worker protocol with cancellation fields, and adds experimental_worker_cancellation flag to control cancellation. - Simplify build failure output by always using `NNN arguments`. - trim_test_configuration now defaults to on - Mark genrule.srcs as a source attribute for coverage. - When using --allow_analysis_failures (for example, via bazel-skylib's analysistest with `expect_failure = True`), analysis-time failures in aspect implementation functions will now be propagated and saved in AnalysisFailureInfo, just like analysis-time failures in rules. - cquery --noimplicit_deps now correctly filters out resolved cc_toolchains - Sign apks deterministically. - Make gcov optional in cc_toolchain tools. - If --experimental_prefer_mutual_xcode is passed, Bazel will choose the local default (instead of the newest mutually available version) if it's available both locally and remotely. - Remove java_lite_proto_library.strict_deps attribute. - Generate proguard configurations deterministically. - Adds a new flag, `--incompatible_enable_cc_test_feature` which switches from the use of build variables to the feature of the same name. - Dropped fragile xz support from built in pkg_tar. Users requiring xz compression should switch to bazlebuild/rules_pkg. - If all strategies of one branch (the local or remote execution branch) of the `dynamic` strategy fail to even accept (via the response they give from `canExec`) the action, `dynamic` will now try to see if the other branch can accept it. (Trying to run it and it failing will still cause a failure if it was the first result, this is about strategies claiming they can't even try the action) - Add `disable_annotation_processing` option to `java_common.compile`, which disables any annotation processors passed to `plugins` or in `exported_plugins` of `deps` - Remove obsolete --incompatible_prohibit_aapt1 - The minimum Android build tools version for the Android rules is now 30.0.0 - Adds --experimental_reuse_sandbox_directories flag to reuse already-created non-worker sandboxes with cleanup. - --experimental_force_gc_after_build is deprecated and will be removed soon. Use --bep_publish_used_heap_size_post_build instead - Forward coverage-instrumented files from non-tool dependencies by default. - The used_heap_size_post_build field in BEP is populated when the --memory_profile flag is set - --run_validations defaults to true. - Consider label_keyed_string_dict attributes when gathering instrumented files for coverage. - Remove flag --experimental_forward_instrumented_files_info_by_default, now that this behavior is the default. - When using MemoryProfiler with multiple GCs via the --memory_profile_stable_heap_parameters flag, we do a more precise calculation of heap used at the end of the build. This will generally result in lower values. - --bep_publish_used_heap_size_post_build is deprecated. Use --memory_profile=/dev/null instead. - Disable --all_incompatible_changes flag. - The --all_incompatible_changes flag is now a no-op - The `--toolchain_resolution_debug` flag now accepts regexes matching targets, as well as toolchain types, when choosing what debug messages to print. - Adds --experimental_existing_rules_immutable_view flag to make the native.existing_rule and native.existing_rules functions more efficient by returning immutable, lightweight dict-like view objects instead of mutable dicts. - Add support to length-delimited protos as undeclared output annotations [] - The deprecated "relative_to_caller_repository" parameter has been removed from the Label constructor. - The toolchain transition is now enabled for all toolchains. - incompatible_disable_depset_items is flipped - The --experimental_existing_rules_immutable_view flag has been renamed to --incompatible_existing_rules_immutable_view - Bazel no longer supports Java 8. From this version on, the minimum required JDK is OpenJDK 11. - Deprecate --incompatible_applicable_licenses flag, in preparation for removal in Bazel 6.x. - Treat py_*.srcs_version="PY2" the same as "PY2ONLY". - The Build Event Protocol now contains file digests and sizes along with the file name and URI. - Refactor system suspend event handling. - alias() can now select() directly on constraint_value() - Allow \a \b \f \v escape sequences in Starlark. - Match remote and local xcode version by most granular version. - Adds `--experimental_worker_multiplex_sandboxing` flag that controls whether to sandbox multiplex workers that support it. - provider() has a new parameter: init, a callback for performing pre-processing and validation of field values. Iff this parameter is set, provider() returns a tuple of 2 elements: the usual provider symbol (which, when called, invokes init) and a raw constructor (which bypasses init). - Tests that fail to create or complete their `TestAttemptContinuation` by throwing an `ExecException` will report an `INCOMPLETE` status. Previously, Bazel would fail to report any status for the test attempt. - Fixed an issue where Bazel could erroneously report a test passes in coverage mode without actually running the test. - Include more information about configurations in cquery proto formatted output. This deprecates the configuration field of AnalysisProtosV2.ConfiguredTarget, and adds a new field, configuration_id, to be used instead. - experimental cc_library.implementation_deps inverted to interface_deps - In aquery and cquery proto output, indicate if a configuration is a tool or non-tool configuration. - Include complete configurations in cquery proto output. - experimental cc_library.implementation_deps inverted to interface_deps - Make protocOpts() publicly accessible. - Add some documentation about how configuration information is conveyed in cquery proto output. - Introduces experimental static library linking API under apple_common.link_multi_arch_static_library - Further deprecation and removal of pkg_tar. Stop supporting legacy use of 'files' attribute, where it could be a list of labels instead of a map of paths to labels. - Removed --incompatible_no_build_defs_pkg flag. It never fulfilled its purpose because --all_incompatible_changes would never set it. The last rule it gated (pkg_tar) is scheduled to be removed in Bazel 6.x. - Add coverage configuration fragment, used to expose output_generator label. - Bazel now no longer includes system headers on macOS in coverage reports (#14969). - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - The default dexer is now d8. dx can be optionally enabled using: --define=android_dexmerger_tool=dx_dexmerger \ --define=android_incremental_dexing_tool=dx_dexbuilder \ --define=android_standalone_dexing_tool=dx_compat_dx \ --use_workers_with_dexbuilder - Packaging support for deploy JAR embedded JDK files (hermetic Java). - Don't stamp cc_common.link actions for tool dependencies. - Starlark test rules can use the new inherited_environment parameter of testing.TestEnvironment to specify environment variables whose values should be inherited from the shell environment. - Enable merging permissions during Android manifest merging with the --merge_android_manifest_permissions flag. - Allow specialization to work with constraint_values. - Bazel uses the D8 jar from Maven instead of the SDK. - Make ijar / java_import preserve classes with `@kotlin.Metadata` annotations - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Add devtools/build/lib/worker:work_request_handlers to the remote android tools release package. This will be transitively packaged into all_android_tools. - Bazel uses the D8 jar from Maven instead of the SDK. - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - Advance android_tools_pkg version to 0.24.0. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Bazel uses the D8 jar from Maven instead of the SDK. - "blaze config" now only reports info from the last build. To compare configurations across multiple builds, redirect "blaze config" output to a file and run your favorite diff tool. - The --incompatible_override_toolchain_transition flag is now always set, and will be removed in the future. Thus, --noincompatible_override_toolchain_transition has no effect, and the value of the incompatible_use_toolchain_transition parameter in aspect() and rule() builtins is ignored. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Toolchain types may now be optional, in addition to mandatory. See https://bazel.build/docs/toolchains#optional-toolchains for further details. - Add six to deps of has_services=1 py_proto_librarys. - pkg_tar(symlinks) has been removed. Users needing that feature should migrate to @rules_pkg. - Aspects can now define and use exec groups using the same API as rules. - Removed the obsolete --incompatible_applicable_licenses flag. The feature is permanently enabled. - embedded_tools packages R8 desugarer again - Bazel now selects sh path based on execution platform instead of host platform, making it possible to execute sh actions in multiplatform builds. --shell_executable now only applies to actions configured for host. - labels in genquery.scope are no longer configured. - When Bzlmod is enabled, all Bzlmod-generated repos will have an extra '@' prepended to their names. This effectively enables the canonical label literal syntax for Bzlmod-generated repos (`@@canonicalRepoName//pkg:target`; see https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDo t7bdUsjz6JFC4/edit?usp=sharing). - Exposed `CcSharedLibraryInfo` to Starlark builtins. - Enable --use_top_level_targets_for_symlinks by default. - Singlejar accepts runtime Created-By field - --noincompatible_disable_managed_directories, and with that, workspace(managed_directories=) is not supported anymore. - Bazel supports D8 desugaring, albeit without persistent workers - Remove mtime options from pkg_tar. Users should migrate to @rules_pkg. - Test for experimental multiplexed persistent resource processor. - Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive. - The legacy pkg_tar no longer supports the ability to untar and repackage an input tar file (`deps` attribute). Users needed that capability must switch to github.com/bazelbuild/rules_pkg. - `cquery`'s new output mode [`--output=files`](https://bazel.build/docs/cquery#files-output) lists the output files of the targets matching the query. It takes the current value of `--output_groups` into account. - Change singlejar metadata to report Created-By Bazel - Add support for fetching RPC credentials from credential helper. - Revert interface_deps back to implementation_deps after problem reported in. Use `buildozer 'rename deps implementation_deps' //...:%cc_library; buildozer 'rename interface_deps deps' //...:%cc_library` - Fix for desugaring failure on Bazel+Android+Windows build scenario. - D8 is the default desugarer - Migrate main_dex_list_creator to D8 (DX deprecation) - --experimental_enable_bzlmod has been renamed --enable_bzlmod, and still defaults to false. - selects() no longer produce irrelevant duplicate label checks - Adds a dexer output cache to CompatDexBuilder to improve build speed. - Improved error messages when analyzing inline bzl code - Improved error messages when analyzing inline bzl code - The `@bazel_tools//tools/cpp:compiler` flag now has the value `gcc` if the configured compiler is detected to be gcc rather than the generic value `compiler`. A branch for `gcc` may have to be added to `select` statements that do not have a default case that handles gcc appropriately. - The `get_child` method of `path` now accepts an arbitrary number of relative path strings as positional arguments. - SourceManifestAction supports `Action.content` - Add --incompatible_build_transitive_python_runfiles alias. See #16303 - The @bazel_tools//tools/cpp:compiler flag now has the value `clang` for the auto-configured Xcode toolchain rather than the generic value compiler. A branch for `clang` may have to be added to select statements that do not have a default case that handles this toolchain appropriately. - added additional debug message to warn of skipped toolchains during resolution - The deprecated --remote_allow_symlink_upload flag has been removed. Symlinks in local action outputs are always permitted, even with remote caching. Whether they're uploaded as symlinks or as the files/directories they point to is still determined by the --incompatible_remote_symlinks flag. - Added `struct`, `json`, `proto`, and `depset` to the starlark environment of Bazel's cquery (--output=starlark) command - Added three `package_group`-related flags: `--incompatible_package_group_includes_double_slash` (#16391), `--incompatible_package_group_has_public_syntax` (#16355), and `--incompatible_fix_package_group_reporoot_syntax` (#16323). With these flags, `package_group` can now easily specify "all packages", "no packages", and "all packages in the current repo". - Record hermetic packaged JDK modules file size in deploy JAR manifest 'JDK-Lib-Modules-Size' attribute. - .bzl files may now set a visibility to guard what other .bzl and BUILD files may load them. See [...] for more information. - Deletes the --extra_proguard_specs Blaze flag - The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). - Starlark `print()` statements are now emitted iff the line of code is executed. They are no longer replayed on subsequent invocations unless the Starlark code is re-executed. Additionally, multiple identical `print()` statements (same string from the same line of code, e.g. from a loop) are all emitted and no longer deduplicated. - Fixes a bug where some compilation flags would not be applied to a cc_test - removed outdated ctx.host_fragments - removed outdated ctx.host_configuration - Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. - Added a `native.package_relative_label()` function, which converts a label string to a Label object in the context of the calling package, in contrast to `Label()`, which does so in the context of the current .bzl file. Both functions now also accept relative labels such as `:foo`, and are idempotent. - Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. - Adds coverage metric support to android_local_test - Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. - Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. - Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. - Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. - making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @bazel_tools//platforms with or without the flag will throw error with message "Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" - Fixed an issue where WORKSPACE and WORKSPACE-loaded .bzl files couldn't see the Bzlmod root module's mappings when Bzlmod is enabled. - Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. - @bazel_tools//config:common_settings.bzl has been removed. Use @bazel_skylib//rules:common_settings.bzl instead. - cc_shared_library is no longer experimental, see #16709 for details - The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. - Added `native.module_name()` and `native.module_version()` to allow BUILD macro authors to acquire information about which Bazel module the current repo is associated with. - Add `--skip_incompatible_explicit_targets` option - Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead - cc_test can now be configured by using a native.toolchain(). - `@foo` labels can now be used on the command line as the top-level target (that is, `bazel build @foo` now works). Double-dot syntax is now forbidden (`bazel build ../foo` will no longer work). - The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. - Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. - `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` - [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. - `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` - Changed the default value for `--remote_build_event_upload` to `minimal`. - `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` - The REPO.bazel and MODULE.bazel files are now also considered workspace boundary markers. This release contains contributions from many people at Google, as well as Adam Azarchs, Adam Lavin, Adam Liddell, Adam Singer, Adam Wolf, Albert Lloveras, Alessandro Patti, Alex Eagle, Alex Eagle, Alex Eagle, Alex Scott, AlexTereshenkov, Alex Torok, Amanda L Martin, Andreas Fuchs, Andreas Herrmann, Andreas Herrmann, Andrew Katson, Andrew Klotz, Andy Hamon, Ankush Goyal, Anthony Pratti, Anthony Ter-Saakov, Ara Nguyen, Artem V. Navrotskiy, Artem Zinnatullin, arunkumar9t2, arun.sampathkumar, aryeh, Ast-x64, Austin Schuh, Benedek Thaler, Benjamin Lee, Benjamin Peterson, Benjamin Peterson, Benjamin Sigonneau, Ben Lee, Bohdan Vanieiev, Bo Zhang, Bo Zhang, Bradley Burns, Brandon Duffany, Brandon Jacklyn, Brentley Jones, Brentley Jones, bromano, Cameron Mulhern, Chad Miller, Charles-Francois Natali, Chirag Ramani, Chris Clearwater, Chris Fredrickson, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, ckiffel, Cristian Hancila, crydell-ericsson, Dan Bamikiya, Dan Fleming, Daniel Grunwald, Daniel KT, Daniel McCarney, Daniel Wagner-Hall, Danny Wolf, Dave MacLachlan, Dave Nicponski, David Cummings, David, David Ostrovsky, David Sanderson, Delwin9999, Denys Kurylenko, dhmemi, Dimi Shahbaz, divanorama, dmaclach, Dmitry Ivankov, dorranh, ecngtng, Ed Schouten, Eitan Adler, Elliotte Rusty Harold, Emil Kattainen, erenon, Eric Cousineau, Eric Song, Eric Wendelin, Ethan Steinberg, Ezekiel Warren, Fabian Brandstetter, Fabian Meumertzheim, Fabian Meumertzheim, FaBrand, Fahrzin Hemmati, Fahrzin Hemmati, Felix Ehrenpfort, Finn Ball, floriographygoth, frazze-jobb, Fredrik Medley, Garrett Holmstrom, Gaspare Vitta, Gautam Korlam, George Gensure, George Prekas, gkgoat1, gkorlam, goodspark, Greg Estren, Greg, Greg Magolan, Gregory Fong, Greg Roodt, Grzegorz Lukasik, Grzegorz Lukasik, Halil Sener, Halil Sener, Hannes Kufler, Hao Yuan, homuler, hvadehra, hvd, Igor Nazarenko, Ikko Ashimine, Jack Dai, James Broadhead, James Ma, Jan, Jason Tan, Jay Bazuzi, Jeremy Volkman, Jesse Chan, jheaff1, Jiawen Chen, Joe Lencioni, Joel Jeske, Joel Williamson, Johannes Abt, John Hinnegan, John Laxson, John Laxson, John Millikin, Jonathan Gerrish, Jonathan Schear, Jon Landis, Jon Parise, jonrose-dev, Jon Shea, Jordan, juanchoviedo, Julio Merino, Justus Tumacder, Kaiqin Chen, keertk, Keith Smiley, kekxv, Ken Micklas, Kevin Hogeland, Kevin Lin, Kirill Zabelin, Kiron, Konstantin Erman, Krishna Ersson, Krzysztof Naglik, kshyanashree, Kun-Lu, Lauri Peltonen, Lee Mracek, lihu, Liu Liu, lripoche, Lszl Csomor, Luc Bertrand, Luis Fernando Pino Duque, m, Malte Poll, Marc Zych, Marc Zych, Marek uppa, Mark Karpov, Masoud Koleini, Mathieu Olivari, Matt Clarkson, Matt Mackay, Mauricio Galindo, Max Liu, Maxwell Elliott, Menny Even Danan, menny, Michael Chinen, Michael P. Nitowski, Mikhail Balabin, mohamadk, Mostyn Bramley-Moore, Nathaniel Brough, nathyong, Nick Korostelev, Niek Peeters, Nikolay Shelukhin, Nitesh Anandan, Niyas Sait, Noa Resare, odisseus, Oleh Stolyar, Olek Wojnar, Oliver Lee, Olle Lundberg, Omar Zuniga, Oscar Bonilla, Patrick Balestra, Patrick Balestra, Paul Gschwendtner, Paul Tarjan, Peter Kasting, Peter Mounce, Philipp Schrader, Pras Velagapudi, Qais Patankar, Rabi Shanker Guha, Rahul Butani, Rai, Rajeshwar Reddy T, Red Daly, redwrasse, Rifqi Mulya Fahmi, robincaloudis, Robin Tweedie, Roger Hu, Roman Salvador, ron-stripe, rustberry, Ryan Beasley, Ryan Schmidt, Sagar Pathare, Sahin Yort, Saleem Abdulrasool, samhowes, Samuel Giddins, Sara Adams, Sascha Moecker, Sebastian Olsson, Sergey Tyurin, Severin Strobl, Shuai Zhang, Siddhesh Bhupendra Kuakde, Simon Bjorklen, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Stephan Wolski, Steve Siano, steve-the-bayesian, Steve Vermeulen, Stiopa Koltsov, susinmotion, Sven Tiffe, Takeo Sawada, Tao Wang, tatiana, tbaing, Ted Kaplan, Ted Kaplan, Tetsuo Kiso, Thaler Benedek, Thi Doan, Thi Doan, Thi Don, Thomas Carmet, Thomas Chen, ThomasCJY, Thomas, Thomas Zayouna, Thulio Ferraz Assis, Timothe Peignier, Timothy Klim, Tobi, Tomas Volf, Tom Cnops, Tom de Goede, Torgil Svensson, Trustin Lee, Ulf Adams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vaidas Pilkauskas, vardaro, Vasilios Pantazopoulos, Vertexwahn, Vladimir Tagakov, Waleed Khan, William Muir, wisechengyi, Wren Turkal, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Yannic Bonenberger, Yannic Bonenberger, Yannic, Yannic, Yesudeep Mangalapilly, Yi Cheng, Yury Evtikhov, Yuval Kaplan, Yuval K, Yuval, yuzhy8701, Zhongpeng Lin, [zqzzq].
Baseline: 0a47a1f Incompatible changes: - Removing java_common.javac_jar Starlark call. - native.existing_rule now returns select values in a form that is accepted by rule instantiation. This is a breaking API change because there is some code that relies on the precise type returned, including brittle workarounds for this bug specifically and insufficiently flexible workarounds for other issues with the intersection of select and native.existing_rule. - flipped incompatible_use_toolchain_resolution_for_java_rules, see bazelbuild#7849 - Query output=xml/proto/location for source files will now show the location of line 1 of the source file (as the new default) instead of its location in the BUILD file. - Specifying a target pattern underneath a directory specified by .bazelignore will now emit a warning, not an error. - Query `--order_output=auto` will now sort lexicographically. However, when `somepath` is used as a top level function (e.g. `query 'somepath(a, b)'`), it will continue to output in dependency order. If you do not want the lexicographical output ordering, specify another `--order_output` value (`no`, `deps` or `full`) based on what ordering you require. - In the build event stream, BuildMetrics.TargetMetrics.targets_loaded is no longer populated. Its value was always mostly meaningless. BuildMetrics.TargetMetrics.targets_configured and BuildMetrics.ActionSummary.actions_created now include configured aspect data. - //visibility:legacy_public has been removed. - Flip and remove incompatible_dont_collect_so_artifacts (bazelbuild#13043). - Remove flag --experimental_no_product_name_out_symlink: it is always true. - The Starlark method generate_dsym in objc fragment has been deleted. Please use the equivalent apple_generate_dsym in cpp fragment instead. - Native libraries in data attribute are not collected. See bazelbuild#13550 for details - Enforce the `--profile` path to be absolute. - Enforce the --memory_profile path to be absolute. - JavaToolchainInfo.jvm_opt returns Depset instead of a list. - --apple_sdk has been deleted. It is a no-op. - --bep_publish_used_heap_size_post_build is now a no-op and will be deleted in a future release. Use --memory_profile=/dev/null instead. - Flipped --incompatible_disallow_resource_jars (see bazelbuild#13221). - Remove --bep_publish_used_heap_size_post_build - JSON trace profile: rename counter names. - Removed --action_graph from the dump command. - Remove `--{experimental_,}json_trace_compression` option. - Remove `--experimental_profile_cpu_usage`. - flipped --incompatible_java_common_parameters (see bazelbuild#12373) - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since the path would refer to a netrc file inside the external repository by absolute path. Migration should be straightforward. - genrule 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 https://docs.bazel.build/versions/4.2.2/be/make-variables.html#pre defined_label_variables - this incompatible change breaks old instances of http_archive that specified netrc as an absolute path. It is unlikely there are many instances in the wild since... - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - Error Prone now checks for unused return values of additional methods on `java.lang.Object`, which can be disabled using `--javacopts=-Xep:ReturnValueIgnored:OFF` - The --incompatible_existing_rules_immutable_view flag has been flipped to true. See bazelbuild#13907 for migration notes. - Split up the C++ archive from the C++ link action and set `CppArchive` as mnemonic. - workspace(managed_directories=) is not available anymore. - --legacy_important_outputs now has a default of false. - --legacy_important_outputs default reverted to true. - objc_library now requires CcInfo in its deps. If this breaks you, add empty CcInfo() to your rule. - Flag --experimental_local_memory_estimate removed. - Added a new flag --incompatible_unambiguous_label_stringification, which causes labels in the main repo to stringify into unambiguous forms starting with an @. See bazelbuild#15916 for more information. - analysis_test moved into testing.analysis_test - Flip incompatible_enable_cc_toolchain_resolution (bazelbuild#7260) - (Rollback) Flip incompatible_enable_cc_toolchain_resolution (bazelbuild#7260) - name parameter is removed from rule call (bazelbuild#16301) - name parameter is removed from rule call (bazelbuild#16301) - name parameter is removed from rule call (bazelbuild#16301) - --incompatible_remote_downloader_send_all_headers is flipped to true. See bazelbuild#16356 for details. - GrpcRemoteDownloader only includes relevant headers instead of sending all credentials. - In package_group's `packages` attribute, the syntax "//..." now refers to all packages in the same repository as the package group, rather than all packages everywhere. The new item "public" can be used instead to obtain the old behavior. In `bazel query --output=proto` (and `--output=xml`), the `packages` attribute now serializes with the leading double slash included (for instance, `//foo/bar/...` instead of `foo/bar/...`). See also bazelbuild#16355, bazelbuild#16323, and bazelbuild#16391. - This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` - Bazel no longer increases the delay between progress updates when there is no cursor control. - This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` - the --experimental_async_execution flag is now a no-op. - --experimental_replay_action_out_err is not a no-op. - `cquery --output=files` also outputs source files. - `--incompatible_strict_conflict_checks` is flipped to true. See bazelbuild#16729 for details. - `--incompatible_strict_conflict_checks` is flipped to true. See bazelbuild#16729 for details. - `--incompatible_always_include_files_in_data` is flipped to true. See bazelbuild#16654 for details. - This changes the behavior of Python version in exec/host configuration. Mitigation is to set Python version on the targets. - When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. - This has the side effect of changing the message on unsuccessful builds from - JSON profile: Use doubles instead of strings for counter series. - query --output=proto --order_output=deps now returns targets in topological order (previously there was no ordering). - --experimental_build_transitive_python_runfiles is flipped to false. See bazelbuild#16303 for details - --incompatible_python_disable_py2 is flipped to true. See bazelbuild#17293 for details. - When remote cache evicts blobs, Bazel will exit with code 39. - `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) - `--incompatible_strict_conflict_checks` is flipped to true. See bazelbuild#16729 for details. - Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. - `copy_from_rule` is exec_groups is deprecated (bazelbuild#17668). - --legacy_bazel_java_test is now a no-op - --legacy_bazel_java_test is now a no-op - --legacy_bazel_java_test is now a no-op - `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. - Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead - Remove high priority workers functionality from blaze. New features: - Args.add_all and Args.add_joined can now accept closures in map_each if explicitly enabled via allow_closure. - Add `--bes_header` flag to pass extra headers to the BES server. - Support local_repository in Bazel Registry's source.json file - The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. Important changes: - Flag --incompatible_objc_compile_info_migration is removed. See bazelbuild#10854. - Flag --incompatible_objc_compile_info_migration is removed. See bazelbuild#10854. - Flag --incompatible_objc_compile_info_migration is removed. See bazelbuild#10854. - none PAIR=cmita - The --incompatible_load_python_rules_from_bzl flag is now a no-op. - Filter all (instead of just C++) source files for coverage output according to --instrumentation_filter and --instrument_test_targets. - The `--incompatible_disable_native_apple_binary_rule` flag has been added which disables the native `apple_binary` rule. Users who need to use `apple_binary` directly (if they cannot use one of the more specific Apple rules) should load it from https://github.com/bazelbuild/rules_apple. - The Android rules' --use_singlejar_apkbuilder is now a no-op. SingleJar will always be used to build APKs. - dict.setdefault(key, ...) now fails if dict is frozen, even if it already contains key. This is an incompatible API change. - Flag --incompatible_objc_provider_remove_compile_info is removed. See bazelbuild#11359. - Starlark now permits def statements to be nested (closures). - native.existing_rule now returns select values in a form that is accepted by rule instantiation. This is a breaking API change, though the fallout is expected to be small. - Starlark now supports lambda (anonymous function) expressions. - The "test" and "coverage" commands no longer return 3 when a test action fails because of a system error. Instead, the exit code reflects the type of system error. - The undocumented ctx.expand feature no longer exists. - Make --legacy_dynamic_scheduler a no-op flag. - Multiplex persistent workers can now use the JSON protocol. - native.existing_rule now returns a mutable list, not a tuple, for a list-valued attributes. This is an incompatible API change. - Roll back change to have native.existing_rules use list instead of tuple. - BEP includes test suite expansions. - config_setting now honors `visibility` attribute (and defaults to `//visibility:public`) - Change the MultiArchSplitTransitionProvider to be based on platform type + CPU instead of fixed "ios_" + cpu. - enforce config_setting visibility. See bazelbuild#12932 for details. - add a flag to build v4 signature file - Added _direct_source_jars output group to Java related targets. END_PUBLIC - pkg_deb is no longer part of @bazel_tools//build_defs/pkg:pkg.bzl. Use https://github.com/bazelbuild/rules_pkg/tree/main/pkg instead - Allowing the lipo operations to be conditional in the linkMultiArchBinary API for Apple binaries. Single architecture slices are now returned through AppleBinaryOutput and the Starlark API. - Release restriction for "-" in the package name for Python sources. Now `py_binary` and `py_test` targets can have main source file with "-" in the path. - Users consuming BEP may assume that a `named_set_of_files` event will appear before any event referencing that `named_set` by ID. This allows consumers to process the files for such events (eg. `TargetCompleted`) immediately. - BEP includes all files from successful actions in requested output groups. Previously, an output group's files were excluded if any file in the output group was not produced due to a failing action. Users can expect BEP output to be larger for failed builds. - In BEP, TargetComplete.output_group has a new field `incomplete` indicating that the file_sets field is missing one or more declared artifacts whose generating actions failed. - The flag `--toolchain_resolution_debug` now takes a regex argument, which is used to check which toolchain types should have debug info printed. You may use `.*` as an argument to keep the current behavior of debugging every toolchain type. - Add runfiles.merge_all() for merging a sequence of runfiles objects. - runfiles.merge() and merge_all() now respect --nested_set_depth_limit. If you hit the depth limit because you were calling merge() in a loop, use merge_all() on a sequence of runfiles objects instead. - Bazel will no longer create a bazel-out symlink if --symlink_prefix is specified: the directory pointed to via the bazel-out symlink is accessible via ${symlink_prefix}-out. If this causes problems for you, set --experimental_no_product_name_out_symlink=false in your builds and file an issue. - Updates worker protocol with cancellation fields, and adds experimental_worker_cancellation flag to control cancellation. - Simplify build failure output by always using `NNN arguments`. - trim_test_configuration now defaults to on - Mark genrule.srcs as a source attribute for coverage. - When using --allow_analysis_failures (for example, via bazel-skylib's analysistest with `expect_failure = True`), analysis-time failures in aspect implementation functions will now be propagated and saved in AnalysisFailureInfo, just like analysis-time failures in rules. - cquery --noimplicit_deps now correctly filters out resolved cc_toolchains - Sign apks deterministically. - Make gcov optional in cc_toolchain tools. - If --experimental_prefer_mutual_xcode is passed, Bazel will choose the local default (instead of the newest mutually available version) if it's available both locally and remotely. - Remove java_lite_proto_library.strict_deps attribute. - Generate proguard configurations deterministically. - Adds a new flag, `--incompatible_enable_cc_test_feature` which switches from the use of build variables to the feature of the same name. - Dropped fragile xz support from built in pkg_tar. Users requiring xz compression should switch to bazlebuild/rules_pkg. - If all strategies of one branch (the local or remote execution branch) of the `dynamic` strategy fail to even accept (via the response they give from `canExec`) the action, `dynamic` will now try to see if the other branch can accept it. (Trying to run it and it failing will still cause a failure if it was the first result, this is about strategies claiming they can't even try the action) - Add `disable_annotation_processing` option to `java_common.compile`, which disables any annotation processors passed to `plugins` or in `exported_plugins` of `deps` - Remove obsolete --incompatible_prohibit_aapt1 - The minimum Android build tools version for the Android rules is now 30.0.0 - Adds --experimental_reuse_sandbox_directories flag to reuse already-created non-worker sandboxes with cleanup. - --experimental_force_gc_after_build is deprecated and will be removed soon. Use --bep_publish_used_heap_size_post_build instead - Forward coverage-instrumented files from non-tool dependencies by default. - The used_heap_size_post_build field in BEP is populated when the --memory_profile flag is set - --run_validations defaults to true. - Consider label_keyed_string_dict attributes when gathering instrumented files for coverage. - Remove flag --experimental_forward_instrumented_files_info_by_default, now that this behavior is the default. - When using MemoryProfiler with multiple GCs via the --memory_profile_stable_heap_parameters flag, we do a more precise calculation of heap used at the end of the build. This will generally result in lower values. - --bep_publish_used_heap_size_post_build is deprecated. Use --memory_profile=/dev/null instead. - Disable --all_incompatible_changes flag. - The --all_incompatible_changes flag is now a no-op - The `--toolchain_resolution_debug` flag now accepts regexes matching targets, as well as toolchain types, when choosing what debug messages to print. - Adds --experimental_existing_rules_immutable_view flag to make the native.existing_rule and native.existing_rules functions more efficient by returning immutable, lightweight dict-like view objects instead of mutable dicts. - Add support to length-delimited protos as undeclared output annotations [] - The deprecated "relative_to_caller_repository" parameter has been removed from the Label constructor. - The toolchain transition is now enabled for all toolchains. - incompatible_disable_depset_items is flipped - The --experimental_existing_rules_immutable_view flag has been renamed to --incompatible_existing_rules_immutable_view - Bazel no longer supports Java 8. From this version on, the minimum required JDK is OpenJDK 11. - Deprecate --incompatible_applicable_licenses flag, in preparation for removal in Bazel 6.x. - Treat py_*.srcs_version="PY2" the same as "PY2ONLY". - The Build Event Protocol now contains file digests and sizes along with the file name and URI. - Refactor system suspend event handling. - alias() can now select() directly on constraint_value() - Allow \a \b \f \v escape sequences in Starlark. - Match remote and local xcode version by most granular version. - Adds `--experimental_worker_multiplex_sandboxing` flag that controls whether to sandbox multiplex workers that support it. - provider() has a new parameter: init, a callback for performing pre-processing and validation of field values. Iff this parameter is set, provider() returns a tuple of 2 elements: the usual provider symbol (which, when called, invokes init) and a raw constructor (which bypasses init). - Tests that fail to create or complete their `TestAttemptContinuation` by throwing an `ExecException` will report an `INCOMPLETE` status. Previously, Bazel would fail to report any status for the test attempt. - Fixed an issue where Bazel could erroneously report a test passes in coverage mode without actually running the test. - Include more information about configurations in cquery proto formatted output. This deprecates the configuration field of AnalysisProtosV2.ConfiguredTarget, and adds a new field, configuration_id, to be used instead. - experimental cc_library.implementation_deps inverted to interface_deps - In aquery and cquery proto output, indicate if a configuration is a tool or non-tool configuration. - Include complete configurations in cquery proto output. - experimental cc_library.implementation_deps inverted to interface_deps - Make protocOpts() publicly accessible. - Add some documentation about how configuration information is conveyed in cquery proto output. - Introduces experimental static library linking API under apple_common.link_multi_arch_static_library - Further deprecation and removal of pkg_tar. Stop supporting legacy use of 'files' attribute, where it could be a list of labels instead of a map of paths to labels. - Removed --incompatible_no_build_defs_pkg flag. It never fulfilled its purpose because --all_incompatible_changes would never set it. The last rule it gated (pkg_tar) is scheduled to be removed in Bazel 6.x. - Add coverage configuration fragment, used to expose output_generator label. - Bazel now no longer includes system headers on macOS in coverage reports (bazelbuild#14969). - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - The default dexer is now d8. dx can be optionally enabled using: --define=android_dexmerger_tool=dx_dexmerger \ --define=android_incremental_dexing_tool=dx_dexbuilder \ --define=android_standalone_dexing_tool=dx_compat_dx \ --use_workers_with_dexbuilder - Packaging support for deploy JAR embedded JDK files (hermetic Java). - Don't stamp cc_common.link actions for tool dependencies. - Starlark test rules can use the new inherited_environment parameter of testing.TestEnvironment to specify environment variables whose values should be inherited from the shell environment. - Enable merging permissions during Android manifest merging with the --merge_android_manifest_permissions flag. - Allow specialization to work with constraint_values. - Bazel uses the D8 jar from Maven instead of the SDK. - Make ijar / java_import preserve classes with `@kotlin.Metadata` annotations - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Add devtools/build/lib/worker:work_request_handlers to the remote android tools release package. This will be transitively packaged into all_android_tools. - Bazel uses the D8 jar from Maven instead of the SDK. - android_sdk_repository read $ANDROID_SDK_ROOT in addition to $ANDROID_HOME. - Advance android_tools_pkg version to 0.24.0. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Bazel uses the D8 jar from Maven instead of the SDK. - "blaze config" now only reports info from the last build. To compare configurations across multiple builds, redirect "blaze config" output to a file and run your favorite diff tool. - The --incompatible_override_toolchain_transition flag is now always set, and will be removed in the future. Thus, --noincompatible_override_toolchain_transition has no effect, and the value of the incompatible_use_toolchain_transition parameter in aspect() and rule() builtins is ignored. - Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). - Toolchain types may now be optional, in addition to mandatory. See https://bazel.build/docs/toolchains#optional-toolchains for further details. - Add six to deps of has_services=1 py_proto_librarys. - pkg_tar(symlinks) has been removed. Users needing that feature should migrate to @rules_pkg. - Aspects can now define and use exec groups using the same API as rules. - Removed the obsolete --incompatible_applicable_licenses flag. The feature is permanently enabled. - embedded_tools packages R8 desugarer again - Bazel now selects sh path based on execution platform instead of host platform, making it possible to execute sh actions in multiplatform builds. --shell_executable now only applies to actions configured for host. - labels in genquery.scope are no longer configured. - When Bzlmod is enabled, all Bzlmod-generated repos will have an extra '@' prepended to their names. This effectively enables the canonical label literal syntax for Bzlmod-generated repos (`@@canonicalRepoName//pkg:target`; see https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDo t7bdUsjz6JFC4/edit?usp=sharing). - Exposed `CcSharedLibraryInfo` to Starlark builtins. - Enable --use_top_level_targets_for_symlinks by default. - Singlejar accepts runtime Created-By field - --noincompatible_disable_managed_directories, and with that, workspace(managed_directories=) is not supported anymore. - Bazel supports D8 desugaring, albeit without persistent workers - Remove mtime options from pkg_tar. Users should migrate to @rules_pkg. - Test for experimental multiplexed persistent resource processor. - Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive. - The legacy pkg_tar no longer supports the ability to untar and repackage an input tar file (`deps` attribute). Users needed that capability must switch to github.com/bazelbuild/rules_pkg. - `cquery`'s new output mode [`--output=files`](https://bazel.build/docs/cquery#files-output) lists the output files of the targets matching the query. It takes the current value of `--output_groups` into account. - Change singlejar metadata to report Created-By Bazel - Add support for fetching RPC credentials from credential helper. - Revert interface_deps back to implementation_deps after problem reported in. Use `buildozer 'rename deps implementation_deps' //...:%cc_library; buildozer 'rename interface_deps deps' //...:%cc_library` - Fix for desugaring failure on Bazel+Android+Windows build scenario. - D8 is the default desugarer - Migrate main_dex_list_creator to D8 (DX deprecation) - --experimental_enable_bzlmod has been renamed --enable_bzlmod, and still defaults to false. - selects() no longer produce irrelevant duplicate label checks - Adds a dexer output cache to CompatDexBuilder to improve build speed. - Improved error messages when analyzing inline bzl code - Improved error messages when analyzing inline bzl code - The `@bazel_tools//tools/cpp:compiler` flag now has the value `gcc` if the configured compiler is detected to be gcc rather than the generic value `compiler`. A branch for `gcc` may have to be added to `select` statements that do not have a default case that handles gcc appropriately. - The `get_child` method of `path` now accepts an arbitrary number of relative path strings as positional arguments. - SourceManifestAction supports `Action.content` - Add --incompatible_build_transitive_python_runfiles alias. See bazelbuild#16303 - The @bazel_tools//tools/cpp:compiler flag now has the value `clang` for the auto-configured Xcode toolchain rather than the generic value compiler. A branch for `clang` may have to be added to select statements that do not have a default case that handles this toolchain appropriately. - added additional debug message to warn of skipped toolchains during resolution - The deprecated --remote_allow_symlink_upload flag has been removed. Symlinks in local action outputs are always permitted, even with remote caching. Whether they're uploaded as symlinks or as the files/directories they point to is still determined by the --incompatible_remote_symlinks flag. - Added `struct`, `json`, `proto`, and `depset` to the starlark environment of Bazel's cquery (--output=starlark) command - Added three `package_group`-related flags: `--incompatible_package_group_includes_double_slash` (bazelbuild#16391), `--incompatible_package_group_has_public_syntax` (bazelbuild#16355), and `--incompatible_fix_package_group_reporoot_syntax` (bazelbuild#16323). With these flags, `package_group` can now easily specify "all packages", "no packages", and "all packages in the current repo". - Record hermetic packaged JDK modules file size in deploy JAR manifest 'JDK-Lib-Modules-Size' attribute. - .bzl files may now set a visibility to guard what other .bzl and BUILD files may load them. See [...] for more information. - Deletes the --extra_proguard_specs Blaze flag - The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). - Starlark `print()` statements are now emitted iff the line of code is executed. They are no longer replayed on subsequent invocations unless the Starlark code is re-executed. Additionally, multiple identical `print()` statements (same string from the same line of code, e.g. from a loop) are all emitted and no longer deduplicated. - Fixes a bug where some compilation flags would not be applied to a cc_test - removed outdated ctx.host_fragments - removed outdated ctx.host_configuration - Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. - Added a `native.package_relative_label()` function, which converts a label string to a Label object in the context of the calling package, in contrast to `Label()`, which does so in the context of the current .bzl file. Both functions now also accept relative labels such as `:foo`, and are idempotent. - Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. - Adds coverage metric support to android_local_test - Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. - Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. - Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. - Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. - making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @bazel_tools//platforms with or without the flag will throw error with message "Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" - Fixed an issue where WORKSPACE and WORKSPACE-loaded .bzl files couldn't see the Bzlmod root module's mappings when Bzlmod is enabled. - Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. - @bazel_tools//config:common_settings.bzl has been removed. Use @bazel_skylib//rules:common_settings.bzl instead. - cc_shared_library is no longer experimental, see bazelbuild#16709 for details - The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. - Added `native.module_name()` and `native.module_version()` to allow BUILD macro authors to acquire information about which Bazel module the current repo is associated with. - Add `--skip_incompatible_explicit_targets` option - Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead - cc_test can now be configured by using a native.toolchain(). - `@foo` labels can now be used on the command line as the top-level target (that is, `bazel build @foo` now works). Double-dot syntax is now forbidden (`bazel build ../foo` will no longer work). - The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. - Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. - `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` - [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. - `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` - Changed the default value for `--remote_build_event_upload` to `minimal`. - `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` - The REPO.bazel and MODULE.bazel files are now also considered workspace boundary markers. This release contains contributions from many people at Google, as well as Adam Azarchs, Adam Lavin, Adam Liddell, Adam Singer, Adam Wolf, Albert Lloveras, Alessandro Patti, Alex Eagle, Alex Eagle, Alex Eagle, Alex Scott, AlexTereshenkov, Alex Torok, Amanda L Martin, Andreas Fuchs, Andreas Herrmann, Andreas Herrmann, Andrew Katson, Andrew Klotz, Andy Hamon, Ankush Goyal, Anthony Pratti, Anthony Ter-Saakov, Ara Nguyen, Artem V. Navrotskiy, Artem Zinnatullin, arunkumar9t2, arun.sampathkumar, aryeh, Ast-x64, Austin Schuh, Benedek Thaler, Benjamin Lee, Benjamin Peterson, Benjamin Peterson, Benjamin Sigonneau, Ben Lee, Bohdan Vanieiev, Bo Zhang, Bo Zhang, Bradley Burns, Brandon Duffany, Brandon Jacklyn, Brentley Jones, Brentley Jones, bromano, Cameron Mulhern, Chad Miller, Charles-Francois Natali, Chirag Ramani, Chris Clearwater, Chris Fredrickson, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, ckiffel, Cristian Hancila, crydell-ericsson, Dan Bamikiya, Dan Fleming, Daniel Grunwald, Daniel KT, Daniel McCarney, Daniel Wagner-Hall, Danny Wolf, Dave MacLachlan, Dave Nicponski, David Cummings, David, David Ostrovsky, David Sanderson, Delwin9999, Denys Kurylenko, dhmemi, Dimi Shahbaz, divanorama, dmaclach, Dmitry Ivankov, dorranh, ecngtng, Ed Schouten, Eitan Adler, Elliotte Rusty Harold, Emil Kattainen, erenon, Eric Cousineau, Eric Song, Eric Wendelin, Ethan Steinberg, Ezekiel Warren, Fabian Brandstetter, Fabian Meumertzheim, Fabian Meumertzheim, FaBrand, Fahrzin Hemmati, Fahrzin Hemmati, Felix Ehrenpfort, Finn Ball, floriographygoth, frazze-jobb, Fredrik Medley, Garrett Holmstrom, Gaspare Vitta, Gautam Korlam, George Gensure, George Prekas, gkgoat1, gkorlam, goodspark, Greg Estren, Greg, Greg Magolan, Gregory Fong, Greg Roodt, Grzegorz Lukasik, Grzegorz Lukasik, Halil Sener, Halil Sener, Hannes Kufler, Hao Yuan, homuler, hvadehra, hvd, Igor Nazarenko, Ikko Ashimine, Jack Dai, James Broadhead, James Ma, Jan, Jason Tan, Jay Bazuzi, Jeremy Volkman, Jesse Chan, jheaff1, Jiawen Chen, Joe Lencioni, Joel Jeske, Joel Williamson, Johannes Abt, John Hinnegan, John Laxson, John Laxson, John Millikin, Jonathan Gerrish, Jonathan Schear, Jon Landis, Jon Parise, jonrose-dev, Jon Shea, Jordan, juanchoviedo, Julio Merino, Justus Tumacder, Kaiqin Chen, keertk, Keith Smiley, kekxv, Ken Micklas, Kevin Hogeland, Kevin Lin, Kirill Zabelin, Kiron, Konstantin Erman, Krishna Ersson, Krzysztof Naglik, kshyanashree, Kun-Lu, Lauri Peltonen, Lee Mracek, lihu, Liu Liu, lripoche, Lszl Csomor, Luc Bertrand, Luis Fernando Pino Duque, m, Malte Poll, Marc Zych, Marc Zych, Marek uppa, Mark Karpov, Masoud Koleini, Mathieu Olivari, Matt Clarkson, Matt Mackay, Mauricio Galindo, Max Liu, Maxwell Elliott, Menny Even Danan, menny, Michael Chinen, Michael P. Nitowski, Mikhail Balabin, mohamadk, Mostyn Bramley-Moore, Nathaniel Brough, nathyong, Nick Korostelev, Niek Peeters, Nikolay Shelukhin, Nitesh Anandan, Niyas Sait, Noa Resare, odisseus, Oleh Stolyar, Olek Wojnar, Oliver Lee, Olle Lundberg, Omar Zuniga, Oscar Bonilla, Patrick Balestra, Patrick Balestra, Paul Gschwendtner, Paul Tarjan, Peter Kasting, Peter Mounce, Philipp Schrader, Pras Velagapudi, Qais Patankar, Rabi Shanker Guha, Rahul Butani, Rai, Rajeshwar Reddy T, Red Daly, redwrasse, Rifqi Mulya Fahmi, robincaloudis, Robin Tweedie, Roger Hu, Roman Salvador, ron-stripe, rustberry, Ryan Beasley, Ryan Schmidt, Sagar Pathare, Sahin Yort, Saleem Abdulrasool, samhowes, Samuel Giddins, Sara Adams, Sascha Moecker, Sebastian Olsson, Sergey Tyurin, Severin Strobl, Shuai Zhang, Siddhesh Bhupendra Kuakde, Simon Bjorklen, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Stephan Wolski, Steve Siano, steve-the-bayesian, Steve Vermeulen, Stiopa Koltsov, susinmotion, Sven Tiffe, Takeo Sawada, Tao Wang, tatiana, tbaing, Ted Kaplan, Ted Kaplan, Tetsuo Kiso, Thaler Benedek, Thi Doan, Thi Doan, Thi Don, Thomas Carmet, Thomas Chen, ThomasCJY, Thomas, Thomas Zayouna, Thulio Ferraz Assis, Timothe Peignier, Timothy Klim, Tobi, Tomas Volf, Tom Cnops, Tom de Goede, Torgil Svensson, Trustin Lee, Ulf Adams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vaidas Pilkauskas, vardaro, Vasilios Pantazopoulos, Vertexwahn, Vladimir Tagakov, Waleed Khan, William Muir, wisechengyi, Wren Turkal, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Yannic Bonenberger, Yannic Bonenberger, Yannic, Yannic, Yesudeep Mangalapilly, Yi Cheng, Yury Evtikhov, Yuval Kaplan, Yuval K, Yuval, yuzhy8701, Zhongpeng Lin, [zqzzq].
Baseline: 1cf392f Cherry picks: + 32563ca: [Skymeld] Avoid printing extra WARNINGS for execution failures in -k. + 19f5e93: Automated rollback of commit f064184. Incompatible changes: - `cmd_helper` module was removed - `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. - Fails on unknown attributes (even when set to None). See #19403 - Flip incompatible_enable_cc_toolchain_resolution (#7260) Important changes: - Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. - Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. This release contains contributions from many people at Google, as well as Benjamin Peterson, Boleyn Su, Brentley Jones, Daniel Wagner-Hall, Fabian Meumertzheim, Keith Smiley, Roman Salvador, Timothy Gu.
Should this issue be closed since the flag is now flipped? |
Closing the issue when the flag is removed. Or perhaps leaving it open, so that users can more easily find migration instructions? |
Make crosstool_top flag a no-op and remove the code used to retrieve toolchain from crosstool_top. Remove the tests related to crosstop or incompatible_enable_cc_toolchain_resolution. Those tests can't work anymore, becuase the functionality is removed. There are some further cleanups, like removing _cc_toolchain attribute from the rules. RELNOTES[INC]: incompatible_enable_cc_toolchain_resolution is a no-op, enabled by default (#7260) PiperOrigin-RevId: 588363296 Change-Id: I8af466628ce9c8d9175533255faef36968570aa4
Remove cc_toolchain_suite from Bazel's unit tests. The rule cc_toolchain_suite doesn't participate in toolchain resolution anymore. It may be used in cc_library.toolchains or genrule.toolchains, where a simple replacement with //tools/cpp:current_cc_toolchain works. Removing the rule is an incompatible change (because transitions depend on the label value). That will require a cleanup. That's why making it a no-op first. RELNOTES[INC]: cc_toolchain_suite is a no op rule (#7260). PiperOrigin-RevId: 588364153 Change-Id: I3502554628c442ddf38b52cb949bdaa128e641e9
Baseline: d60ce2c Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @bazel_tools//platforms with or without the flag will throw error with message "Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @bazel_tools//config:common_settings.bzl has been removed. Use @bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (#17668). + cc_shared_library is no longer experimental, see #16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to #18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See #19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See #19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at #18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #18262. Commit f79ca02 + none Commit 7d87996 + None Commit 0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #19992. Commit 76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (#19688) (cherry picked from commit b4292d2) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit 491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #19915 for migration advice. Closes #19943. Commit e2c0276 + **[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`. Fixes #19749 Closes #20047. + None Commit 65f847a + None Commit 9bbc2cb + none Fixes #19920 Commit 886b13f + **[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`. Fixes #20371 Closes #20388. Commit 454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit 8e639df + **[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) Fixes #20354 Closes #20407. Commit 96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan.
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bazel](https://togithub.com/bazelbuild/bazel) | major | `6.4.0` -> `7.0.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel (bazel)</summary> ### [`v7.0.0`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-700-2023-12-11) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/6.4.0...7.0.0) Baseline: d60ce2c7c86393638c77698c00c2168a7a936a53 Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #​16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #​17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @​bazel_tools//platforms with or without the flag will throw error with message "Constraints from @​bazel_tools//platforms have been removed. Please use constraints from @​platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @​bazel_tools//config:common_settings.bzl has been removed. Use @​bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild/bazel#17668). + cc_shared_library is no longer experimental, see bazelbuild/bazel#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild/bazel#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #​19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #​19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild/bazel#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild/bazel#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild/bazel#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild/bazel#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #​18262. Commit bazelbuild/bazel@f79ca02 + none Commit bazelbuild/bazel@7d87996 + None Commit bazelbuild/bazel@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #​19992. Commit bazelbuild/bazel@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild/bazel#19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild/bazel@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #​19915 for migration advice. Closes #​19943. Commit bazelbuild/bazel@e2c0276 + **[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`. Fixes #​19749 Closes #​20047. + None Commit bazelbuild/bazel@65f847a + None Commit bazelbuild/bazel@9bbc2cb + none Fixes #​19920 Commit bazelbuild/bazel@886b13f + **[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`. Fixes #​20371 Closes #​20388. Commit bazelbuild/bazel@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #​19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild/bazel@8e639df + **[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) Fixes #​20354 Closes #​20407. Commit bazelbuild/bazel@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bazel](https://togithub.com/bazelbuild/bazel) | major | `6.4.0` -> `7.0.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel (bazel)</summary> ### [`v7.0.0`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-700-2023-12-11) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/6.4.0...7.0.0) Baseline: d60ce2c7c86393638c77698c00c2168a7a936a53 Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #​16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #​17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @​bazel_tools//platforms with or without the flag will throw error with message "Constraints from @​bazel_tools//platforms have been removed. Please use constraints from @​platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @​bazel_tools//config:common_settings.bzl has been removed. Use @​bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild/bazel#17668). + cc_shared_library is no longer experimental, see bazelbuild/bazel#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild/bazel#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #​19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #​19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild/bazel#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild/bazel#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild/bazel#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild/bazel#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #​18262. Commit bazelbuild/bazel@f79ca02 + none Commit bazelbuild/bazel@7d87996 + None Commit bazelbuild/bazel@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #​19992. Commit bazelbuild/bazel@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild/bazel#19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild/bazel@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #​19915 for migration advice. Closes #​19943. Commit bazelbuild/bazel@e2c0276 + **[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`. Fixes #​19749 Closes #​20047. + None Commit bazelbuild/bazel@65f847a + None Commit bazelbuild/bazel@9bbc2cb + none Fixes #​19920 Commit bazelbuild/bazel@886b13f + **[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`. Fixes #​20371 Closes #​20388. Commit bazelbuild/bazel@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #​19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild/bazel@8e639df + **[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) Fixes #​20354 Closes #​20407. Commit bazelbuild/bazel@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bazel-contrib/rules_bazel_integration_test). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Baseline: d60ce2c Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See bazelbuild#16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See bazelbuild#17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @bazel_tools//platforms with or without the flag will throw error with message "Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @bazel_tools//config:common_settings.bzl has been removed. Use @bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild#17668). + cc_shared_library is no longer experimental, see bazelbuild#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at bazelbuild#19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See bazelbuild#19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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 bazelbuild#18265). Closes bazelbuild#18262. Commit bazelbuild@f79ca02 + none Commit bazelbuild@7d87996 + None Commit bazelbuild@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes bazelbuild#19992. Commit bazelbuild@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild#19688) (cherry picked from commit b4292d2) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See bazelbuild#19915 for migration advice. Closes bazelbuild#19943. Commit bazelbuild@e2c0276 + **[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`. Fixes bazelbuild#19749 Closes bazelbuild#20047. + None Commit bazelbuild@65f847a + None Commit bazelbuild@9bbc2cb + none Fixes bazelbuild#19920 Commit bazelbuild@886b13f + **[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`. Fixes bazelbuild#20371 Closes bazelbuild#20388. Commit bazelbuild@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes bazelbuild#19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild@8e639df + **[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) Fixes bazelbuild#20354 Closes bazelbuild#20407. Commit bazelbuild@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bazel](https://togithub.com/bazelbuild/bazel) | major | `6.4.0` -> `7.0.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel (bazel)</summary> ### [`v7.0.0`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-700-2023-12-11) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/6.4.0...7.0.0) Baseline: d60ce2c7c86393638c77698c00c2168a7a936a53 Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #​16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #​17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @​bazel_tools//platforms with or without the flag will throw error with message "Constraints from @​bazel_tools//platforms have been removed. Please use constraints from @​platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @​bazel_tools//config:common_settings.bzl has been removed. Use @​bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild/bazel#17668). + cc_shared_library is no longer experimental, see bazelbuild/bazel#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild/bazel#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #​19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #​19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild/bazel#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild/bazel#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild/bazel#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild/bazel#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #​18262. Commit bazelbuild/bazel@f79ca02 + none Commit bazelbuild/bazel@7d87996 + None Commit bazelbuild/bazel@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #​19992. Commit bazelbuild/bazel@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild/bazel#19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild/bazel@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #​19915 for migration advice. Closes #​19943. Commit bazelbuild/bazel@e2c0276 + **[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`. Fixes #​19749 Closes #​20047. + None Commit bazelbuild/bazel@65f847a + None Commit bazelbuild/bazel@9bbc2cb + none Fixes #​19920 Commit bazelbuild/bazel@886b13f + **[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`. Fixes #​20371 Closes #​20388. Commit bazelbuild/bazel@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #​19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild/bazel@8e639df + **[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) Fixes #​20354 Closes #​20407. Commit bazelbuild/bazel@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bazel-contrib/bazel_features). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bazel](https://togithub.com/bazelbuild/bazel) | major | `6.5.0` -> `7.0.2` | --- ### Release Notes <details> <summary>bazelbuild/bazel (bazel)</summary> ### [`v7.0.2`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-702-2024-01-25) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/7.0.1...7.0.2) Baseline: 2634a6ec8bef0d8eef9870b23befdddb3dbe0005 Release Notes: + Disregard WORKSPACE while verifying lockfile repo mapping entries in extension eval (#​21003) Acknowledgements: This release contains contributions from many people at Google, as well as bazel.build machine account, Xdng Yng. ### [`v7.0.1`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-701-2024-01-18) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/7.0.0...7.0.1) Baseline: d798ebde6c6394203a87b5f1a6b62ecfc3880991 Release Notes: + Consider MODULE.bazel for workspace detection in bazel.sh (#​20594) + Auto-create deploy jars for Bazel `java_test` targets if requested (#​20602) + `java_binary` wrapper should forward `restricted_to` (#​20611) + Mount user-specified bind mounts before Bazel's own magic. (#​20609) + Fix bootstrapped Bazel binary (#​20612) + Attempt to make main repo mapping inverse more efficient (#​20625) + Cherry-pick all presubmit.yml changes (#​20733) + Print interactive sandboxed shell command with `--sandbox_debug` (#​20734) + Fix two issues with --incompatible_sandbox_hermetic_tmp that manifested themselves when the output base was under /tmp (#​20718) + Let module extensions track calls to `Label()` (#​20750) + Add support for bind mounts under `/tmp` with hermetic tmp (#​20749) + Fixes for Bazel's own integration tests fail locally on Linux (#​20821) + Fix NPE in BzlmodRepoRuleFunction (#​20828) + Avoid emitting canonical labels into generated repos (#​20840) + Let .bzl files record their usages of repo mapping (#​20848) + Force output checking for incremental run commands without the bytes. (#​20881) + Retry binding to ipv6 localhost (#​20903) + Fix linker feature detection being performed on wrong linker (#​20901) + Fix singlejar resource mapping for external repositories (#​20904) Acknowledgements: This release contains contributions from many people at Google, as well as bazel.build machine account, David Ostrovsky, Fabian Meumertzheim, hvd, Siddhartha Bagaria, Tianyu Geng, Xdng Yng, Xùdōng Yáng. ### [`v7.0.0`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-700-2023-12-11) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/6.5.0...7.0.0) Baseline: d60ce2c7c86393638c77698c00c2168a7a936a53 Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #​16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #​17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @​bazel_tools//platforms with or without the flag will throw error with message "Constraints from @​bazel_tools//platforms have been removed. Please use constraints from @​platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @​bazel_tools//config:common_settings.bzl has been removed. Use @​bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild/bazel#17668). + cc_shared_library is no longer experimental, see bazelbuild/bazel#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild/bazel#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #​19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #​19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild/bazel#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild/bazel#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild/bazel#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild/bazel#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #​18262. Commit bazelbuild/bazel@f79ca02 + none Commit bazelbuild/bazel@7d87996 + None Commit bazelbuild/bazel@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #​19992. Commit bazelbuild/bazel@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild/bazel#19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild/bazel@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #​19915 for migration advice. Closes #​19943. Commit bazelbuild/bazel@e2c0276 + **[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`. Fixes #​19749 Closes #​20047. + None Commit bazelbuild/bazel@65f847a + None Commit bazelbuild/bazel@9bbc2cb + none Fixes #​19920 Commit bazelbuild/bazel@886b13f + **[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`. Fixes #​20371 Closes #​20388. Commit bazelbuild/bazel@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #​19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild/bazel@8e639df + **[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) Fixes #​20354 Closes #​20407. Commit bazelbuild/bazel@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/fmeum/with_cfg.bzl). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTM1LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bazel](https://togithub.com/bazelbuild/bazel) | major | `6.4.0` -> `7.0.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel (bazel)</summary> ### [`v7.0.0`](https://togithub.com/bazelbuild/bazel/blob/HEAD/CHANGELOG.md#Release-700-2023-12-11) [Compare Source](https://togithub.com/bazelbuild/bazel/compare/6.4.0...7.0.0) Baseline: d60ce2c7c86393638c77698c00c2168a7a936a53 Release Notes: + **[Incompatible]** This has the side effect of changing the message on unsuccessful builds from ``` FAILED: Build did NOT complete successfully (0 packages loaded) ``` to ``` ERROR: Build did NOT complete successfully ``` + The new path variable `$(rlocationpath ...)` and its plural form `$(rlocationpaths ...)` can be used to expand labels to the paths accepted by the `Rlocation` function of runfiles libraries. This is the preferred way to access data dependencies at runtime and works on all platforms, even when runfiles are not enabled (e.g., on Windows by default). + The `aquery` and `cquery` commands now respect the `--query_file` flag just like the `query` command. + **[Incompatible]** the --experimental_async_execution flag is now a no-op. + **[Incompatible]** --experimental_replay_action_out_err is not a no-op. + **[Incompatible]** `cquery --output=files` also outputs source files. + removed outdated ctx.host_fragments + **[Incompatible]** When multiple --deleted_packages options are passed on the command line, they will be concatenated instead of the latest one taking effect. + removed outdated ctx.host_configuration + **[Incompatible]** JSON profile: Use doubles instead of strings for counter series. + Now that the host configuration is finished, `genrule` should prefer the use of `tools` and stop using `exec_tools`. + **[Incompatible]** --experimental_build_transitive_python_runfiles is flipped to false. See #​16303 for details + **[Incompatible]** --incompatible_python_disable_py2 is flipped to true. See #​17293 for details. + Update Android manifest merger to v30.1.3, and also drop support for legacy (pre-D8) desugaring. + Correctly encode double value positive infinity as "inf" instead of "+inf" for textprotos. + **[Incompatible]** When remote cache evicts blobs, Bazel will exit with code 39. + Add --use_target_platform_for_tests which uses the target platform for executing tests instead of the execution platform. + **[Incompatible]** `--features` only applies to targets built in the target configuration, and `--host_features` is used for the host / exec configuration (gated behind `--incompatible_use_host_features`) + Custom C++ rules on Windows calling cc_common.create_linking_context_from_compilation_outputs should review whether each target of the rule type should produce a dynamic library since a condition which blocked their creation has been moved to the rules from behind the API. + Add flag `--experimental_remote_cache_ttl` and set the default value to 3 hours. + making --incompatible_use_platforms_repo_for_constraints do nothing. Using constraints from @​bazel_tools//platforms with or without the flag will throw error with message "Constraints from @​bazel_tools//platforms have been removed. Please use constraints from @​platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms" + **[Incompatible]** Bazel's local CPU resource on Linux is now container aware. Use `--local_cpu_resources`, `--loading_phase_threads` or `--jobs` to override. + Subsequent settings of --extra_execution_platforms now override previous settings, instead of adding them to a list. If you currently set --extra_execution_platforms more than once, please migrate by passing a list of values to --extra_execution_platforms instead so that earlier values aren't overwritten. + @​bazel_tools//config:common_settings.bzl has been removed. Use @​bazel_skylib//rules:common_settings.bzl instead. + **[Incompatible]** `copy_from_rule` is exec_groups is deprecated (bazelbuild/bazel#17668). + cc_shared_library is no longer experimental, see bazelbuild/bazel#16709 for details + **[Incompatible]** --legacy_bazel_java_test is now a no-op + The flag `--distinct_host_configuration` is removed. It has been a no-op since Bazel 6.0.0. + Add `--skip_incompatible_explicit_targets` option + **[Incompatible]** `--experimental_execution_graph_log` no longer exists. Current users that want local logs need to pass `--experimental_enable_execution_graph_log --experimental_execution_graph_log_path=/some/local/path`. Current users that want logs uploaded to BEP need to pass `--experimental_enable_execution_graph_log --experimental_stream_log_file_uploads`. + Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + **[Incompatible]** Remove 'darwin' as a CPU value, use 'darwin_x86_64' instead + cc_test can now be configured by using a native.toolchain(). + The location of rules that explicitly specify `generator_name` and/or `generator_function` attributes (typically because they are incidentally copied from `native.existing_rule()`) is now the top-level call in the `BUILD` file, which is consistent with rules that do not explicitly specify these attributes. + Warnings (most notably those associated with the `deprecation` rule attribute) are no longer replayed on subsequent invocations unless the target in question is re-analyzed. Warnings are purely informational, so this change has no bearing on the correctness of the build. Downstream tests that break due to this change should update their expectations. + `--experimental_remote_build_event_upload` has been renamed to `--remote_build_event_upload` + **[Incompatible]** Remove high priority workers functionality from blaze. + [Breaking change] platform, constraint_setting, and constraint_value can no longer take an applicable_licenses value. Remediation is to remove the attribute and rely on the package level default. + `--experimental_action_cache_store_output_metadata` has been renamed to `--action_cache_store_output_metadata` + Changed the default value for `--remote_build_event_upload` to `minimal`. + `--experimental_remote_cache_compression` has been renamed to `--remote_cache_compression` + Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level. + `--experimental_remote_grpc_log` has been renamed to `--remote_grpc_log` + `--incompatible_remote_build_event_upload_respect_no_cache` is now a no-op. + json.decode now takes an optional `default` positional parameter; if this parameter is specified and decoding fails, json.decode will return the `default` value instead of failing Starlark evaluation. + --experimental_repository_disable_download is now promoted to stable and is also available under the name --repository_disable_download . + `applicable_licenses` is no longer allowed on the `platform` rule. Additionally, `default_package_metadata` from any `package` rule will not be applied. + **[Incompatible]** Duplicates in <rule-inputs> when using `query --output=xml --aspect_deps=precise` are removed. Added flag `--proto:include_attribute_source_aspects` that will include a new field `source_aspect_name` to the `Attribute` message that indicates the source aspect that the attribute comes from. + Options specified on the pseudo-command `common` in `.rc` files are now ignored by commands that do not support them as long as they are valid options for *any* Bazel command. Previously, commands that did not support all options given for `common` would fail to run. These previous semantics of `common` are now available via the new `always` pseudo-command. + **[Incompatible]** `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild/bazel#18339 for migration advice. + the 'default' param of json.decode can now be used as a keyword parameter. + As a transitional step in a larger refactoring, rule transitions are applied twice. Once during dependency resolution and once right before analysis of those rules. After the refactoring is complete, rule transitions will be applied only once. + Add aquery --output=streamed_proto which writes a stream of length delimited ActionGraphContainer containing a single Artifact, Action, Target, DepSetOfFiles, Configuration, AspectDescriptor, RuleClass, PathFragment proto. This breaks up the ActionGraphContainer into multiple which will prevent large protos from crashing blaze. + (BEP) TargetConfigured events will be marked aborted instead of published when there is an analysis error. This is motivated by a low level Blaze change aimed at improving scalability. + **[Incompatible]** cc_binary targets with dynamic_deps attributes no longer link indirect dynamic_deps on Unix. This might be an incompatible change if you are using RUNPATHs (instead of RPATHs) in your cc_shared_libraries. Enable the feature "exclude_bazel_rpaths_in_transitive_libs" or "use_rpath_instead_of_runpath" for those cc_shared_libraries. + Enable starlark_doc_extract - a native rule for Starlark documentation extraction. This rule is intended mainly for internal use by Stardoc. + **[Incompatible]** Remove deprecated and unused `--experimental_show_artifacts` flag. + Added the target path of an UnresolvedSymlink action to the aquery results + Additional source inputs can now be specified for compilation in cc_library targets using the additional_compiler_inputs attribute, and these inputs can be used in the $(location) function. + More descriptive error messages for unexpected cc absolute includes; unexpected absolute includes for cc compiles shouldn't be reported as "undeclared inclusion(s)" + Enable C++ branch coverage if gcov version is 8 or newer. + Deduplicates the result of split transitions uniformly, regardless of whether they are Starlark or native transitions. This used to apply only if either the attribute or rule transition contained a Starlark transition. + Support for optimizers rewriting baseline profiles. + This is a breaking change. `cc_host_toolchain_alias` rule is obsolete and can be interchangeably used with `cc_toolchain_alias` rule. + Fixes non-ascii arguments written to parameter files as mojibake. + NA + The `genrule` attribute `exec_tools` will be removed in a future Bazel release. Please follow directions at #​19132 to migrate away from it. + **[Incompatible]** Removed multi_arch_split, use transition_support.apple_platform_split_transition from rules_apple instead. + Supports for android_binary.startup_profiles attribute. + **[Incompatible]** Removed apple_crosstool_transition, use transition_support.apple_rule_transition from rules_apple instead. + **[Incompatible]** Drop deprecated 'transitive_deps', 'transitive_runtime_deps' from JavaInfo + **[Incompatible]** The --android_include_proguard_location_references flag is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + `rule()` and `attr.*` can no longer be (pointlessly) called during WORKSPACE evaluation and repository rule evaluation. + Expands baseline profile wildcards before optimizer tools see them. + **[Incompatible]** --no_proguard_location_reference is now added unconditionally to the command line of aapt2. + **[Incompatible]** The command line flag --apple_enable_auto_dsym_dbg is not supported anymore. + **[Incompatible]** The --apple_compiler command line option is not available anymore. + **[Incompatible]** py_transitions top-level was removed. + Android resources will no longer propagate through neverlinked libraries by default. + Set Android Databinding to v2 and Databinging AndroidX to true and remove support for Databinding V1. + Added whether or not a FileWrite action's output is executable to the aquery results + --use_single_jar_apk_builder is removed. It's been a no-op for years. + **[Incompatible]** --incompatible_merge_fixed_and_default_shell_env is flipped to true. See #​19317 for details. + JVM options in environment variables JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS now do not get to the server; use --host_jvm_args instead. + --remote_download_minimal no longer implies --nobuild_runfile_links. + attr objects in Starlark now use value equality rather than reference equality. + **[Incompatible]** `cmd_helper` module was removed + **[Incompatible]** `ctx.new_file` was removed, `ctx.actions.declare_file` is to be used instead. + **[Incompatible]** Fails on unknown attributes (even when set to None). See bazelbuild/bazel#19403 + Change output paths to consistently start with [cpu]-[compilation_mode] along with other cleanups to output path generation logic. + Compilation actions using the auto-configured MSVC toolchain are forced to emit error messages in English if the English language pack for Visual Studio is installed. + **[Incompatible]** Flip incompatible_enable_cc_toolchain_resolution (bazelbuild/bazel#7260) + The new `--consistent_labels` option on `query`, `cquery`, and `aquery` can be used to force consistent label formatting across all output modes that is also compatible with `str(Label(...))` in Starlark. + **[Incompatible]** proto_compiler attribute removed from proto_lang_toolchain (it was recently introduced, and there is no evidence of use) + **[Incompatible]** --experimental_genquery_use_graphless_query is made to be a NO-OP. + **[Incompatible]** The --call_count_output_path command line option is not supported anymore. + **[Incompatible]** The no-op --dynamic_worker_strategy command line option is no available anymore. + **[Incompatible]** the --experimental_allow_top_level_aspects_parameters, --experimental_async_execution, --experimental_availability_info_exempt, --experimental_dynamic_execution_cpu_limited, --experimental_dynamic_skip_first_build, --experimental_keep_config_nodes_on_analysis_discard, --experimental_local_memory_estimate, --experimental_multi_cpu, --experimental_multi_threaded_digest, --experimental_replay_action_out_err and --experimental_shortened_obj_file_path command line options are not available anymore. + **[Incompatible]** The --experimental_cc_shared_library_debug command line flag is not available anymore. + **[Incompatible]** testing.analysis_test is not experimental anymore + **[Incompatible]** The (no-op) --android_include_proguard_location_references flag is not available anymore. + **[Incompatible]** The --experimental_android_local_test_binary_resources command line option is not available anymore. + **[Incompatible]** The --experimental_includes_attribute_subpackage_traversal command line option is not available anymore. + **[Incompatible]** The --debug_print_action_contexts command line option is not available anymore. + **[Incompatible]** The --experimental_skyframe_include_scanning command line option is not available anymore. + **[Incompatible]** The --experimental_supports_info_crosstool_configuration command line option is not available anymore. + **[Incompatible]** THe --incompatible_avoid_conflict_dlls command line option is not available anymore. + **[Incompatible]** The --experimental_prioritize_local_actions command line option is not available anymore. + **[Incompatible]** The following command line options are not supported anymore: --incompatible_disable_cc_configuration_make_variables, --incompatible_disable_cc_toolchain_label_from_crosstool_proto, --incompatible_disable_crosstool_file, --incompatible_disable_depset_in_cc_user_flags, --incompatible_disable_legacy_cpp_toolchain_skylark_api, --incompatible_disable_legacy_cpp_toolchain_skylark_api, incompatible_disable_legacy_flags_cc_toolchain_api, --incompatible_disable_managed_directories, --incompatible_disable_runtimes_filegroups, --incompatible_disable_sysroot_from_configuration, --incompatible_disable_tools_defaults_package, --incompatible_disallow_legacy_javainfo, --incompatible_dont_emit_static_libgcc, --incompatible_enable_legacy_cpp_toolchain_skylark_api, --incompatible_linkopts_in_user_link_flags, --incompatible_provide_cc_toolchain_info_from_cc_toolchain_suite, --incompatible_require_feature_configuration_for_pic . + **[Incompatible]** The --experimental_execution_graph_log_cached and --experimental_execution_graph_log_missed command line options are not available anymore. + **[Incompatible]** The --experimental_use_sh_binary_stub_script command line option is not available anymore. + **[Incompatible]** The --incompatible_disable_expand_if_all_available_in_flag_set command line option is not available anymore. + default_applicable_licenses in package() now applies to the entire BUILD file, regardless of where in the BUILD that package() is called. + **[Incompatible]** The --incompatible_load_cc_rules_from_bzl command line option is not available anymore. + **[Incompatible]** The --incompatible_display_source_file_location command line option is not available anymore. + **[Incompatible]** The --experimental_repository_hash_file and --experimental_verify_repository_rules command line options are not available anymore. + **[Incompatible]** The following previously no-op command line options are not available anymore: --legacy_spawn_scheduler, --use_workers_with_dexbuilder, --print_workspace_in_output_paths_if_needed, --watchos_simulator_version, --watchos_simulator_device, --tvos_simulator_version, --tvos_simulator_device. + **[Incompatible]** The --show_warnings command line option of the command "canonicalize-flags" is not available anymore. + **[Incompatible]** The command line option --remove_all_convenience_symlinks is not available anymore. + **[Incompatible]** java_test doesn't produce deploy jars anymore + **[Incompatible]** The lazy template expansion is not experimental anymore (--experimental_lazy_template_expansion command line option is not available anymore). + **[Incompatible]** The --incompatible_disallow_legacy_javainfo command line option is not available anymore. + **[Incompatible]** The --incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain command line option is not available anymore. Using the "cpu" and "compiler" options of the cc_toolchain rule now results in a slightly different error that is signaled earlier. + **[Incompatible]** THe --incompatible_force_strict_header_check_from_starlark command line option is not available anymore. + **[Incompatible]** --incompatible_visibility_private_attributes_at_definition is flipped to true. See bazelbuild/bazel#19330 for details. + **[Incompatible]** The --experimental_java_proto_library_default_has_services command line option and the Starlark symbol java_common.experimental_java_proto_library_default_has_services function are not available anymore. + **[Incompatible]** The no-op --experimental_cpp_compile_argv_ignore_param_file command line option is not available anymore. + Make variable expansion of `objc_library` produces better error messages. + **[Incompatible]** rule function takes only implementation function positionally, other parameters have to be named + **[Incompatible]** The --incompatible_genquery_use_graphless_query command line options is not available anymore. + Added support for a new directive `use_repo_rule` in MODULE.bazel files, which allows you to conveniently declare repos that are only visible within your module. + Bazel now throws an error if the root module specifies overrides on nonexistent modules. + Fix includes attribute of `objc_library` when sibling repository layout is used. + Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. Disable behavior with --noreuse_sandbox_directories. + **[Incompatible]** The sandboxfs sandboxing strategy is removed. It hadn't been maintained for a long time, it didn't work for most users and it was not consistently faster while being complex to set up. sandboxfs performance is heavily dependent on the specific setup (setup costs are lower, but you have to pay a penalty for the use of each input) and there are scenarios where it is faster and scenarios where it is slower. Overall it is not worth its weight. + Symlink trees created by sandboxing will be deleted asynchronously. Disable behavior with --experimental_sandbox_async_tree_delete_idle_threads=0. + **[Incompatible]** Bzlmod is enabled by default, please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. Find more details at bazelbuild/bazel#18958 + Enable Platforms and Toolchains for Android. Android projects will need to stop passing the legacy flag `--fat_apk_cpu`, and instead use `--android_platforms` using platforms defined with the `@platforms//os:android` constraint. The https://github.com/bazelbuild/rules_android repository defines four standard Android platforms for projects that use those rules, `@rules_android//:armeabi-v7a`, `@rules_android//:arm64-v8a`, `@rules_android//:x86`, `@rules_android//:x86_64`. + **[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). Closes #​18262. Commit bazelbuild/bazel@f79ca02 + none Commit bazelbuild/bazel@7d87996 + None Commit bazelbuild/bazel@0a1dce2 + **[Incompatible]** The attribute `new_local_repository.build_file` no longer accepts a path; a label must be passed instead. Closes #​19992. Commit bazelbuild/bazel@76d71d9 + **[Incompatible]** Delete the --experimental_execution_log_file flag. Use --execution_log_binary_file in conjunction with --noexecution_log_sort instead. + **[Incompatible]** transition is removed from objc_library (bazelbuild/bazel#19688) (cherry picked from commit b4292d2ee1154c15d1f099b3e8941c3c448725ba) Co-authored-by: Googler <ilist@google.com> + **[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. + None. Commit bazelbuild/bazel@491284b + **[Incompatible]** `--incompatible_sandbox_hermetic_tmp` is enabled by default. See #​19915 for migration advice. Closes #​19943. Commit bazelbuild/bazel@e2c0276 + **[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`. Fixes #​19749 Closes #​20047. + None Commit bazelbuild/bazel@65f847a + None Commit bazelbuild/bazel@9bbc2cb + none Fixes #​19920 Commit bazelbuild/bazel@886b13f + **[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`. Fixes #​20371 Closes #​20388. Commit bazelbuild/bazel@454b550 + `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`. Closes #​19948. Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93 Commit bazelbuild/bazel@8e639df + **[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) Fixes #​20354 Closes #​20407. Commit bazelbuild/bazel@96b3612#diff-a8d3aed419e661d4dbecb2dc6668444212d7b1707ff61330b7d8aae61e75d4df Acknowledgements: This release contains contributions from many people at Google, as well as Adam Lavin, Adrian Imboden, Alan Falloon, Alessandro Patti, Alex Eagle, Alexander Grund, AlexTereshenkov, Amanda L Martin, Amet Umerov, Andreas Herrmann, Andy Hamon, andyrinne12, Ankit Agarwal, Ankush Goyal, Anshuman Mishra, Anthony Ter-Saakov, Antoine Musso, Artem Zinnatullin, arun.sampathkumar, aryeh, Austin Schuh, bazel.build machine account, Ben Lee, Benjamin Lee, Benjamin Peterson, Benjamin Sigonneau, Boleyn Su, Brentley Jones, Cameron Martin, Chirag Ramani, Chris Sauer, Christopher Peterson Sauer, Christopher Rydell, Christopher Sauer, Conall O'Brien, Daniel Grunwald, Daniel KT, Daniel Wagner-Hall, David Ostrovsky, dhmemi, Dimi Shahbaz, eareilg, Ed Schouten, Emil Kattainen, Ezekiel Warren, Fabian Meumertzheim, Fahrzin Hemmati, Gaspare Vitta, George Gensure, Greg, Greg Magolan, Grzegorz Lukasik, Guillaume Maudoux, Gunnar Wagenknecht, Halil Sener, Hao Yuan, hvadehra, hvd, Ilan Keshet, Ivan Golub, Jack Dai, James Ma, Jason Mobarak, Jasper, Jay Conrod, Jeff Hodges, Jeremy Volkman, Jimm chja20, Joel Jeske, John Hinnegan, Jon Landis, Jon Parise, jonrose-dev, Joseph Lisee, Joseph Tilahun, Julio Merino, Kai Zhang, keertk, Keith Smiley, Konstantin Erman, Krzysztof Naglik, kshyanashree, Kun-Lu, Laurenz Altenmller, Lee Mracek, Letu Ren, lripoche, Maksim, Malte Poll, Marc Redemske, Marc Zych, Matt Mackay, Matt Vollmer, Mauricio G, Mauricio Galindo, Maxim Matyunin, Maxwell Elliott, mohamadk, Nathan (Blaise) Bruer, nathyong, NelsonLi0701, nglevin, Nicholas Junge, Nick Biryulin, Nick Korostelev, Oliver Lee, Orion Hodson, Oscar Garzon, Patrice Duroux, Patrick Balestra, Peter Lobsinger, Philipp Schrader, Rasrack, Red Daly, redwrasse, Robin Tweedie, robincaloudis, Roger Hu, Romain Chossart, Roman Salvador, Sagar Pathare, Saleem Abdulrasool, Sam Shadwell, Sara Adams, Sascha Moecker, Scott Minor, Severin Strobl, Shaygan Hooshyari, Siddhesh Bhupendra Kuakde, Simon Mavi Stewart, something_vague, Son Luong Ngoc, Steve Barrau, Stiopa Koltsov, stoozy, Sushain Cherivirala, Takeo Sawada, Taylor Barrella, tbaing, Ted Kaplan, Ted Logan, Thi Don, Thulio Ferraz Assis, Timothy Gu, Tom Cnops, Tyler Williams, Ulf Adams, Ulrik Falklof, Uri Baghin, Vertexwahn, Xavier Bonaventura, Xdng Yng, Xiangquan Xiao, Xùdōng Yáng, Yannic, Yannic Bonenberger, Yi Cheng, Yuval Kaplan, yuzhy8701, Zheng Wei Tan. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bazel-contrib/bazel_features). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Reference: bazelbuild/bazel#7260. This causes GoogleTest on Windows to be built with MSVC instead of MinGW GCC, causing link failures. Started breaking in Travis CI on 19-Dec-2023: https://app.travis-ci.com/github/tanzislam/cryptopals/jobs/615204806.
This reverts commit de7615f. It turns out that --cpu command line option will be silently ignored with Bazel 7.0 and later unless --noincompatible_enable_cc_toolchain_resolution option is specified [1]. Otherwise 'mozc_tip32.dll' will be built as a 64-bit executable. This is a temporary workaround until until we fully migrate to --platforms command line option [2]. This commit only affects Windows build with Bazel. Other build configurations such as GYP build on Windows are not affected. Closes google#1102. [1]: bazelbuild/bazel#7260 [2]: https://bazel.build/concepts/platforms
This reverts commit de7615f. It turns out that --cpu command line option will be silently ignored with Bazel 7.0 and later unless --noincompatible_enable_cc_toolchain_resolution option is specified [1]. Otherwise 'mozc_tip32.dll' will be built as a 64-bit executable. This is a temporary workaround until until we fully migrate to --platforms command line option [2]. This commit only affects Windows build with Bazel. Other build configurations such as GYP build on Windows are not affected. Closes #1102. [1]: bazelbuild/bazel#7260 [2]: https://bazel.build/concepts/platforms PiperOrigin-RevId: 691409234
Flag:
--incompatible_enable_cc_toolchain_resolution
Available since: 0.23
Will be flipped in: 7.0.0
Description
C++ toolchain resolution is an improved mechanism that selects a proper C++ toolchain (compiler) based on a pair of target and execution platforms (think cross compilation from linux to mac). It’s an improvement over the old mechanism that sets the
--crosstool_top
flag. More information about platforms and toolchain resolution on https://bazel.build/reference/be/platforms-and-toolchainsCurrent status
platform_mapping
Migration
If you're not using C++, or custom
--crosstool_top
,--cpu
, or--compiler
,you don't use
select
on these options, you can stop reading now, there isnothing to migrate for you.
Migration before the flag is flipped (only in case you're building for custom platforms, using custom C++ toolchains or using custom rules invoking
cc_common.compile
andcc_common.link
):platform_mappings
isn’t used)bazelrc
) to use--platforms
(where--cpu
or--crosstool_top
is used)Migration after the flag is flipped:
cc_target_os
,target_cpu
and other)--crosstool_top
,--cpu
flags frombazelrcs
and from Starlark configuration transitionsplatform_mappings
configuration needed for C++_cc_toolchain
implicit dependencyAdditional details
1. Add C++ platform definitions, register C++ toolchains
Please use
constraint_settings
andconstraint_values
fromthe canonical Bazel Platforms
Repository (don't hesitate to propose
missing targets!). If there is a need for C++ specific constraints, feel free to
upload a PR to the
rules_cc
repository. It is extremely important that the whole ecosystem uses the same
constraints, we can only reuse libraries and toolchains when we speak the same
language.
2. Add missing C++ toolchain requirements to rules
For Starlark rules owners who depend on C++ toolchain it will be necessary to
declare dependency on C++ toolchain type.
Before:
After:
See the docs and use
@rules_cc//cc:find_cc_toolchain.bzl
(if using Bazel >= 0.27) or
@bazel_tools//tools/cpp:toolchain_utils.bzl
to locate current C++ toolchain (otherwise). Also see examples for general usage.The text was updated successfully, but these errors were encountered: