diff options
author | 2015-06-09 22:09:03 +0000 | |
---|---|---|
committer | 2015-06-10 16:02:26 +0000 | |
commit | 331633c7c22a9ae00f26e11fb6c54a9bd2b83097 (patch) | |
tree | 69a0ae31a464a35b49ab149ff60bd26ef2f90627 /src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java | |
parent | 1cad714e2157dd940cc75428e8bb4d682b1bef28 (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/ActionCacheChecker.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java b/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java index 40eabeb9de..c9c1ecbec3 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java @@ -241,7 +241,8 @@ public class ActionCacheChecker { } @Nullable - public Iterable<Artifact> getCachedInputs(Action action, PackageRootResolver resolver) { + public Iterable<Artifact> getCachedInputs(Action action, PackageRootResolver resolver) + throws PackageRootResolutionException { ActionCache.Entry entry = getCacheEntry(action); if (entry == null || entry.isCorrupted()) { return ImmutableList.of(); |