diff options
author | Michajlo Matijkiw <michajlo@google.com> | 2015-06-09 22:09:03 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2015-06-10 16:02:26 +0000 |
commit | 331633c7c22a9ae00f26e11fb6c54a9bd2b83097 (patch) | |
tree | 69a0ae31a464a35b49ab149ff60bd26ef2f90627 /src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.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/analysis/SkyframePackageRootResolver.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java b/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java index 50aeb9ae2b..db24b5ed1b 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.analysis; +import com.google.devtools.build.lib.actions.PackageRootResolutionException; import com.google.devtools.build.lib.actions.PackageRootResolver; import com.google.devtools.build.lib.actions.Root; import com.google.devtools.build.lib.skyframe.SkyframeExecutor; @@ -34,7 +35,8 @@ public final class SkyframePackageRootResolver implements PackageRootResolver { } @Override - public Map<PathFragment, Root> findPackageRoots(Iterable<PathFragment> execPaths) { + public Map<PathFragment, Root> findPackageRoots(Iterable<PathFragment> execPaths) + throws PackageRootResolutionException { return executor.getArtifactRoots(execPaths); } }
\ No newline at end of file |