Respect package boundaries in bp2build conversion of go modules
bp2build's codegen context does not implement BazelPathConversionContext. To reuse the utility function transformPackagePaths, update its signature (Also make deps of go_library unique to make the conversion resilient) Test: go test ./bp2build Change-Id: I126b1057d2b26bc6c7d3be2780f1b62d28323cf0
This commit is contained in:
@@ -175,7 +175,7 @@ func TestTransformSubpackagePath(t *testing.T) {
|
||||
"./z/b.c": "z/b.c",
|
||||
}
|
||||
for in, out := range pairs {
|
||||
actual := transformSubpackagePath(ctx, bazel.Label{Label: in}).Label
|
||||
actual := transformSubpackagePath(ctx.Config(), ctx.ModuleDir(), bazel.Label{Label: in}).Label
|
||||
if actual != out {
|
||||
t.Errorf("expected:\n%v\nactual:\n%v", out, actual)
|
||||
}
|
||||
|
Reference in New Issue
Block a user