Show configured targets summary during analysis phase.
Developers like to know what's going on when they are building their targets. Currently, especially when building complex targets, there is no update shown on the command line during the analysis phase when all packages are loaded and targets are still being configured. Add the number of configured targets after the number of loaded packages to show the developer what's happening during that time.
RELNOTES: Add number of configured targets to analysis phase status output.
PiperOrigin-RevId: 213786479
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
index f88f7b6..87763a2 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
@@ -129,6 +129,7 @@
private final RuleClassProvider ruleClassProvider;
private final Semaphore cpuBoundSemaphore;
private final BuildOptions defaultBuildOptions;
+ @Nullable private final ConfiguredTargetProgressReceiver configuredTargetProgress;
/**
* Indicates whether the set of packages transitively loaded for a given {@link
* ConfiguredTargetValue} will be needed for package root resolution later in the build. If not,
@@ -144,7 +145,8 @@
Semaphore cpuBoundSemaphore,
boolean storeTransitivePackagesForPackageRootResolution,
boolean shouldUnblockCpuWorkWhenFetchingDeps,
- BuildOptions defaultBuildOptions) {
+ BuildOptions defaultBuildOptions,
+ @Nullable ConfiguredTargetProgressReceiver configuredTargetProgress) {
this.buildViewProvider = buildViewProvider;
this.ruleClassProvider = ruleClassProvider;
this.cpuBoundSemaphore = cpuBoundSemaphore;
@@ -152,6 +154,7 @@
storeTransitivePackagesForPackageRootResolution;
this.shouldUnblockCpuWorkWhenFetchingDeps = shouldUnblockCpuWorkWhenFetchingDeps;
this.defaultBuildOptions = defaultBuildOptions;
+ this.configuredTargetProgress = configuredTargetProgress;
}
@Override
@@ -329,6 +332,9 @@
configConditions,
toolchainContext,
transitivePackagesForPackageRootResolution);
+ if (configuredTargetProgress != null) {
+ configuredTargetProgress.doneConfigureTarget();
+ }
return ans;
} catch (DependencyEvaluationException e) {
if (e.getCause() instanceof ConfiguredValueCreationException) {