aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/Action.java
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2015-06-09 22:09:03 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2015-06-10 16:02:26 +0000
commit331633c7c22a9ae00f26e11fb6c54a9bd2b83097 (patch)
tree69a0ae31a464a35b49ab149ff60bd26ef2f90627 /src/main/java/com/google/devtools/build/lib/actions/Action.java
parent1cad714e2157dd940cc75428e8bb4d682b1bef28 (diff)
Handle exceptions encountered resolving packages during the execution phase
Currently we may do lookups of not-already-cached packages during the execution phase for actions that discover inputs. Exceptions encountered during this would go unhandled and result in a crash. Here we introduce PackageRootResolutionException which wraps these exceptions and triggers an ActionExecutionException which is cleanly handled in the exec phase. As part of this change SkyframeActionExecutor#getArtifactRoots(...) will fail properly on errors getting package roots. -- MOS_MIGRATED_REVID=95578891
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.java3
1 files changed, 2 insertions, 1 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 3581ae0a31..af0ed613ac 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
@@ -120,11 +120,12 @@ public interface Action extends ActionMetadata, Describable {
* @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
*/
@Nullable
Iterable<Artifact> resolveInputsFromCache(
ArtifactResolver artifactResolver, PackageRootResolver resolver,
- Collection<PathFragment> inputPaths);
+ Collection<PathFragment> inputPaths) throws PackageRootResolutionException;
/**
* Informs the action that its inputs are {@code inputs}, and that its inputs are now known. Can