Fix BEP to report SKIPPED with TargetCompletedId instead of ConfigurationId
@@ -34,6 +34,7 @@ import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.analysis.config.DefaultsPackage;
import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
import com.google.devtools.build.lib.buildeventstream.AbortedEvent;
+import com.google.devtools.build.lib.buildeventstream.BuildEventId;
import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.Aborted.AbortReason;
import com.google.devtools.build.lib.buildtool.BuildRequest.BuildRequestOptions;
import com.google.devtools.build.lib.buildtool.buildevent.BuildCompleteEvent;
@@ -220,7 +221,10 @@ public final class BuildTool {
for (ConfiguredTarget target : analysisResult.getTargetsToSkip()) {
BuildConfiguration config = target.getConfiguration();
Label label = target.getLabel();
- env.getEventBus().post(new AbortedEvent(config.getEventId(), AbortReason.SKIPPED,
+ env.getEventBus().post(
+ new AbortedEvent(
+ BuildEventId.targetCompleted(label, config.getEventId()),
+ AbortReason.SKIPPED,
String.format("Target %s build was skipped.", label), label));
}
