diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel index 95680e8e..8dd24af1 100644 --- a/driver/BUILD.bazel +++ b/driver/BUILD.bazel @@ -10,7 +10,7 @@ go_library( "//cli", "//pkg", "//third_party/protobuf/bazel/analysis", - "@bazel_gazelle//label:go_default_library", + "@com_github_bazelbuild_bazel_gazelle//label", ], ) diff --git a/pkg/BUILD.bazel b/pkg/BUILD.bazel index ab729807..34011236 100644 --- a/pkg/BUILD.bazel +++ b/pkg/BUILD.bazel @@ -17,8 +17,8 @@ go_library( "//common/sorted_set", "//third_party/protobuf/bazel/analysis", "//third_party/protobuf/bazel/build", - "@bazel_gazelle//label:go_default_library", "@com_github_aristanetworks_goarista//path", + "@com_github_bazelbuild_bazel_gazelle//label", "@com_github_wi2l_jsondiff//:jsondiff", "@org_golang_google_protobuf//encoding/protojson", "@org_golang_google_protobuf//proto", @@ -38,7 +38,7 @@ go_test( "//common", "//third_party/protobuf/bazel/analysis", "//third_party/protobuf/bazel/build", - "@bazel_gazelle//label:go_default_library", + "@com_github_bazelbuild_bazel_gazelle//label", "@com_github_otiai10_copy//:copy", "@org_golang_google_protobuf//proto", ], diff --git a/pkg/target_determinator_test.go b/pkg/target_determinator_test.go index 374c6cbe..6f5e9b2f 100644 --- a/pkg/target_determinator_test.go +++ b/pkg/target_determinator_test.go @@ -82,3 +82,19 @@ func Test_stringSliceContainsStartingWith(t *testing.T) { }) } } + +func Test_ParseCanonicalLabel(t *testing.T) { + for _, tt := range []string{ + "@//label", + "@//label:package", + "//label:package", + "label:package", + ":package", + "@rules_python~0.21.0~pip~pip_boto3//:pkg", + } { + _, err := ParseCanonicalLabel(tt) + if err != nil { + t.Errorf("ParseCanonicalLabel() with (label=%s) produces error %s", tt, err) + } + } +} diff --git a/target-determinator/BUILD.bazel b/target-determinator/BUILD.bazel index c4f944f7..ef2c56cb 100644 --- a/target-determinator/BUILD.bazel +++ b/target-determinator/BUILD.bazel @@ -10,7 +10,7 @@ go_library( "//cli", "//pkg", "//third_party/protobuf/bazel/analysis", - "@bazel_gazelle//label:go_default_library", + "@com_github_bazelbuild_bazel_gazelle//label", ], )