Allow Skyframe graph lookups and value retrievals to throw InterruptedException.
The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.
--
MOS_MIGRATED_REVID=130327770
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index 5fed4a3..8b5eb24 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -81,7 +81,6 @@
import com.google.devtools.build.skyframe.WalkableGraph;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionsBase;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -568,19 +567,26 @@
String error = createErrorMessage(loadingResult, skyframeAnalysisResult);
final WalkableGraph graph = skyframeAnalysisResult.getWalkableGraph();
- final ActionGraph actionGraph = new ActionGraph() {
- @Nullable
- @Override
- public ActionAnalysisMetadata getGeneratingAction(Artifact artifact) {
- ArtifactOwner artifactOwner = artifact.getArtifactOwner();
- if (artifactOwner instanceof ActionLookupValue.ActionLookupKey) {
- SkyKey key = ActionLookupValue.key((ActionLookupValue.ActionLookupKey) artifactOwner);
- ActionLookupValue val = (ActionLookupValue) graph.getValue(key);
- return val == null ? null : val.getGeneratingAction(artifact);
- }
- return null;
- }
- };
+ final ActionGraph actionGraph =
+ new ActionGraph() {
+ @Nullable
+ @Override
+ public ActionAnalysisMetadata getGeneratingAction(Artifact artifact) {
+ ArtifactOwner artifactOwner = artifact.getArtifactOwner();
+ if (artifactOwner instanceof ActionLookupValue.ActionLookupKey) {
+ SkyKey key = ActionLookupValue.key((ActionLookupValue.ActionLookupKey) artifactOwner);
+ ActionLookupValue val;
+ try {
+ val = (ActionLookupValue) graph.getValue(key);
+ } catch (InterruptedException e) {
+ throw new IllegalStateException(
+ "Interruption not expected from this graph: " + key, e);
+ }
+ return val == null ? null : val.getGeneratingAction(artifact);
+ }
+ return null;
+ }
+ };
return new AnalysisResult(
configuredTargets,
aspects,