From 869605e728d947645db70a9d1eb328d220f97929 Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Fri, 25 Sep 2015 18:34:42 +0000 Subject: Inject an EventHandler rather than using the one on SkyframeExecutor. In preparation for removing SkyframeExecutor.errorEventListener. -- MOS_MIGRATED_REVID=103960561 --- .../com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index bc3d0771e1..7cb524a8b9 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -1454,7 +1454,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { /** * Returns the generating action of a given artifact ({@code null} if it's a source artifact). */ - private Action getGeneratingAction(Artifact artifact) throws InterruptedException { + private Action getGeneratingAction(EventHandler eventHandler, Artifact artifact) + throws InterruptedException { if (artifact.isSourceArtifact()) { return null; } @@ -1472,7 +1473,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { // this action. We don't expect callers to query generating actions in such cases. EvaluationResult result = buildDriver.evaluate( ImmutableList.of(actionLookupKey), false, ResourceUsage.getAvailableProcessors(), - errorEventListener); + eventHandler); return result.hasError() ? null : result.get(actionLookupKey).getGeneratingAction(artifact); @@ -1484,7 +1485,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { * *

For legacy compatibility only. */ - public ActionGraph getActionGraph() { + public ActionGraph getActionGraph(final EventHandler eventHandler) { return new ActionGraph() { @Override public Action getGeneratingAction(final Artifact artifact) { @@ -1492,7 +1493,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { return callUninterruptibly(new Callable() { @Override public Action call() throws InterruptedException { - return SkyframeExecutor.this.getGeneratingAction(artifact); + return SkyframeExecutor.this.getGeneratingAction(eventHandler, artifact); } }); } catch (Exception e) { -- cgit v1.2.3