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/AnalysisEnvironment.java b/src/main/java/com/google/devtools/build/lib/analysis/AnalysisEnvironment.java
index fcdc3ec..9f9a655 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/AnalysisEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/AnalysisEnvironment.java
@@ -127,13 +127,13 @@
    * Returns the Artifact that is used to hold the non-volatile workspace status for the current
    * build request.
    */
-  Artifact getStableWorkspaceStatusArtifact();
+  Artifact getStableWorkspaceStatusArtifact() throws InterruptedException;
 
   /**
-   * Returns the Artifact that is used to hold the volatile workspace status (e.g. build
-   * changelist) for the current build request.
+   * Returns the Artifact that is used to hold the volatile workspace status (e.g. build changelist)
+   * for the current build request.
    */
-  Artifact getVolatileWorkspaceStatusArtifact();
+  Artifact getVolatileWorkspaceStatusArtifact() throws InterruptedException;
 
   /**
    * Returns the Artifacts that contain the workspace status for the current build request.
@@ -142,7 +142,8 @@
    * @param config the current build configuration.
    */
   ImmutableList<Artifact> getBuildInfo(
-      RuleContext ruleContext, BuildInfoKey key, BuildConfiguration config);
+      RuleContext ruleContext, BuildInfoKey key, BuildConfiguration config)
+      throws InterruptedException;
 
   /**
    * Returns the set of orphan Artifacts (i.e. Artifacts without generating action). Should only be
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,
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/CachingAnalysisEnvironment.java b/src/main/java/com/google/devtools/build/lib/analysis/CachingAnalysisEnvironment.java
index 5fd3d43..5aed23d 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/CachingAnalysisEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/CachingAnalysisEnvironment.java
@@ -37,7 +37,6 @@
 import com.google.devtools.build.lib.util.Preconditions;
 import com.google.devtools.build.lib.vfs.PathFragment;
 import com.google.devtools.build.skyframe.SkyFunction;
-
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.ArrayList;
@@ -49,7 +48,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
-
 import javax.annotation.Nullable;
 
 /**
@@ -287,21 +285,21 @@
   }
 
   @Override
-  public Artifact getStableWorkspaceStatusArtifact() {
+  public Artifact getStableWorkspaceStatusArtifact() throws InterruptedException {
     return ((WorkspaceStatusValue) skyframeEnv.getValue(WorkspaceStatusValue.SKY_KEY))
             .getStableArtifact();
   }
 
   @Override
-  public Artifact getVolatileWorkspaceStatusArtifact() {
+  public Artifact getVolatileWorkspaceStatusArtifact() throws InterruptedException {
     return ((WorkspaceStatusValue) skyframeEnv.getValue(WorkspaceStatusValue.SKY_KEY))
             .getVolatileArtifact();
   }
 
   // See SkyframeBuildView#getWorkspaceStatusValues for the code that this method is attempting to
   // verify.
-  private NullPointerException collectDebugInfoAndCrash(
-      BuildInfoKey key, BuildConfiguration config) {
+  private NullPointerException collectDebugInfoAndCrash(BuildInfoKey key, BuildConfiguration config)
+      throws InterruptedException {
     String debugInfo = key + " " + config;
     Preconditions.checkState(skyframeEnv.valuesMissing(), debugInfo);
     Map<BuildInfoKey, BuildInfoFactory> buildInfoFactories = Preconditions.checkNotNull(
@@ -314,7 +312,8 @@
 
   @Override
   public ImmutableList<Artifact> getBuildInfo(
-      RuleContext ruleContext, BuildInfoKey key, BuildConfiguration config) {
+      RuleContext ruleContext, BuildInfoKey key, BuildConfiguration config)
+      throws InterruptedException {
     boolean stamp = AnalysisUtils.isStampingEnabled(ruleContext, config);
     BuildInfoCollectionValue collectionValue =
         (BuildInfoCollectionValue) skyframeEnv.getValue(BuildInfoCollectionValue.key(
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ConfigurationCollectionFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/ConfigurationCollectionFactory.java
index 77c51d9..75ac3a0 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ConfigurationCollectionFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ConfigurationCollectionFactory.java
@@ -21,7 +21,6 @@
 import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
 import com.google.devtools.build.lib.analysis.config.PackageProviderForConfigurations;
 import com.google.devtools.build.lib.events.EventHandler;
-
 import javax.annotation.Nullable;
 
 /**
@@ -31,9 +30,10 @@
   /**
    * Creates the top-level configuration for a build.
    *
-   * <p>Also it may create a set of BuildConfigurations and define a transition table over them.
-   * All configurations during a build should be accessible from this top-level configuration
-   * via configuration transitions.
+   * <p>Also it may create a set of BuildConfigurations and define a transition table over them. All
+   * configurations during a build should be accessible from this top-level configuration via
+   * configuration transitions.
+   *
    * @param configurationFactory the configuration factory
    * @param cache a cache for BuildConfigurations
    * @param loadedPackageProvider the package provider
@@ -48,7 +48,8 @@
       Cache<String, BuildConfiguration> cache,
       PackageProviderForConfigurations loadedPackageProvider,
       BuildOptions buildOptions,
-      EventHandler errorEventListener) throws InvalidConfigurationException;
+      EventHandler errorEventListener)
+      throws InvalidConfigurationException, InterruptedException;
 
   /**
    * Returns the module the given configuration should use for choosing dynamic transitions.
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/DependencyResolver.java b/src/main/java/com/google/devtools/build/lib/analysis/DependencyResolver.java
index 6816b42..10703ba 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/DependencyResolver.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/DependencyResolver.java
@@ -45,14 +45,12 @@
 import com.google.devtools.build.lib.syntax.EvalUtils;
 import com.google.devtools.build.lib.util.OrderedSetMultimap;
 import com.google.devtools.build.lib.util.Preconditions;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import javax.annotation.Nullable;
 
 /**
@@ -232,12 +230,15 @@
     }
   }
 
-  private void resolveExplicitAttributes(final RuleResolver depResolver) {
+  private void resolveExplicitAttributes(final RuleResolver depResolver)
+      throws InterruptedException {
     depResolver.attributeMap.visitLabels(
         new AttributeMap.AcceptsLabelAttribute() {
           @Override
-          public void acceptLabelAttribute(Label label, Attribute attribute) {
-            if (attribute.getType() == BuildType.NODEP_LABEL || attribute.isImplicit()
+          public void acceptLabelAttribute(Label label, Attribute attribute)
+              throws InterruptedException {
+            if (attribute.getType() == BuildType.NODEP_LABEL
+                || attribute.isImplicit()
                 || attribute.isLateBound()) {
               return;
             }
@@ -246,10 +247,8 @@
         });
   }
 
-  /**
-   * Resolves the dependencies for all implicit attributes in this rule.
-   */
-  private void resolveImplicitAttributes(RuleResolver depResolver) {
+  /** Resolves the dependencies for all implicit attributes in this rule. */
+  private void resolveImplicitAttributes(RuleResolver depResolver) throws InterruptedException {
     // Since the attributes that come from aspects do not appear in attributeMap, we have to get
     // their values from somewhere else. This incidentally means that aspects attributes are not
     // configurable. It would be nice if that wasn't the case, but we'd have to revamp how
@@ -455,7 +454,8 @@
    * @param attrName the name of the attribute to add dependency labels to
    * @param labels the dependencies to add
    */
-  private void addExplicitDeps(RuleResolver depResolver, String attrName, Iterable<Label> labels) {
+  private void addExplicitDeps(RuleResolver depResolver, String attrName, Iterable<Label> labels)
+      throws InterruptedException {
     Rule rule = depResolver.rule;
     if (!rule.isAttrDefined(attrName, BuildType.LABEL_LIST)
         && !rule.isAttrDefined(attrName, BuildType.NODEP_LABEL_LIST)) {
@@ -468,13 +468,16 @@
   }
 
   /**
-   * Converts the given multimap of attributes to labels into a multi map of attributes to
-   * {@link Dependency} objects using the proper configuration transition for each attribute.
+   * Converts the given multimap of attributes to labels into a multi map of attributes to {@link
+   * Dependency} objects using the proper configuration transition for each attribute.
    *
    * @throws IllegalArgumentException if the {@code node} does not refer to a {@link Rule} instance
    */
-  public final Collection<Dependency> resolveRuleLabels(TargetAndConfiguration node,
-      OrderedSetMultimap<Attribute, Label> depLabels, NestedSetBuilder<Label> rootCauses) {
+  public final Collection<Dependency> resolveRuleLabels(
+      TargetAndConfiguration node,
+      OrderedSetMultimap<Attribute, Label> depLabels,
+      NestedSetBuilder<Label> rootCauses)
+      throws InterruptedException {
     Preconditions.checkArgument(node.getTarget() instanceof Rule);
     Rule rule = (Rule) node.getTarget();
     OrderedSetMultimap<Attribute, Dependency> outgoingEdges = OrderedSetMultimap.create();
@@ -489,8 +492,12 @@
     return outgoingEdges.values();
   }
 
-  private void visitPackageGroup(TargetAndConfiguration node, PackageGroup packageGroup,
-      NestedSetBuilder<Label> rootCauses, Collection<Dependency> outgoingEdges) {
+  private void visitPackageGroup(
+      TargetAndConfiguration node,
+      PackageGroup packageGroup,
+      NestedSetBuilder<Label> rootCauses,
+      Collection<Dependency> outgoingEdges)
+      throws InterruptedException {
     for (Label label : packageGroup.getIncludes()) {
       Target target = getTarget(packageGroup, label, rootCauses);
       if (target == null) {
@@ -508,7 +515,7 @@
     }
   }
 
-  private ImmutableSet<AspectDescriptor> requiredAspects(
+  private static ImmutableSet<AspectDescriptor> requiredAspects(
       @Nullable Aspect aspect, Attribute attribute, final Target target, Rule originalRule) {
     if (!(target instanceof Rule)) {
       return ImmutableSet.of();
@@ -613,10 +620,10 @@
     }
 
     /**
-     * Resolves the given dep for the given attribute, including determining which
-     * configurations to apply to it.
+     * Resolves the given dep for the given attribute, including determining which configurations to
+     * apply to it.
      */
-    void resolveDep(Attribute attribute, Label depLabel) {
+    void resolveDep(Attribute attribute, Label depLabel) throws InterruptedException {
       Target toTarget = getTarget(rule, depLabel, rootCauses);
       if (toTarget == null) {
         return; // Skip this round: we still need to Skyframe-evaluate the dep's target.
@@ -633,13 +640,14 @@
     /**
      * Resolves the given dep for the given attribute using a pre-prepared configuration.
      *
-     * <p>Use this method with care: it skips Bazel's standard config transition semantics
-     * ({@link BuildConfiguration#evaluateTransition}). That means attributes passed through here
-     * won't obey standard rules on which configurations apply to their deps. This should only
-     * be done for special circumstances that really justify the difference. When in doubt, use
-     * {@link #resolveDep(Attribute, Label)}.
+     * <p>Use this method with care: it skips Bazel's standard config transition semantics ({@link
+     * BuildConfiguration#evaluateTransition}). That means attributes passed through here won't obey
+     * standard rules on which configurations apply to their deps. This should only be done for
+     * special circumstances that really justify the difference. When in doubt, use {@link
+     * #resolveDep(Attribute, Label)}.
      */
-    void resolveDep(Attribute attribute, Label depLabel, BuildConfiguration config) {
+    void resolveDep(Attribute attribute, Label depLabel, BuildConfiguration config)
+        throws InterruptedException {
       Target toTarget = getTarget(rule, depLabel, rootCauses);
       if (toTarget == null) {
         return; // Skip this round: this is either a loading error or unevaluated Skyframe dep.
@@ -686,8 +694,11 @@
     }
   }
 
-  private void visitTargetVisibility(TargetAndConfiguration node,
-      NestedSetBuilder<Label> rootCauses, Collection<Dependency> outgoingEdges) {
+  private void visitTargetVisibility(
+      TargetAndConfiguration node,
+      NestedSetBuilder<Label> rootCauses,
+      Collection<Dependency> outgoingEdges)
+      throws InterruptedException {
     Target target = node.getTarget();
     for (Label label : target.getVisibility().getDependencyLabels()) {
       Target visibilityTarget = getTarget(target, label, rootCauses);
@@ -733,22 +744,24 @@
    * @param to the missing target
    * @param e the exception that was thrown, e.g., by {@link #getTarget}
    */
-  protected abstract void missingEdgeHook(Target from, Label to, NoSuchThingException e);
+  protected abstract void missingEdgeHook(Target from, Label to, NoSuchThingException e)
+      throws InterruptedException;
 
   /**
    * Returns the target by the given label.
    *
    * <p>Returns null if the target is not ready to be returned at this moment. If getTarget returns
    * null once or more during a {@link #dependentNodeMap} call, the results of that call will be
-   * incomplete. For use within Skyframe, where several iterations may be needed to discover
-   * all dependencies.
+   * incomplete. For use within Skyframe, where several iterations may be needed to discover all
+   * dependencies.
    */
   @Nullable
-  protected abstract Target getTarget(Target from, Label label, NestedSetBuilder<Label> rootCauses);
+  protected abstract Target getTarget(Target from, Label label, NestedSetBuilder<Label> rootCauses)
+      throws InterruptedException;
 
   /**
-   * Returns the build configurations with the given options and fragments, in the same order as
-   * the input options.
+   * Returns the build configurations with the given options and fragments, in the same order as the
+   * input options.
    *
    * <p>Returns null if any configurations aren't ready to be returned at this moment. If
    * getConfigurations returns null once or more during a {@link #dependentNodeMap} call, the
@@ -758,5 +771,6 @@
   @Nullable
   protected abstract List<BuildConfiguration> getConfigurations(
       Set<Class<? extends BuildConfiguration.Fragment>> fragments,
-      Iterable<BuildOptions> buildOptions) throws InvalidConfigurationException;
+      Iterable<BuildOptions> buildOptions)
+      throws InvalidConfigurationException, InterruptedException;
 }
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RedirectChaser.java b/src/main/java/com/google/devtools/build/lib/analysis/RedirectChaser.java
index a908ada..6a27b5c 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RedirectChaser.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RedirectChaser.java
@@ -71,7 +71,7 @@
    */
   @Nullable
   public static Label followRedirects(ConfigurationEnvironment env, Label label, String name)
-      throws InvalidConfigurationException {
+      throws InvalidConfigurationException, InterruptedException {
     Label oldLabel = null;
     Set<Label> visitedLabels = new HashSet<>();
     visitedLabels.add(label);
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 321c385..a829195 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -391,7 +391,7 @@
     return getAnalysisEnvironment().getOwner();
   }
 
-  public ImmutableList<Artifact> getBuildInfo(BuildInfoKey key) {
+  public ImmutableList<Artifact> getBuildInfo(BuildInfoKey key) throws InterruptedException {
     return getAnalysisEnvironment().getBuildInfo(this, key, getConfiguration());
   }
 
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationEnvironment.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationEnvironment.java
index d2439ac..ec55f60 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationEnvironment.java
@@ -24,9 +24,7 @@
 import com.google.devtools.build.lib.packages.Target;
 import com.google.devtools.build.lib.pkgcache.LoadedPackageProvider;
 import com.google.devtools.build.lib.pkgcache.PackageProvider;
-import com.google.devtools.build.lib.pkgcache.TargetProvider;
 import com.google.devtools.build.lib.vfs.Path;
-
 import javax.annotation.Nullable;
 
 /**
@@ -48,18 +46,19 @@
    *
    * @see TargetProvider#getTarget
    */
-  Target getTarget(Label label) throws NoSuchPackageException, NoSuchTargetException;
+  Target getTarget(Label label)
+      throws NoSuchPackageException, NoSuchTargetException, InterruptedException;
 
   /** Returns a path for the given file within the given package. */
-  Path getPath(Package pkg, String fileName);
-  
+  Path getPath(Package pkg, String fileName) throws InterruptedException;
+
   /** Returns fragment based on fragment class and build options. */
-  <T extends Fragment> T getFragment(BuildOptions buildOptions, Class<T> fragmentType) 
-      throws InvalidConfigurationException;
+  <T extends Fragment> T getFragment(BuildOptions buildOptions, Class<T> fragmentType)
+      throws InvalidConfigurationException, InterruptedException;
 
   /** Returns global value of BlazeDirectories. */
   @Nullable
-  BlazeDirectories getBlazeDirectories();
+  BlazeDirectories getBlazeDirectories() throws InterruptedException;
 
   /**
    * An implementation backed by a {@link PackageProvider} instance.
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFactory.java
index 31eb150..595f527 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFactory.java
@@ -22,11 +22,9 @@
 import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadCompatible;
 import com.google.devtools.build.lib.events.EventHandler;
 import com.google.devtools.build.lib.util.Preconditions;
-
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import javax.annotation.Nullable;
 
 /**
@@ -69,23 +67,27 @@
   @Nullable
   public BuildConfiguration createConfigurations(
       Cache<String, BuildConfiguration> cache,
-      PackageProviderForConfigurations loadedPackageProvider, BuildOptions buildOptions,
+      PackageProviderForConfigurations loadedPackageProvider,
+      BuildOptions buildOptions,
       EventHandler errorEventListener)
-          throws InvalidConfigurationException {
+      throws InvalidConfigurationException, InterruptedException {
     return configurationCollectionFactory.createConfigurations(this, cache,
         loadedPackageProvider, buildOptions, errorEventListener);
   }
 
   /**
-   * Returns a {@link com.google.devtools.build.lib.analysis.config.BuildConfiguration} based on
-   * the given set of build options.
+   * Returns a {@link com.google.devtools.build.lib.analysis.config.BuildConfiguration} based on the
+   * given set of build options.
    *
    * <p>If the configuration has already been created, re-uses it, otherwise, creates a new one.
    */
   @Nullable
-  public BuildConfiguration getConfiguration(PackageProviderForConfigurations loadedPackageProvider,
-      BuildOptions buildOptions, boolean actionsDisabled, Cache<String, BuildConfiguration> cache)
-      throws InvalidConfigurationException {
+  public BuildConfiguration getConfiguration(
+      PackageProviderForConfigurations loadedPackageProvider,
+      BuildOptions buildOptions,
+      boolean actionsDisabled,
+      Cache<String, BuildConfiguration> cache)
+      throws InvalidConfigurationException, InterruptedException {
 
     String cacheKey = buildOptions.computeCacheKey();
     BuildConfiguration result = cache.getIfPresent(cacheKey);
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFragmentFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFragmentFactory.java
index 1ae9a66..0c19502 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFragmentFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationFragmentFactory.java
@@ -15,7 +15,6 @@
 
 import com.google.common.collect.ImmutableSet;
 import com.google.devtools.build.lib.analysis.config.BuildConfiguration.Fragment;
-
 import javax.annotation.Nullable;
 
 /**
@@ -31,7 +30,7 @@
    */
   @Nullable
   BuildConfiguration.Fragment create(ConfigurationEnvironment env, BuildOptions buildOptions)
-      throws InvalidConfigurationException;
+      throws InvalidConfigurationException, InterruptedException;
 
   /**
    * @return the exact type of the fragment this factory creates.
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/PackageProviderForConfigurations.java b/src/main/java/com/google/devtools/build/lib/analysis/config/PackageProviderForConfigurations.java
index dddc786..e493e48 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/PackageProviderForConfigurations.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/PackageProviderForConfigurations.java
@@ -22,7 +22,6 @@
 import com.google.devtools.build.lib.packages.NoSuchTargetException;
 import com.google.devtools.build.lib.packages.Package;
 import com.google.devtools.build.lib.packages.Target;
-
 import java.io.IOException;
 
 /**
@@ -35,18 +34,15 @@
    * Adds dependency to fileName if needed. Used only in skyframe, for creating correct dependencies
    * for {@link com.google.devtools.build.lib.skyframe.ConfigurationCollectionValue}.
    */
-  void addDependency(Package pkg, String fileName) throws LabelSyntaxException, IOException;
-  
-  /**
-   * Returns fragment based on fragment type and build options.
-   */
-  <T extends Fragment> T getFragment(BuildOptions buildOptions, Class<T> fragmentType) 
-      throws InvalidConfigurationException;
-  
-  /**
-   * Returns blaze directories and adds dependency to that value.
-   */
-  BlazeDirectories getDirectories();
+  void addDependency(Package pkg, String fileName)
+      throws LabelSyntaxException, IOException, InterruptedException;
+
+  /** Returns fragment based on fragment type and build options. */
+  <T extends Fragment> T getFragment(BuildOptions buildOptions, Class<T> fragmentType)
+      throws InvalidConfigurationException, InterruptedException;
+
+  /** Returns blaze directories and adds dependency to that value. */
+  BlazeDirectories getDirectories() throws InterruptedException;
   
   /**
    * Returns true if any dependency is missing (value of some node hasn't been evaluated yet).
@@ -59,8 +55,9 @@
    * function evaluation.
    *
    * @throws NoSuchPackageException if the package could not be found
-   * @throws NoSuchTargetException if the package was loaded successfully, but
-   *         the specified {@link Target} was not found in it
+   * @throws NoSuchTargetException if the package was loaded successfully, but the specified {@link
+   *     Target} was not found in it
    */
-  Target getTarget(Label label) throws NoSuchPackageException, NoSuchTargetException;
+  Target getTarget(Label label)
+      throws NoSuchPackageException, NoSuchTargetException, InterruptedException;
 }