Add support of aspects to the skyframe implementation of query. To keep these two versions of query consistent we need to add additional edges to the target that contains aspects, instead of adding it to the target that was in direct deps of the original one.
--
MOS_MIGRATED_REVID=89483301
diff --git a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
index dfe805e..deb2d08 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
@@ -144,6 +144,8 @@
private Set<Label> getAllowedDeps(Rule rule) {
Set<Label> allowedLabels = new HashSet<>(rule.getLabels(dependencyFilter));
allowedLabels.addAll(rule.getVisibility().getDependencyLabels());
+ // We should add deps from aspects, otherwise they are going to be filtered out.
+ allowedLabels.addAll(rule.getAspectLabelsSuperset(dependencyFilter));
return allowedLabels;
}