diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java | 21 |
1 files changed, 18 insertions, 3 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 467d6f2b20..3a89fa5aeb 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 @@ -84,15 +84,30 @@ public final class BuildEventId implements Serializable { BuildEventStreamProtos.BuildEventId.newBuilder().setStarted(startedId).build()); } - public static BuildEventId targetPatternExpanded(List<String> targetPattern) { + private static BuildEventId targetPatternExpanded(List<String> targetPattern, boolean skipped) { BuildEventStreamProtos.BuildEventId.PatternExpandedId patternId = BuildEventStreamProtos.BuildEventId.PatternExpandedId.newBuilder() .addAllPattern(targetPattern) .build(); - return new BuildEventId( - BuildEventStreamProtos.BuildEventId.newBuilder().setPattern(patternId).build()); + BuildEventStreamProtos.BuildEventId.Builder builder = + BuildEventStreamProtos.BuildEventId.newBuilder(); + if (skipped) { + builder.setPatternSkipped(patternId); + } else { + builder.setPattern(patternId); + } + return new BuildEventId(builder.build()); } + public static BuildEventId targetPatternExpanded(List<String> targetPattern) { + return targetPatternExpanded(targetPattern, false); + } + + public static BuildEventId targetPatternSkipped(List<String> targetPattern) { + return targetPatternExpanded(targetPattern, true); + } + + public static BuildEventId targetCompleted(Label target) { BuildEventStreamProtos.BuildEventId.TargetCompletedId targetId = BuildEventStreamProtos.BuildEventId.TargetCompletedId.newBuilder() |