From d8c286d32513d5696b2ec8c4e7d6ffd4bb332227 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 16 Jun 2017 17:30:27 +0200 Subject: Make NoBuildEvent an instance of BuildEvent Not all bazel invocations produce a BuildStartingEvent; in fact, not all commands include building. Those invocations produce a NoBuildEvent instead. However, some of those invocations, like "query", might still have important machine-readable information to report, like errors in BUILD files. So, make the NoBuildEvent a build event, capable of starting a stream of build events. Change-Id: I7cab65f029cdc0176ea5c4970308de296fb73177 PiperOrigin-RevId: 159230205 --- .../google/devtools/build/lib/runtime/BuildEventStreamer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java') diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java b/src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java index 19eafc98fd..74bb12218f 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java @@ -325,11 +325,6 @@ public class BuildEventStreamer implements EventHandler { @Override public void handle(Event event) {} - @Subscribe - public void noBuild(NoBuildEvent event) { - close(); - } - @Subscribe public void buildInterrupted(BuildInterruptedEvent event) { abortReason = AbortReason.USER_INTERRUPTED; @@ -374,7 +369,9 @@ public class BuildEventStreamer implements EventHandler { buildEvent(freedEvent); } - if (event instanceof BuildCompleteEvent || event instanceof TestingCompleteEvent) { + if (event instanceof BuildCompleteEvent + || event instanceof TestingCompleteEvent + || event instanceof NoBuildEvent) { buildComplete(); } } -- cgit v1.2.3