Filter middleman artifacts from NamedArtifactGroup
PiperOrigin-RevId: 199786555
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/NamedArtifactGroup.java b/src/main/java/com/google/devtools/build/lib/runtime/NamedArtifactGroup.java
index 700ab65..b990c15 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/NamedArtifactGroup.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/NamedArtifactGroup.java
@@ -59,6 +59,9 @@
BuildEventStreamProtos.NamedSetOfFiles.Builder builder =
BuildEventStreamProtos.NamedSetOfFiles.newBuilder();
for (Artifact artifact : view.directs()) {
+ if (artifact.isMiddlemanArtifact()) {
+ continue;
+ }
String name = artifact.getRootRelativePathString();
String uri = pathConverter.apply(artifact.getPath());
builder.addFiles(BuildEventStreamProtos.File.newBuilder().setName(name).setUri(uri));