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
This commit is contained in:
Spandan Das
2023-08-01 22:28:16 +00:00
parent 00d0d7af7d
commit 41f1eeef91

View File

@@ -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),