bp2build: add converted modules to codegen metrics, and remove the
compat layer.
The list of converted modules is used for tracking bp2build progress.
The module_name_to_label aliases weren't really adding much value to
mixed builds, so let's drop the feature for now and simplify the code.
Test: CI
Test: USE_BAZEL_ANALYSIS=1 m droid
Change-Id: I3269344cfe6d1c72c108d66c6e820bc0ec19bb34
diff --git a/bp2build/metrics.go b/bp2build/metrics.go
index 645ef2d..55b928b 100644
--- a/bp2build/metrics.go
+++ b/bp2build/metrics.go
@@ -19,6 +19,8 @@
handCraftedTargetCount int
moduleWithUnconvertedDepsMsgs []string
+
+ convertedModules []string
}
// Print the codegen metrics to stdout.
@@ -37,3 +39,9 @@
len(metrics.moduleWithUnconvertedDepsMsgs),
strings.Join(metrics.moduleWithUnconvertedDepsMsgs, "\n\t"))
}
+
+func (metrics CodegenMetrics) AddConvertedModule(moduleName string) {
+ // Undo prebuilt_ module name prefix modifications
+ moduleName = android.RemoveOptionalPrebuiltPrefix(moduleName)
+ metrics.convertedModules = append(metrics.convertedModules, moduleName)
+}