1
1
---
2
2
layout : documentation
3
- title : Build event protocol
3
+ title : Build Event Protocol
4
4
---
5
5
6
- # Build event protocol
6
+ # Build Event Protocol
7
7
8
8
The [ Build Event
9
9
Protocol] ( https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto )
@@ -18,8 +18,6 @@ results, build progress, the build configuration and much more. The Build Event
18
18
Protocol is intended to be consumed programmatically and makes parsing Bazel’s
19
19
command line output a thing of the past.
20
20
21
- ## Overview
22
-
23
21
The Build Event Protocol represents information about a build as events. A
24
22
build event is a protocol buffer message consisting of a build event identifier,
25
23
a set of child event identifiers, and a payload.
@@ -44,7 +42,7 @@ encoded as a protocol buffer message specific to that event. Note, that the
44
42
payload might not be the expected type, but could be an ` Aborted ` message e.g.
45
43
if the build aborted prematurely.
46
44
47
- ### Build event graph
45
+ ### Build Event graph
48
46
49
47
All build events form a directed acyclic graph through their parent and child
50
48
relationship. Every build event except for the initial build event has one or
@@ -53,7 +51,7 @@ necessarily be posted before it. When a build is complete (succeeded or failed)
53
51
all announced events will have been posted. In case of a Bazel crash or a failed
54
52
network transport, some announced build events may never be posted.
55
53
56
- ## The Build Event Protocol by example
54
+ ## Build Event Protocol example
57
55
58
56
The full specification of the Build Event Protocol can be found in its protocol
59
57
buffer definition and describing it here is beyond the scope of this document.
@@ -147,9 +145,9 @@ built.
147
145
}
148
146
```
149
147
150
- ## Consuming the Build Event Protocol
148
+ ## Consuming Build Event Protocol
151
149
152
- ### Consume in a binary format
150
+ ### Consume in binary format
153
151
154
152
To consume the Build Event Protocol in a binary format:
155
153
@@ -164,17 +162,17 @@ method.
164
162
2 . Then, write a program that extracts the relevant information from the
165
163
serialized protocol buffer message.
166
164
167
- ### Consume in text formats
165
+ ### Consume in text or JSON formats
168
166
169
- The following Bazel command line flags will output the Build Event Protocol in a
170
- human-readable formats:
167
+ The following Bazel command line flags will output the Build Event Protocol in
168
+ human-readable formats, such as text and JSON :
171
169
172
170
```
173
171
--build_event_text_file
174
172
--build_event_json_file
175
173
```
176
174
177
- ## The Build Event Service
175
+ ## Build Event Service
178
176
179
177
The [ Build Event
180
178
Service] ( https://github.com/googleapis/googleapis/blob/master/google/devtools/build/v1/publish_build_event.proto )
0 commit comments