aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java
diff options
context:
space:
mode:
authorGravatar shreyax <shreyax@google.com>2018-03-20 12:52:27 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-20 12:53:48 -0700
commitc1b4a5b1fc4f117479a49ddb070d216467e9ea5c (patch)
tree67d57310082ea710796d7bac92c674bc1bca7159 /src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java
parentbe61041a69a614fd009fd613a70ac1ac8af5d507 (diff)
Don't check for deps being done in a keep-going build as we expect this to always be the case.
PiperOrigin-RevId: 189792299
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java
index 002453c5ed..6051f60d36 100644
--- a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java
+++ b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java
@@ -405,7 +405,7 @@ public abstract class AbstractParallelEvaluator {
reifiedBuilderException,
isTransitivelyTransient);
registerNewlyDiscoveredDepsForDoneEntry(
- skyKey, state, newlyRequestedDeps, oldDeps, env);
+ skyKey, state, newlyRequestedDeps, oldDeps, env, evaluatorContext.keepGoing());
env.setError(state, errorInfo);
Set<SkyKey> rdepsToBubbleUpTo =
env.commit(
@@ -443,7 +443,8 @@ public abstract class AbstractParallelEvaluator {
state,
graph.getBatch(skyKey, Reason.RDEP_ADDITION, env.getNewlyRequestedDeps()),
oldDeps,
- env);
+ env,
+ evaluatorContext.keepGoing());
env.commit(state, EnqueueParentBehavior.ENQUEUE);
return;
}
@@ -600,20 +601,26 @@ public abstract class AbstractParallelEvaluator {
NodeEntry entry,
Map<SkyKey, ? extends NodeEntry> newlyRequestedDepMap,
Set<SkyKey> oldDeps,
- SkyFunctionEnvironment env)
+ SkyFunctionEnvironment env,
+ boolean keepGoing)
throws InterruptedException {
+
Iterator<SkyKey> it = env.getNewlyRequestedDeps().iterator();
if (!it.hasNext()) {
return;
}
- Set<SkyKey> unfinishedDeps = new HashSet<>();
- while (it.hasNext()) {
- SkyKey dep = it.next();
- if (!isDoneForBuild(newlyRequestedDepMap.get(dep))) {
- unfinishedDeps.add(dep);
+ // We don't expect any unfinished deps in a keep-going build.
+ if (!keepGoing) {
+ Set<SkyKey> unfinishedDeps = new HashSet<>();
+ while (it.hasNext()) {
+ SkyKey dep = it.next();
+ if (!isDoneForBuild(newlyRequestedDepMap.get(dep))) {
+ unfinishedDeps.add(dep);
+ }
}
+ env.getNewlyRequestedDeps().remove(unfinishedDeps);
}
- env.getNewlyRequestedDeps().remove(unfinishedDeps);
+
Set<SkyKey> uniqueNewDeps = entry.addTemporaryDirectDeps(env.getNewlyRequestedDeps());
for (SkyKey newDep : uniqueNewDeps) {
// Note that this depEntry can't be null. If env.newlyRequestedDeps contained a key with a