Make ActionAnalysisMetadata a SkyKey.
PiperOrigin-RevId: 258220320
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java b/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
index 736d229..8f7f2e8 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
@@ -15,13 +15,20 @@
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.analysis.platform.PlatformInfo;
+import com.google.devtools.build.skyframe.SkyFunctionName;
+import com.google.devtools.build.skyframe.SkyKey;
import javax.annotation.Nullable;
/**
* An Analysis phase interface for an {@link Action} or Action-like object, containing only
* side-effect-free query methods for information needed during action analysis.
+ *
+ * <p>This interface extends {@link SkyKey} for use in the Google-internal {@link
+ * #ACTION_ANNOTATION_FUNCTION}.
*/
-public interface ActionAnalysisMetadata {
+public interface ActionAnalysisMetadata extends SkyKey {
+
+ SkyFunctionName ACTION_ANNOTATION_FUNCTION = SkyFunctionName.createHermetic("ANNOTATE_ACTION");
/**
* Return this key from {@link #getKey} to signify a failed key computation.
@@ -33,6 +40,11 @@
*/
String KEY_ERROR = "1ea50e01-0349-4552-80cf-76cf520e8592";
+ @Override
+ default SkyFunctionName functionName() {
+ return ACTION_ANNOTATION_FUNCTION;
+ }
+
/**
* Returns the owner of this executable if this executable can supply verbose information. This is
* typically the rule that constructed it; see ActionOwner class comment for details. Returns
@@ -205,7 +217,7 @@
MiddlemanType getActionType();
/** The action type. */
- public enum MiddlemanType {
+ enum MiddlemanType {
/** A normal action. */
NORMAL,