diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java | 10 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java index 3a89fa5aeb..81f9eac0aa 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java @@ -117,6 +117,16 @@ public final class BuildEventId implements Serializable { BuildEventStreamProtos.BuildEventId.newBuilder().setTargetCompleted(targetId).build()); } + public static BuildEventId aspectCompleted(Label target, String aspect) { + BuildEventStreamProtos.BuildEventId.TargetCompletedId targetId = + BuildEventStreamProtos.BuildEventId.TargetCompletedId.newBuilder() + .setLabel(target.toString()) + .setAspect(aspect) + .build(); + return new BuildEventId( + BuildEventStreamProtos.BuildEventId.newBuilder().setTargetCompleted(targetId).build()); + } + public static BuildEventId fromCause(Cause cause) { return new BuildEventId(cause.getIdProto()); } diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto index 072a7ef9ca..a4592faac1 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto @@ -63,6 +63,10 @@ message BuildEventId { // does not include running the test if the target is a test target. message TargetCompletedId { string label = 1; + + // If not empty, the id refers to the completion of the target for a given + // aspect. + string aspect = 2; } // Identifier of an event reporting that an action was completed (not all |