-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer raising error in ConfigFeatureFlag until values actually consumed.
After ceddfb1, select statements and thus their associated config_condition are tentatively evaluated before the rule implementation. As discovered in b/299313984, this can lead to issues where those select statements are potentially not resolvable b/c they rely on flag changes done by the transition. To mitigate that issue, need to make those select resolutions and consequent config_setting resolution 'best effort' rather than mandatory. This CL adds machinery so that config_setting (and it's dependencies) can register deferred errors. Thus, the boolean ConfigMatchingProvider.matches is now a tri-state MatchResult called onfigMatchingProvider.result. In particular, configuration-specific errors registered by determining the value of a config_feature_flag are now deferred until they are actually consumed (via config_setting) by a select statement or (via FeatureFlagInfo.value) by Starlark code. Future work will make the evaluation of select statements before rule transitions 'best effort'. PiperOrigin-RevId: 565169008 Change-Id: I1efcf8b7f4f4538297f82db2f342bdc3b8c2f3ea
- Loading branch information
1 parent
4dc0d11
commit 9fac02c
Showing
23 changed files
with
707 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.