Auto-deriving targets from directories: log the raw and filtered target count
@@ -242,13 +242,20 @@ final class BuildPhaseSyncTask {
.submit(parentContext);
throw new SyncFailedException();
}
- return SourceToTargetFilteringStrategy.filterTargets(targets).stream()
+ ImmutableList<TargetExpression> retained =
+ SourceToTargetFilteringStrategy.filterTargets(targets).stream()
.filter(
t ->
t.getKind() != null
&& languageSettings.isLanguageActive(t.getKind().getLanguageClass()))
.map(t -> t.label)
.collect(toImmutableList());
+ parentContext.output(
+ PrintOutput.log(
+ String.format(
+ "%d targets found under project directories; syncing %d of them.",
+ targets.size(), retained.size())));
+ return retained;
}
private Collection<? extends TargetExpression> getWorkingSetTargets(
