Skip to content

Commit

Permalink
Add output of top level aspects to master log
Browse files Browse the repository at this point in the history
RELNOTES:none
PiperOrigin-RevId: 688557424
Change-Id: I07e0918eb18b666835d128db21cee56bb3365d39
  • Loading branch information
oquenchil authored and copybara-github committed Oct 22, 2024
1 parent 38a21da commit 7a4416f
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.CompletionContext;
import com.google.devtools.build.lib.actions.EventReportingArtifacts;
import com.google.devtools.build.lib.analysis.TopLevelArtifactHelper.ArtifactsInOutputGroup;
Expand Down Expand Up @@ -118,6 +120,17 @@ public CompletionContext getCompletionContext() {
return completionContext;
}

public Iterable<Artifact> getLegacyFilteredImportantArtifacts() {
NestedSetBuilder<Artifact> builder = NestedSetBuilder.stableOrder();
for (ArtifactsInOutputGroup artifactsInOutputGroup : artifactOutputGroups.values()) {
if (artifactsInOutputGroup.areImportant()) {
builder.addTransitive(artifactsInOutputGroup.getArtifacts());
}
}
// An aspect could potentially return a source artifact if it added it to its provider.
return Iterables.filter(builder.build().toList(), (artifact) -> !artifact.isSourceArtifact());
}

@Override
public BuildEventId getEventId() {
return BuildEventIdUtil.aspectCompleted(
Expand Down

0 comments on commit 7a4416f

Please sign in to comment.