Loading android/bazel.go +2 −2 Original line number Diff line number Diff line Loading @@ -533,13 +533,13 @@ func (b *BazelModuleBase) shouldConvertWithBp2build(ctx shouldConvertModuleConte moduleTypeAllowed := allowlist.moduleTypeAlwaysConvert[p.moduleType] allowlistConvert := moduleNameAllowed || moduleTypeAllowed if moduleNameAllowed && moduleTypeAllowed { ctx.ModuleErrorf("A module cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert") ctx.ModuleErrorf("A module %q of type %q cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert", moduleName, p.moduleType) return false } if allowlist.moduleDoNotConvert[moduleName] { if moduleNameAllowed { ctx.ModuleErrorf("a module cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert") ctx.ModuleErrorf("a module %q cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert", moduleName) } return false } Loading android/bazel_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ func TestBp2BuildAllowlist(t *testing.T) { { description: "module in name allowlist and type allowlist fails", shouldConvert: false, expectedErrors: []string{"A module cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert"}, expectedErrors: []string{"A module \"foo\" of type \"rule1\" cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert"}, module: TestBazelModule{ TestModuleInfo: bazel.TestModuleInfo{ ModuleName: "foo", Loading @@ -273,7 +273,7 @@ func TestBp2BuildAllowlist(t *testing.T) { { description: "module in allowlist and denylist fails", shouldConvert: false, expectedErrors: []string{"a module cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert"}, expectedErrors: []string{"a module \"foo\" cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert"}, module: TestBazelModule{ TestModuleInfo: bazel.TestModuleInfo{ ModuleName: "foo", Loading Loading
android/bazel.go +2 −2 Original line number Diff line number Diff line Loading @@ -533,13 +533,13 @@ func (b *BazelModuleBase) shouldConvertWithBp2build(ctx shouldConvertModuleConte moduleTypeAllowed := allowlist.moduleTypeAlwaysConvert[p.moduleType] allowlistConvert := moduleNameAllowed || moduleTypeAllowed if moduleNameAllowed && moduleTypeAllowed { ctx.ModuleErrorf("A module cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert") ctx.ModuleErrorf("A module %q of type %q cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert", moduleName, p.moduleType) return false } if allowlist.moduleDoNotConvert[moduleName] { if moduleNameAllowed { ctx.ModuleErrorf("a module cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert") ctx.ModuleErrorf("a module %q cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert", moduleName) } return false } Loading
android/bazel_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ func TestBp2BuildAllowlist(t *testing.T) { { description: "module in name allowlist and type allowlist fails", shouldConvert: false, expectedErrors: []string{"A module cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert"}, expectedErrors: []string{"A module \"foo\" of type \"rule1\" cannot be in moduleAlwaysConvert and also be in moduleTypeAlwaysConvert"}, module: TestBazelModule{ TestModuleInfo: bazel.TestModuleInfo{ ModuleName: "foo", Loading @@ -273,7 +273,7 @@ func TestBp2BuildAllowlist(t *testing.T) { { description: "module in allowlist and denylist fails", shouldConvert: false, expectedErrors: []string{"a module cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert"}, expectedErrors: []string{"a module \"foo\" cannot be in moduleDoNotConvert and also be in moduleAlwaysConvert"}, module: TestBazelModule{ TestModuleInfo: bazel.TestModuleInfo{ ModuleName: "foo", Loading