diff options
author | 2016-09-13 16:46:10 +0000 | |
---|---|---|
committer | 2016-09-14 09:35:04 +0000 | |
commit | 6f33a1c54e517d7343c36d0479713655a19f3224 (patch) | |
tree | 3e4920aa44a9ad54a06d2b6a574127fee8829e7b /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | |
parent | 4d94984c61892749315a6c98a3b1facf84762653 (diff) |
Track client environment in Skyframe
...to determine which actions have to be recomputed based on changes
to the client environment. Note that this change does it the simple way
and reconsideres all actions on a changed client environment, while still
only reexecuting those, where the part that was inherited from the environment
actually did change.
--
Change-Id: Ie1116d094642165e5e959447a6fcf49d19b37d6e
Reviewed-on: https://bazel-review.googlesource.com/#/c/5431
MOS_MIGRATED_REVID=133010705
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java index f6c6742d76..d69e6476fe 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java @@ -459,11 +459,16 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto * if the action is up to date, and non-null if it needs to be executed, in which case that token * should be provided to the ActionCacheChecker after execution. */ - Token checkActionCache(Action action, MetadataHandler metadataHandler, - long actionStartTime, Iterable<Artifact> resolvedCacheArtifacts) { + Token checkActionCache( + Action action, + MetadataHandler metadataHandler, + long actionStartTime, + Iterable<Artifact> resolvedCacheArtifacts, + Map<String, String> clientEnv) { profiler.startTask(ProfilerTask.ACTION_CHECK, action); - Token token = actionCacheChecker.getTokenIfNeedToExecute( - action, resolvedCacheArtifacts, explain ? reporter : null, metadataHandler); + Token token = + actionCacheChecker.getTokenIfNeedToExecute( + action, resolvedCacheArtifacts, clientEnv, explain ? reporter : null, metadataHandler); profiler.completeTask(ProfilerTask.ACTION_CHECK); if (token == null) { boolean eventPosted = false; @@ -487,7 +492,8 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto return token; } - void afterExecution(Action action, MetadataHandler metadataHandler, Token token) { + void afterExecution( + Action action, MetadataHandler metadataHandler, Token token, Map<String, String> clientEnv) { if (!actionReallyExecuted(action)) { // If an action shared with this one executed, then we need not update the action cache, since // the other action will do it. Moreover, this action is not aware of metadata acquired @@ -495,7 +501,7 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto return; } try { - actionCacheChecker.afterExecution(action, token, metadataHandler); + actionCacheChecker.afterExecution(action, token, metadataHandler, clientEnv); } catch (IOException e) { // Skyframe has already done all the filesystem access needed for outputs and swallows // IOExceptions for inputs. So an IOException is impossible here. |