diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java | 2 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java | 13 |
2 files changed, 10 insertions, 5 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 46d81b475c..612632e0f6 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 @@ -216,7 +216,7 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver state.actionFileSystem = new ActionFileSystem( skyframeActionExecutor.getExecutorFileSystem(), - skyframeActionExecutor.getExecRoot(), + skyframeActionExecutor.getExecRoot().asFragment(), directories.getRelativeOutputPath(), skyframeActionExecutor.getSourceRoots(), checkedInputs.first, diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java index af2fe79920..bb4904283c 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java @@ -97,7 +97,7 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat ActionFileSystem( FileSystem delegate, - Path execRoot, + PathFragment execRoot, String relativeOutputPath, ImmutableList<Root> sourceRoots, ActionInputMap inputArtifactData, @@ -107,7 +107,7 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat Profiler.instance().profile(ProfilerTask.ACTION_FS_STAGING, "staging")) { this.delegate = delegate; - this.execRootFragment = execRoot.asFragment(); + this.execRootFragment = execRoot; this.outputPathFragment = execRootFragment.getRelative(relativeOutputPath); this.sourceRoots = sourceRoots @@ -639,10 +639,15 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat return new ByteArrayOutputStream() { @Override public void close() throws IOException { + flush(); super.close(); + } + + @Override + public void flush() throws IOException { + super.flush(); byte[] data = toByteArray(); - set( - new InlineFileArtifactValue(data, Hashing.md5().hashBytes(data).asBytes()), + set(new InlineFileArtifactValue(data, Hashing.md5().hashBytes(data).asBytes()), /*notifyConsumer=*/ true); } }; |