File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
base/src/com/google/idea/blaze/base/sync/aspects Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import static com .google .common .collect .ImmutableList .toImmutableList ;
19
19
import static com .google .common .collect .ImmutableMap .toImmutableMap ;
20
+ import static com .google .common .collect .ImmutableSet .toImmutableSet ;
20
21
21
22
import com .google .common .annotations .VisibleForTesting ;
22
23
import com .google .common .collect .ImmutableList ;
@@ -102,12 +103,17 @@ private BlazeBuildOutputs(
102
103
}
103
104
104
105
/** Returns the output artifacts generated for target with given label. */
105
- public ImmutableSet <OutputArtifact > artifactsForTarget (String label ) {
106
- return perTargetArtifacts .get (label );
106
+ public ImmutableSet <OutputArtifact > artifactsForTarget (String label , String outputGroup ) {
107
+ // TODO: solodkyy - This is slow although it is invoked at most two times.
108
+ return artifacts .values ().stream ()
109
+ .filter (a -> a .outputGroups .contains (outputGroup ) && a .topLevelTargets .contains (label ))
110
+ .map (a -> a .artifact )
111
+ .collect (toImmutableSet ());
107
112
}
108
113
109
114
@ VisibleForTesting
110
115
public ImmutableList <OutputArtifact > getOutputGroupArtifacts (String outputGroup ) {
116
+ // TODO: solodkyy - This is slow although it is invoked at most two times.
111
117
return artifacts .values ().stream ()
112
118
.filter (a -> a .outputGroups .contains (outputGroup ))
113
119
.map (a -> a .artifact )
You can’t perform that action at this time.
0 commit comments