aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-06-16 17:30:27 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-06-19 18:23:22 +0200
commitd8c286d32513d5696b2ec8c4e7d6ffd4bb332227 (patch)
tree7414f9c39b311dd329a4c0d3065e296fc0200975 /src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java
parentf7bc9e550ef775c029a5eaee615ef74a06b312a5 (diff)
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
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java9
1 files changed, 3 insertions, 6 deletions
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
@@ -326,11 +326,6 @@ public class BuildEventStreamer implements EventHandler {
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();
}
}