From 41f1eeef91216a9e89a146bbed6240a1f7b67551 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Tue, 1 Aug 2023 22:28:16 +0000 Subject: [PATCH] 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 --- bp2build/build_conversion.go | 2 ++ 1 file changed, 2 insertions(+) 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),