-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Clean up ConfiguredTargetValueAccessor and ConfiguredTargetAccessor #12549
Conversation
- Fix looking up a target from the walkable graph. - This prevents ConfiguredTargetValueAccessor from needing to look into ConfiguredTargetAccessor. - And removes duplicated code. - Move CTVA into the correct package. Part of bazelbuild#11993.
@@ -159,6 +161,11 @@ public final FilteringQueryFunction asFilteringFunction() { | |||
public abstract int getExpressionToFilterIndex(); | |||
} | |||
|
|||
@FunctionalInterface | |||
interface TargetLookup { | |||
Target getTarget(Label label) throws TargetNotFoundException, InterruptedException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies I think I'm missing something - where does this actually get implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a functional interface, so in ActionGraphQueryEnvironment's constructor, the method reference ActionGraphQueryEnvironment::getTarget is used as a TargetLookup and passed into ConfiguredTargetValueAccessor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, and AGQE has an inherited getTarget method from PostAnalysisQE. Missed that bit. Thanks!
ConfiguredTargetAccessor.
Part of #11993.