diff options
author | mschaller <mschaller@google.com> | 2018-06-28 17:52:05 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-28 17:53:35 -0700 |
commit | 0541f95e4a03d99bd17d5e56f57cc38f41121e5a (patch) | |
tree | 934feac38a9cce567df25db3cab5377feb712d06 /src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java | |
parent | a39e2feec8b8cb431f5457453e40a56633a9caed (diff) |
Store SkyValues for new deps from the graph intra-environment
This ensures that if a SkyFunction read a value (or its absence) for a
dep during its evaluation, subsequent requests for that dep's value (or
its absence) provide the same result.
This does not yet necessarily apply to the process of collecting events
and posts from a node's deps, which will be considered in a future
refactoring.
This CL adds SkyFunctionEnvironment#removeUndoneNewlyRequestedDeps
because the prior strategy for removing undone deps for done parents, by
re-requesting the dep's node from the graph and checking its doneness,
could lead to deps being dropped from parents if those deps transitioned
from done to dirty as the parent completes.
Minor cleanup to the bubbleErrorInfo field, which is nullable, and now
documented.
(Note that done->dirty node transitions during evaluation are planned,
but not yet possible.)
RELNOTES: None.
PiperOrigin-RevId: 202577098
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.java | 12 |
1 files changed, 1 insertions, 11 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 abca3b25c4..8267fa27e1 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java @@ -36,7 +36,6 @@ import com.google.devtools.build.skyframe.QueryableGraph.Reason; import com.google.devtools.build.skyframe.SkyFunctionException.ReifiedSkyFunctionException; import java.time.Duration; import java.util.Collection; -import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; @@ -675,16 +674,7 @@ public abstract class AbstractParallelEvaluator { // We don't expect any unfinished deps in a keep-going build. if (!keepGoing) { - Map<SkyKey, ? extends NodeEntry> newlyRequestedDepMap = - graph.getBatch(skyKey, Reason.DONE_CHECKING, env.getNewlyRequestedDeps()); - 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.removeUndoneNewlyRequestedDeps(); } Set<SkyKey> uniqueNewDeps = entry.addTemporaryDirectDeps(env.getNewlyRequestedDeps()); |