Fix up comment that was made stale by a commit years ago.
https://github.com/bazelbuild/bazel/commit/e16c56 introduced an intermediate node in the Bazel-on-Skyframe type graph, but forgot to update this comment.
This being said, I suspect the if-statement itself is now unneeded due to https://github.com/bazelbuild/bazel/commit/52d9f3. shreyax@ is going to confirm my suspicion, but in the meantime let's at least make sure the comment is accurate for the sake of code history at least.
PiperOrigin-RevId: 295998028
diff --git a/src/main/java/com/google/devtools/build/lib/query2/RBuildFilesVisitor.java b/src/main/java/com/google/devtools/build/lib/query2/RBuildFilesVisitor.java
index 8e4a7b7..ed5dcd5 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/RBuildFilesVisitor.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/RBuildFilesVisitor.java
@@ -89,7 +89,10 @@
if (resultUniquifier.unique(rdep)) {
keysToUseForResult.add((PackageIdentifier) rdep.argument());
}
- // Every package has a dep on the external package, so we need to include those edges too.
+ // PackageValue(//p) has a transitive dep on the PackageValue(//external), so we need to
+ // make sure these dep paths are traversed. These dep paths go through the singleton
+ // WorkspaceNameValue(), and that node has a direct dep on PackageValue(//external), so it
+ // suffices to ensure we visit PackageValue(//external).
if (rdep.equals(EXTERNAL_PACKAGE_KEY)) {
keysToVisitNext.add(rdep);
}