diff options
author | janakr <janakr@google.com> | 2018-06-04 12:50:13 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-04 12:52:14 -0700 |
commit | 61377f7e0b31d47d27b184edf928f2c446da0867 (patch) | |
tree | eaf7ee9db34aac2b3d1f19e6bf8d85bb79584e82 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.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/SkyframeBuildView.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java index c4491ff6a0..fefb8fb6cf 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java @@ -15,7 +15,6 @@ package com.google.devtools.build.lib.skyframe; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; -import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -75,12 +74,12 @@ import com.google.devtools.build.skyframe.EvaluationProgressReceiver; import com.google.devtools.build.skyframe.EvaluationResult; import com.google.devtools.build.skyframe.SkyFunction.Environment; import com.google.devtools.build.skyframe.SkyKey; -import com.google.devtools.build.skyframe.SkyValue; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.function.Supplier; import javax.annotation.Nullable; /** @@ -675,12 +674,14 @@ public final class SkyframeBuildView { } @Override - public void evaluated(SkyKey skyKey, Supplier<SkyValue> skyValueSupplier, + public void evaluated( + SkyKey skyKey, + Supplier<EvaluationSuccessState> evaluationSuccessState, EvaluationState state) { if (skyKey.functionName().equals(SkyFunctions.CONFIGURED_TARGET)) { switch (state) { case BUILT: - if (skyValueSupplier.get() != null) { + if (evaluationSuccessState.get().succeeded()) { evaluatedConfiguredTargets.add(skyKey); // During multithreaded operation, this is only set to true, so no concurrency issues. someConfiguredTargetEvaluated = true; |