diff options
author | janakr <janakr@google.com> | 2017-10-10 08:31:32 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-10-10 11:24:46 +0200 |
commit | d8a5753a8ce1d9cb6604c325836683f3325e42eb (patch) | |
tree | fa0823c7a89cfbf0850feecf6aa91efab0ff6575 /src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java | |
parent | ceb1013c1ca0238188e2714442fcfb2efb16bc6a (diff) |
In PerActionFileCache, tolerate requests for Artifacts that are not in the cache if we're doing input discovery: input discovery may find new artifacts we don't yet know about. Similarly, in SingleBuildFileCache, use the Artifact's path if it's available, rather than the poor man's route of the execRoot.
PiperOrigin-RevId: 171635892
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 | 10 |
1 files changed, 7 insertions, 3 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 a92e809800..46238c4e8b 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 @@ -388,7 +388,9 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver metadataHandler.discardOutputMetadata(); // This may be recreated if we discover inputs. - PerActionFileCache perActionFileCache = new PerActionFileCache(state.inputArtifactData); + PerActionFileCache perActionFileCache = + new PerActionFileCache( + state.inputArtifactData, /*missingArtifactsAllowed=*/ action.discoversInputs()); if (action.discoversInputs()) { if (state.discoveredInputs == null) { try { @@ -406,7 +408,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver if (env.valuesMissing()) { return null; } - perActionFileCache = new PerActionFileCache(state.inputArtifactData); + perActionFileCache = + new PerActionFileCache(state.inputArtifactData, /*missingArtifactsAllowed=*/ false); // 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 @@ -422,7 +425,8 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver if (env.valuesMissing()) { return null; } - perActionFileCache = new PerActionFileCache(state.inputArtifactData); + perActionFileCache = + new PerActionFileCache(state.inputArtifactData, /*missingArtifactsAllowed=*/ false); } metadataHandler = new ActionMetadataHandler(state.inputArtifactData, action.getOutputs(), tsgm.get()); |