diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java index aaa9221098..4e61f8c6bd 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java @@ -435,8 +435,12 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver state.discoveredInputs = skyframeActionExecutor.discoverInputs( action, metadataHandler, env, state.actionFileSystem); - Preconditions.checkState(state.discoveredInputs != null, - "discoverInputs() returned null on action %s", action); + Preconditions.checkState( + env.valuesMissing() == (state.discoveredInputs == null), + "discoverInputs() must return null iff requesting more dependencies."); + if (state.discoveredInputs == null) { + return null; + } } catch (MissingDepException e) { Preconditions.checkState(env.valuesMissing(), action); return null; @@ -448,24 +452,6 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver return null; } - // Stage 1 finished, let's do stage 2. The stage 1 of input discovery will have added some - // files with addDiscoveredInputs() and then have waited for those files to be available - // by returning null if env.valuesMissing() returned true. So stage 2 can now access those - // inputs to discover even more inputs and then potentially also wait for those to be - // available. - if (state.discoveredInputsStage2 == null) { - state.discoveredInputsStage2 = action.discoverInputsStage2(env); - if (env.valuesMissing()) { - return null; - } - } - if (state.discoveredInputsStage2 != null) { - addDiscoveredInputs( - state.inputArtifactData, state.expandedArtifacts, state.discoveredInputsStage2, env); - if (env.valuesMissing()) { - return null; - } - } metadataHandler = new ActionMetadataHandler( state.inputArtifactData, @@ -821,7 +807,6 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver Map<Artifact, Collection<Artifact>> expandedArtifacts = null; Token token = null; Iterable<Artifact> discoveredInputs = null; - Iterable<Artifact> discoveredInputsStage2 = null; ActionExecutionValue value = null; FileSystem actionFileSystem = null; |