Special-case go modules in convertedToBazel
This function is called in getOtherModuleLabel, and is used to mark the
otherModule as an unconvertedDep. This meant that if a soong module `A`
depends on soong_zip, it would add soong_zip as unconverted dep of `A`.
All go modules have been converted in bp2build, so this CL special
cases go_package and go_binary in this function.
Bug: 294098662
Test: printf metrics in build_conversion.go# GenerateBazelTargets, and
made sure that the string "has unconverted.*soong_zip" does not appear
Change-Id: I8d1d0876c581f9b2eb72dafcb3a28bd5577bbb4c
diff --git a/android/bazel_paths.go b/android/bazel_paths.go
index 8956a18..53511fc 100644
--- a/android/bazel_paths.go
+++ b/android/bazel_paths.go
@@ -430,7 +430,7 @@
func BazelModuleLabel(ctx BazelConversionPathContext, module blueprint.Module) string {
// TODO(b/165114590): Convert tag (":name{.tag}") to corresponding Bazel implicit output targets.
- if !convertedToBazel(ctx, module) {
+ if !convertedToBazel(ctx, module) || isGoModule(module) {
return bp2buildModuleLabel(ctx, module)
}
b, _ := module.(Bazelable)