Skip to content

Conversation

dws
Copy link
Contributor

@dws dws commented Jun 11, 2025

We here address the following obstacles in apple_support to using Bazel's
--incompatible_disable_target_default_provider_fields flag:

ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/crosstool/BUILD:25:20: in apple_genrule rule @@apple_support+//crosstool:exec_wrapped_clang_pp.target_config:
Traceback (most recent call last):
        File "/private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/rules/private/apple_genrule.bzl", line 52, column 45, in _apple_genrule_impl
                resolved_srcs = depset(transitive = [dep.files for dep in ctx.attr.srcs])
Error: Accessing the default provider in this manner is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_disable_target_default_provider_fields=false. See https://github.com/bazelbuild/bazel/issues/20183 for details.
ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/crosstool/BUILD:25:20: Analysis of target '@@apple_support+//crosstool:exec_wrapped_clang_pp.target_config' failed
ERROR: Analysis of target '//src:bazel' failed; build aborted: Analysis failed

ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/BUILD:78:24: in cc_toolchain_config rule @@apple_support++apple_cc_configure_extension+local_config_apple_cc//:darwin_x86_64:
Traceback (most recent call last):
        File "/private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/cc_toolchain_config.bzl", line 2506, column 37, in _impl
                modulemaps = ctx.attr.module_map.files.to_list()
Error: Accessing the default provider in this manner is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_disable_target_default_provider_fields=false. See https://github.com/bazelbuild/bazel/issues/20183 for details.
ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/BUILD:78:24: Analysis of target '@@apple_support++apple_cc_configure_extension+local_config_apple_cc//:darwin_x86_64' failed
ERROR: Analysis of target '//src:bazel' failed; build aborted: Analysis failed

We here address the following obstacles in apple_support to using
Bazel's --incompatible_disable_target_default_provider_fields flag:

    ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/crosstool/BUILD:25:20: in apple_genrule rule @@apple_support+//crosstool:exec_wrapped_clang_pp.target_config:
    Traceback (most recent call last):
            File "/private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/rules/private/apple_genrule.bzl", line 52, column 45, in _apple_genrule_impl
                    resolved_srcs = depset(transitive = [dep.files for dep in ctx.attr.srcs])
    Error: Accessing the default provider in this manner is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_disable_target_default_provider_fields=false. See bazelbuild/bazel#20183 for details.
    ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support+/crosstool/BUILD:25:20: Analysis of target '@@apple_support+//crosstool:exec_wrapped_clang_pp.target_config' failed
    ERROR: Analysis of target '//src:bazel' failed; build aborted: Analysis failed

    ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/BUILD:78:24: in cc_toolchain_config rule @@apple_support++apple_cc_configure_extension+local_config_apple_cc//:darwin_x86_64:
    Traceback (most recent call last):
            File "/private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/cc_toolchain_config.bzl", line 2506, column 37, in _impl
                    modulemaps = ctx.attr.module_map.files.to_list()
    Error: Accessing the default provider in this manner is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_disable_target_default_provider_fields=false. See bazelbuild/bazel#20183 for details.
    ERROR: /private/var/tmp/_bazel_dws/7fd3cd5077fbf76d9e2ae421c39ef7ed/external/apple_support++apple_cc_configure_extension+local_config_apple_cc/BUILD:78:24: Analysis of target '@@apple_support++apple_cc_configure_extension+local_config_apple_cc//:darwin_x86_64' failed
    ERROR: Analysis of target '//src:bazel' failed; build aborted: Analysis failed
@dws dws marked this pull request as ready for review June 11, 2025 21:30
@keith keith merged commit 8dbccb3 into bazelbuild:master Jun 11, 2025
11 checks passed
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this pull request Jun 17, 2025
…der_fields

We here address obstacles to building Bazel with `--incompatible_disable_target_default_provider_fields` enabled.

This includes patches representing

- bazelbuild/apple_support#413
- bazelbuild/rules_java#303
- grpc/grpc-java#12148

which should be removed once these PRs have been included in releases of their respective repos.  All of these pull requests have been approved and merged into their respective repositories.

Once #26276 is cherry-picked into a Bazel 8 release, we should be able to update `.bazelversion` to that release, and in conjunction with the changes herein, we should be able to enable  `--incompatible_disable_target_default_provider_fields` in `.bazelrc` in order to prevent regressions.  Ideally, we could also flip the default value of this flag once #26297 also lands.
Note that #26293 is related, but not strictly needed for builds.

Closes #26272.

PiperOrigin-RevId: 772542631
Change-Id: Ib5db3ffa3f4857199a6f8d838078d7ced2281ba3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants