forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a NPE in compatible target skipping
Under a complex set of conditions a NPE is triggered. It was caused by IncompatibleTargetChecker constructing a RuleConfiguredTarget without adding a VisibilityProviderImpl to it. All other locations where RuleConfiguredTarget is constructed add the provider, namely RuleConfiguredTargetBuilder. When the set of conditions is met, code path checking the visibility retrieves the provider without checking if it's available. The data in VisibilityProvider is duplicated with the data already in RuleConfiguredTarget. Fix by removing the provider and retrieving the data directly. Add the regression test with description how it happens. PiperOrigin-RevId: 479339612 Change-Id: I8e29a9882de87d884f53e104ae14d6a126a8096b
- Loading branch information
Showing
5 changed files
with
256 additions
and
9 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