use of com.google.idea.blaze.base.model.primitives.TargetExpression in project intellij by bazelbuild.
the class WildcardTargetExpander method doExpandToSingleTargets.
private static ExpandedTargetsResult doExpandToSingleTargets(Project project, BlazeContext context, WorkspaceRoot workspaceRoot, ProjectViewSet projectViewSet, List<TargetExpression> allTargets) {
ShardedTargetList shards = BlazeBuildTargetSharder.shardTargets(allTargets, BlazeBuildTargetSharder.PACKAGE_SHARD_SIZE);
ImmutableSet<String> handledRuleTypes = handledRuleTypes(projectViewSet);
ExpandedTargetsResult output = null;
for (int i = 0; i < shards.shardedTargets.size(); i++) {
List<TargetExpression> shard = shards.shardedTargets.get(i);
context.output(new StatusOutput(String.format("Expanding wildcard target patterns, shard %s of %s", i + 1, shards.shardedTargets.size())));
ExpandedTargetsResult result = queryIndividualTargets(project, context, workspaceRoot, handledRuleTypes, shard);
output = output == null ? result : ExpandedTargetsResult.merge(output, result);
if (output.buildResult.status == Status.FATAL_ERROR) {
return output;
}
}
return output;
}
Aggregations