diff options
author | felly <felly@google.com> | 2018-08-09 14:28:14 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-09 14:29:50 -0700 |
commit | 39974a43abdd32e3a1acbc7da945b08da9983e4e (patch) | |
tree | 34ddeab6c7bbe9d129f7c0dbe2c456c6cadab881 /src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java | |
parent | 943a9c792032c75b25a1665e7143409fe3950041 (diff) |
Allow skyframe-aware actions to pass partial results through ActionExecutionContext.
Remove FilesetProvider.
PiperOrigin-RevId: 208111251
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java index 037f47b1ad..44a79f9314 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java @@ -69,6 +69,7 @@ public class ActionExecutionContext implements Closeable { @Nullable private final Environment env; @Nullable private final FileSystem actionFileSystem; + @Nullable private final Object skyframeDepsResult; @Nullable private ImmutableList<FilesetOutputSymlink> outputSymlinks; @@ -85,7 +86,8 @@ public class ActionExecutionContext implements Closeable { ImmutableMap<PathFragment, ImmutableList<FilesetOutputSymlink>> inputFilesetMappings, @Nullable ArtifactExpander artifactExpander, @Nullable SkyFunction.Environment env, - @Nullable FileSystem actionFileSystem) { + @Nullable FileSystem actionFileSystem, + @Nullable Object skyframeDepsResult) { this.actionInputFileCache = actionInputFileCache; this.actionInputPrefetcher = actionInputPrefetcher; this.actionKeyContext = actionKeyContext; @@ -97,6 +99,7 @@ public class ActionExecutionContext implements Closeable { this.artifactExpander = artifactExpander; this.env = env; this.actionFileSystem = actionFileSystem; + this.skyframeDepsResult = skyframeDepsResult; this.pathResolver = ArtifactPathResolver.createPathResolver(actionFileSystem, // executor is only ever null in testing. executor == null ? null : executor.getExecRoot()); @@ -112,7 +115,8 @@ public class ActionExecutionContext implements Closeable { Map<String, String> clientEnv, ImmutableMap<PathFragment, ImmutableList<FilesetOutputSymlink>> inputFilesetMappings, ArtifactExpander artifactExpander, - @Nullable FileSystem actionFileSystem) { + @Nullable FileSystem actionFileSystem, + @Nullable Object skyframeDepsResult) { this( executor, actionInputFileCache, @@ -124,7 +128,8 @@ public class ActionExecutionContext implements Closeable { inputFilesetMappings, artifactExpander, /*env=*/ null, - actionFileSystem); + actionFileSystem, + skyframeDepsResult); } public static ActionExecutionContext forInputDiscovery( @@ -148,7 +153,8 @@ public class ActionExecutionContext implements Closeable { ImmutableMap.of(), /*artifactExpander=*/ null, env, - actionFileSystem); + actionFileSystem, + /*skyframeDepsResult=*/ null); } public ActionInputPrefetcher getActionInputPrefetcher() { @@ -278,6 +284,11 @@ public class ActionExecutionContext implements Closeable { return artifactExpander; } + @Nullable + public Object getSkyframeDepsResult() { + return skyframeDepsResult; + } + /** * Provide that {@code FileOutErr} that the action should use for redirecting the output and error * stream. @@ -318,6 +329,7 @@ public class ActionExecutionContext implements Closeable { inputFilesetMappings, artifactExpander, env, - actionFileSystem); + actionFileSystem, + skyframeDepsResult); } } |