diff options
author | 2017-02-02 10:47:07 +0000 | |
---|---|---|
committer | 2017-02-02 17:00:02 +0000 | |
commit | 1f2caa59933cdf6fe2a74f44c76f0cf89ad4d8c1 (patch) | |
tree | 5c81d46f853430b6638bc0079bee46e454d12eaa /src/main/java/com/google/devtools/build/lib/actions/Action.java | |
parent | 1f452c3db426a472a30f09c2ed6594fe1fa50749 (diff) |
Simplify the Action interface by asking it a set of allowed inputs instead of to resolve exec paths found in the action cache.
The resolution algorithm was the same in all cases where it was implemented.
--
PiperOrigin-RevId: 146344672
MOS_MIGRATED_REVID=146344672
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Action.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Action.java | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Action.java b/src/main/java/com/google/devtools/build/lib/actions/Action.java index 6985fa2a1d..bee4774a66 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Action.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Action.java @@ -18,10 +18,8 @@ import com.google.devtools.build.lib.actions.extra.ExtraActionInfo; import com.google.devtools.build.lib.concurrent.ThreadSafety.ConditionallyThreadCompatible; import com.google.devtools.build.lib.profiler.Describable; import com.google.devtools.build.lib.vfs.Path; -import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.skyframe.SkyFunction; import java.io.IOException; -import java.util.Collection; import javax.annotation.Nullable; /** @@ -165,25 +163,15 @@ public interface Action extends ActionExecutionMetadata, Describable { throws ActionExecutionException, InterruptedException; /** - * Method used to resolve action inputs based on the information contained in the action cache. It - * will be called iff inputsKnown() is false for the given action instance and there is a related - * cache entry in the action cache. + * Returns the set of artifacts that can possibly be inputs. It will be called iff inputsKnown() + * is false for the given action instance and there is a related cache entry in the action cache. * * <p>Method must be redefined for any action that may return inputsKnown() == false. * - * @param artifactResolver the artifact factory that can be used to manufacture artifacts - * @param resolver object which helps to resolve some of the artifacts - * @param inputPaths List of relative (to the execution root) input paths - * @return List of Artifacts corresponding to inputPaths, or null if some dependencies were - * missing and we need to try again later. - * @throws PackageRootResolutionException on failure to determine package roots of inputPaths + * <p>The method is allowed to return source artifacts. They are useless, though, since exec paths + * in the action cache referring to source artifacts are always resolved. */ - @Nullable - Iterable<Artifact> resolveInputsFromCache( - ArtifactResolver artifactResolver, - PackageRootResolver resolver, - Collection<PathFragment> inputPaths) - throws PackageRootResolutionException, InterruptedException; + Iterable<Artifact> getAllowedDerivedInputs(); /** * Informs the action that its inputs are {@code inputs}, and that its inputs are now known. Can |