diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/BuildView.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/BuildView.java | 22 |
1 files changed, 14 insertions, 8 deletions
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 e966e7fb42..bf942365d1 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 @@ -350,18 +350,21 @@ public class BuildView { return getConfiguredTarget(packageManager.getLoadedTarget(label), config); } - public Iterable<ConfiguredTarget> getDirectPrerequisites(ConfiguredTarget ct) { + public Iterable<ConfiguredTarget> getDirectPrerequisites(ConfiguredTarget ct) + throws InterruptedException { return getDirectPrerequisites(ct, null); } public Iterable<ConfiguredTarget> getDirectPrerequisites( - ConfiguredTarget ct, @Nullable final LoadingCache<Label, Target> targetCache) { + ConfiguredTarget ct, @Nullable final LoadingCache<Label, Target> targetCache) + throws InterruptedException { return skyframeExecutor.getConfiguredTargets(ct.getConfiguration(), getDirectPrerequisiteDependencies(ct, targetCache), false); } public Iterable<Dependency> getDirectPrerequisiteDependencies( - ConfiguredTarget ct, @Nullable final LoadingCache<Label, Target> targetCache) { + ConfiguredTarget ct, @Nullable final LoadingCache<Label, Target> targetCache) + throws InterruptedException { if (!(ct.getTarget() instanceof Rule)) { return ImmutableList.of(); } @@ -858,7 +861,8 @@ public class BuildView { } @VisibleForTesting - ListMultimap<Attribute, ConfiguredTarget> getPrerequisiteMapForTesting(ConfiguredTarget target) { + ListMultimap<Attribute, ConfiguredTarget> getPrerequisiteMapForTesting(ConfiguredTarget target) + throws InterruptedException { DependencyResolver resolver = new DependencyResolver() { @Override protected void invalidVisibilityReferenceHook(TargetAndConfiguration node, Label label) { @@ -954,8 +958,8 @@ public class BuildView { * Returns a RuleContext which is the same as the original RuleContext of the target parameter. */ @VisibleForTesting - public RuleContext getRuleContextForTesting(ConfiguredTarget target, - StoredEventHandler eventHandler) { + public RuleContext getRuleContextForTesting( + ConfiguredTarget target, StoredEventHandler eventHandler) throws InterruptedException { BuildConfiguration config = target.getConfiguration(); CachingAnalysisEnvironment analysisEnvironment = new CachingAnalysisEnvironment(artifactFactory, @@ -977,7 +981,8 @@ public class BuildView { * given configured target. */ @VisibleForTesting - public RuleContext getRuleContextForTesting(ConfiguredTarget target, AnalysisEnvironment env) { + public RuleContext getRuleContextForTesting(ConfiguredTarget target, AnalysisEnvironment env) + throws InterruptedException { BuildConfiguration targetConfig = target.getConfiguration(); return new RuleContext.Builder( env, (Rule) target.getTarget(), targetConfig, configurations.getHostConfiguration(), @@ -996,7 +1001,8 @@ public class BuildView { */ @VisibleForTesting public ConfiguredTarget getPrerequisiteConfiguredTargetForTesting( - ConfiguredTarget dependentTarget, ConfiguredTarget desiredTarget) { + ConfiguredTarget dependentTarget, ConfiguredTarget desiredTarget) + throws InterruptedException { Collection<ConfiguredTarget> configuredTargets = getPrerequisiteMapForTesting(dependentTarget).values(); for (ConfiguredTarget ct : configuredTargets) { |