summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-08-01 22:28:16 +0000
committer Spandan Das <spandandas@google.com> 2023-08-01 22:28:16 +0000
commit41f1eeef91216a9e89a146bbed6240a1f7b67551 (patch)
tree281bfc67b5d6bea000b2154ccac87a6a89d73e11
parent00d0d7af7d8754ba88fc754862e467894ff355cc (diff)
Add go modules to bp2build progress dashboard
Since these modules have been converted, we should tag them as converted in the dashboard. Test: Put a print statement for `metrics` and made sure that the go modules appear there Bug: 294098662 Change-Id: I6282100111030a94f15f330916eaf41fcfc16e1a
-rw-r--r--bp2build/build_conversion.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bp2build/build_conversion.go b/bp2build/build_conversion.go
index 0e6596bf7..890bfd3a4 100644
--- a/bp2build/build_conversion.go
+++ b/bp2build/build_conversion.go
@@ -563,10 +563,12 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
targets, targetErrs = generateBazelTargetsGoPackage(bpCtx, glib, nameToGoLibMap)
errs = append(errs, targetErrs...)
metrics.IncrementRuleClassCount("go_library")
+ metrics.AddConvertedModule(glib, "go_library", dir)
} else if gbin, ok := m.(*bootstrap.GoBinary); ok {
targets, targetErrs = generateBazelTargetsGoBinary(bpCtx, gbin, nameToGoLibMap)
errs = append(errs, targetErrs...)
metrics.IncrementRuleClassCount("go_binary")
+ metrics.AddConvertedModule(gbin, "go_binary", dir)
} else {
metrics.AddUnconvertedModule(m, moduleType, dir, android.UnconvertedReason{
ReasonType: int(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED),