aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-08-01 05:05:19 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-01 05:07:27 -0700
commit41d2b567222728047e1d06f0405741494b0745b6 (patch)
tree4dc0d78c592bbd65ef54a56e8f32ff6c611c583f /src/main/java/com/google/devtools/build/lib/actions
parent377ef3937ce4a552d9ce1f56c9527400d9a0b72d (diff)
Remove the need for discoverInputsStage2(). Much like every other Skyframe
function, discoverInputs() can be implemented to return null upon encountering missing ActionExecutionValues. RELNOTES: None. PiperOrigin-RevId: 206913969
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java7
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Action.java20
2 files changed, 4 insertions, 23 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java b/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
index 44db64bf46..4156175bb4 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
@@ -42,7 +42,6 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.Symlinks;
-import com.google.devtools.build.skyframe.SkyFunction;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
@@ -194,12 +193,6 @@ public abstract class AbstractAction implements Action, ActionApi {
}
@Override
- public Iterable<Artifact> discoverInputsStage2(SkyFunction.Environment env)
- throws ActionExecutionException, InterruptedException {
- return null;
- }
-
- @Override
public Iterable<Artifact> getAllowedDerivedInputs() {
throw new IllegalStateException(
"Method must be overridden for actions that may have unknown inputs.");
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 4c27425f91..e8a75be78a 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,7 +18,6 @@ import com.google.devtools.build.lib.actions.extra.ExtraActionInfo;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ConditionallyThreadCompatible;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Path;
-import com.google.devtools.build.skyframe.SkyFunction;
import java.io.IOException;
import javax.annotation.Nullable;
@@ -139,27 +138,16 @@ public interface Action extends ActionExecutionMetadata {
boolean isVolatile();
/**
- * Method used to find inputs before execution for an action that
- * {@link ActionExecutionMetadata#discoversInputs}. Returns null if action's inputs will be
- * discovered during execution proper.
+ * Method used to find inputs before execution for an action that {@link
+ * ActionExecutionMetadata#discoversInputs}. Returns the set of discovered inputs (may be the
+ * empty set) or null if this action declared additional Skyframe dependencies that must be
+ * computed before it can make a decision.
*/
@Nullable
Iterable<Artifact> discoverInputs(ActionExecutionContext actionExecutionContext)
throws ActionExecutionException, InterruptedException;
/**
- * Used in combination with {@link #discoverInputs} if inputs need to be found before execution in
- * multiple steps. Returns null if two-stage input discovery isn't necessary.
- *
- * <p>Any deps requested here must not change unless one of the action's inputs changes.
- * Otherwise, changes to nodes that should cause re-execution of actions might be prevented by the
- * action cache.
- */
- @Nullable
- Iterable<Artifact> discoverInputsStage2(SkyFunction.Environment env)
- throws ActionExecutionException, InterruptedException;
-
- /**
* 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.
*