Merge "queryview: blocklist package module type."

This commit is contained in:
Jingwen Chen 2021-02-08 15:18:19 +00:00 committed by Gerrit Code Review
commit 033bfa6e29

View file

@ -173,6 +173,12 @@ func GenerateBazelTargets(ctx bpToBuildContext, codegenMode CodegenMode) map[str
}
t = generateBazelTarget(ctx, m)
case QueryView:
// Blocklist certain module types from being generated.
if canonicalizeModuleType(ctx.ModuleType(m)) == "package" {
// package module name contain slashes, and thus cannot
// be mapped cleanly to a bazel label.
return
}
t = generateSoongModuleTarget(ctx, m)
default:
panic(fmt.Errorf("Unknown code-generation mode: %s", codegenMode))