incompatible_top_level_aspects_require_providers #24850
Labels
incompatible-change
Incompatible/breaking change
team-Configurability
platforms, toolchains, cquery, select(), config transitions
type: feature request
untriaged
Motivation
This flag makes command-line (or top-level) aspects assess their
required_providers
against the top-level targets declared providers. This will make aspects behaviour on top-level targets consistent with their behaviour on the dependencies.The incosistency without this flag causes confusion like #19609
Description
Command-line aspects will check if the declared providers in the top-level targets rule satisfies the aspect required providers. Only if this is true the aspect will apply to the target.
Incompatible Flag
incompatible_top_level_aspects_require_providers
Migration Guide
This change can be breaking if an aspect requires a provider that a rule returns but it does not declare in its definition via
provides
. The fix for this is to addprovides = [PROVIDER]
in the rule definition (example).In which Bazel LTS version will this incompatible change be enabled?
Bazel 8
Additional Context
The flag is enabled by default in Bazel 8.0.0.
TODO List
No response
The text was updated successfully, but these errors were encountered: