Skip to content
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_top_level_aspects_require_providers #24850

Open
mai93 opened this issue Jan 7, 2025 · 0 comments
Open

incompatible_top_level_aspects_require_providers #24850

mai93 opened this issue Jan 7, 2025 · 0 comments
Labels
incompatible-change Incompatible/breaking change team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request untriaged

Comments

@mai93
Copy link
Contributor

mai93 commented Jan 7, 2025

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 add provides = [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

@mai93 mai93 added untriaged incompatible-change Incompatible/breaking change labels Jan 7, 2025
@iancha1992 iancha1992 added type: feature request team-Configurability platforms, toolchains, cquery, select(), config transitions labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatible-change Incompatible/breaking change team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

4 participants