Augment the QueryableGraph#get[BatchWithFieldHints] method to take in parameters conveying the requesting node (if any), the requested node(s), as well as a reason for the skyframe graph lookup. Alternate graph implementations may be interested in this information.
--
MOS_MIGRATED_REVID=128496089
diff --git a/src/main/java/com/google/devtools/build/skyframe/EvaluableGraph.java b/src/main/java/com/google/devtools/build/skyframe/EvaluableGraph.java
index a9c067d..0db7dad 100644
--- a/src/main/java/com/google/devtools/build/skyframe/EvaluableGraph.java
+++ b/src/main/java/com/google/devtools/build/skyframe/EvaluableGraph.java
@@ -14,8 +14,8 @@
package com.google.devtools.build.skyframe;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
-
import java.util.Map;
+import javax.annotation.Nullable;
/**
* Interface between a single version of the graph and the evaluator. Supports mutation of that
@@ -27,6 +27,11 @@
* Like {@link QueryableGraph#getBatchWithFieldHints}, except it creates a new node for each key
* not already present in the graph. Thus, the returned map will have an entry for each key in
* {@code keys}.
+ *
+ * @param requestor if non-{@code null}, the node on behalf of which the given {@code keys} are
+ * being requested.
+ * @param reason the reason the nodes are being requested.
*/
- Map<SkyKey, NodeEntry> createIfAbsentBatch(Iterable<SkyKey> keys);
+ Map<SkyKey, NodeEntry> createIfAbsentBatch(
+ @Nullable SkyKey requestor, Reason reason, Iterable<SkyKey> keys);
}