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 | 17 |
1 files changed, 11 insertions, 6 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 7bff8b0193..0905cf1bef 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 @@ -187,8 +187,9 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver return null; } + Object skyframeDepsResult; try { - establishSkyframeDependencies(env, action); + skyframeDepsResult = establishSkyframeDependencies(env, action); } catch (ActionExecutionException e) { throw new ActionExecutionFunctionException(e); } @@ -213,7 +214,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver try { result = checkCacheAndExecuteIfNeeded( - action, state, env, clientEnv, actionLookupData, sharedActionAlreadyRan); + action, state, env, clientEnv, actionLookupData, sharedActionAlreadyRan, + skyframeDepsResult); } catch (ActionExecutionException e) { // Remove action from state map in case it's there (won't be unless it discovers inputs). stateMap.remove(action); @@ -363,7 +365,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver Environment env, Map<String, String> clientEnv, ActionLookupData actionLookupData, - boolean sharedActionAlreadyRan) + boolean sharedActionAlreadyRan, + Object skyframeDepsResult) throws ActionExecutionException, InterruptedException { // If this is a shared action and the other action is the one that executed, we must use that // other action's value, provided here, since it is populated with metadata for the outputs. @@ -496,7 +499,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver metadataHandler, Collections.unmodifiableMap(state.expandedArtifacts), filesets, - state.actionFileSystem)) { + state.actionFileSystem, + skyframeDepsResult)) { if (!state.hasExecutedAction()) { state.value = skyframeActionExecutor.executeAction( @@ -597,7 +601,7 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver } } - private static void establishSkyframeDependencies(Environment env, Action action) + private static Object establishSkyframeDependencies(Environment env, Action action) throws ActionExecutionException, InterruptedException { // Before we may safely establish Skyframe dependencies, we must build all action inputs by // requesting their ArtifactValues. @@ -614,11 +618,12 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver Preconditions.checkState(action.executeUnconditionally(), action); try { - ((SkyframeAwareAction) action).establishSkyframeDependencies(env); + return ((SkyframeAwareAction) action).establishSkyframeDependencies(env); } catch (SkyframeAwareAction.ExceptionBase e) { throw new ActionExecutionException(e, action, false); } } + return null; } private static Iterable<SkyKey> toKeys( |