Merge "bp2build: add allowlist for package-level conversions."

This commit is contained in:
Jingwen Chen
2021-03-24 21:38:07 +00:00
committed by Gerrit Code Review
20 changed files with 409 additions and 57 deletions

View File

@@ -340,6 +340,7 @@ type BazelConversionPathContext interface {
GetDirectDep(name string) (blueprint.Module, blueprint.DependencyTag)
Module() Module
ModuleType() string
OtherModuleName(m blueprint.Module) string
OtherModuleDir(m blueprint.Module) string
}
@@ -450,7 +451,7 @@ func bazelModuleLabel(ctx BazelConversionPathContext, module blueprint.Module, t
// TODO(b/165114590): Convert tag (":name{.tag}") to corresponding Bazel implicit output targets.
b, ok := module.(Bazelable)
// TODO(b/181155349): perhaps return an error here if the module can't be/isn't being converted
if !ok || !b.ConvertedToBazel() {
if !ok || !b.ConvertedToBazel(ctx) {
return bp2buildModuleLabel(ctx, module)
}
return b.GetBazelLabel(ctx, module)