diff options
author | 2018-06-04 12:50:13 -0700 | |
---|---|---|
committer | 2018-06-04 12:52:14 -0700 | |
commit | 61377f7e0b31d47d27b184edf928f2c446da0867 (patch) | |
tree | eaf7ee9db34aac2b3d1f19e6bf8d85bb79584e82 /src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java | |
parent | f4cf006a4e1189b1ff6c757a90af22038fa6b943 (diff) |
Remove ConfiguredTarget from TargetCompletionValue, since it is no longer needed: we can get the ConfiguredTargetKey directly from the TargetCompletionKey. Since that was the only use of the actual value in EvaluationProgressReceiver#evaluated, remove it, instead just provide a boolean enum that gives whether or not evaluation succeeded.
PiperOrigin-RevId: 199178047
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java index f15e6fbf49..dbbb6a70d4 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/TargetCompletionValue.java @@ -28,24 +28,18 @@ import java.util.Set; * The value of a TargetCompletion. Currently this just stores a ConfiguredTarget. */ public class TargetCompletionValue implements SkyValue { - private final ConfiguredTarget ct; + @AutoCodec static final TargetCompletionValue INSTANCE = new TargetCompletionValue(); - TargetCompletionValue(ConfiguredTarget ct) { - this.ct = ct; - } - - public ConfiguredTarget getConfiguredTarget() { - return ct; - } + private TargetCompletionValue() {} - public static SkyKey key( + public static TargetCompletionKey key( ConfiguredTargetKey configuredTargetKey, TopLevelArtifactContext topLevelArtifactContext, boolean willTest) { return TargetCompletionKey.create(configuredTargetKey, topLevelArtifactContext, willTest); } - public static Iterable<SkyKey> keys( + public static Iterable<TargetCompletionKey> keys( Collection<ConfiguredTarget> targets, final TopLevelArtifactContext ctx, final Set<ConfiguredTarget> targetsToTest) { @@ -63,7 +57,7 @@ public class TargetCompletionValue implements SkyValue { /** {@link SkyKey} for {@link TargetCompletionValue}. */ @AutoCodec @AutoValue - abstract static class TargetCompletionKey implements SkyKey { + public abstract static class TargetCompletionKey implements SkyKey { @AutoCodec.Instantiator static TargetCompletionKey create( ConfiguredTargetKey configuredTargetKey, @@ -78,9 +72,10 @@ public class TargetCompletionValue implements SkyValue { return SkyFunctions.TARGET_COMPLETION; } - abstract ConfiguredTargetKey configuredTargetKey(); + public abstract ConfiguredTargetKey configuredTargetKey(); + + abstract TopLevelArtifactContext topLevelArtifactContext(); - public abstract TopLevelArtifactContext topLevelArtifactContext(); - public abstract boolean willTest(); + abstract boolean willTest(); } } |