incompatible_disable_target_default_provider_fields: Disallow use of default providers for legacy "struct access"
https://bazel.build/extending/rules#migrating_from_legacy_providers describes that using "struct access" patterns is already a legacy approach, and the preferred "modern" approach is to use explicit providers. That is
ctx.atr.foo.default_runfiles
should instead become
ctx.attr.foo[DefaultInfo].default_runfiles
Addressing the default provider directly by strings - e.g., ctx.attr.foo.data_runfiles - has the potential for namespace clash. This has happened in the past. That is, ctx.attr.foo.fieldname can potentially return a provider rather than a data field. However, ctx.attr.foo[fieldname] will always return a provider.
here are some more for fixing this:
https://github.com/bazelbuild/bazel-skylib/pull/577 https://github.com/bazelbuild/apple_support/pull/414 https://github.com/bazelbuild/rules_pkg/pull/958 https://github.com/bazel-contrib/rules_python/pull/2972 https://github.com/bazel-contrib/rules_bazel_integration_test/pull/471 https://github.com/cgrindel/bazel-starlib/pull/524
https://github.com/bazelbuild/bazel/pull/26271