diff --git a/proto/def.bzl b/proto/def.bzl index 80ba9d5546..0aa7120165 100644 --- a/proto/def.bzl +++ b/proto/def.bzl @@ -152,7 +152,6 @@ go_proto_library = go_rule( ), "importpath": attr.string(), "importmap": attr.string(), - "importpath_aliases": attr.string_list(), # experimental, undocumented "embed": attr.label_list(providers = [GoLibrary]), "gc_goopts": attr.string_list(), "compiler": attr.label(providers = [GoProtoCompiler]), diff --git a/tests/core/go_proto_library/BUILD.bazel b/tests/core/go_proto_library/BUILD.bazel index c0f1597b8a..d55ba5dab6 100644 --- a/tests/core/go_proto_library/BUILD.bazel +++ b/tests/core/go_proto_library/BUILD.bazel @@ -117,16 +117,9 @@ go_test( deps = [":protos_go_proto"], ) -go_test( - name = "protos_alias_test", - srcs = ["protos_alias_test.go"], - deps = [":protos_go_proto"], -) - go_proto_library( name = "protos_go_proto", importpath = "github.com/bazelbuild/rules_go/tests/core/go_proto_library/protos", - importpath_aliases = ["myalias/protos"], protos = [ ":protos_a_proto", ":protos_b_proto", diff --git a/tests/core/go_proto_library/README.rst b/tests/core/go_proto_library/README.rst index 1a5b039d3b..4caa7ccd2c 100644 --- a/tests/core/go_proto_library/README.rst +++ b/tests/core/go_proto_library/README.rst @@ -53,9 +53,3 @@ wkt_wrapper_test Checks that most of the well known types in ``//proto/wkt`` are wrappers for packages in ``@org_golang_google_protobuf``. The proto types should be type aliases. - -protos_alias_test ------------------ - -Checks that packages generated by `go_proto_library` can be imported using one of the strings -listed in ``importpath_aliases``. diff --git a/tests/core/go_proto_library/protos_alias_test.go b/tests/core/go_proto_library/protos_alias_test.go deleted file mode 100644 index 1761276522..0000000000 --- a/tests/core/go_proto_library/protos_alias_test.go +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 The Bazel Authors. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protos_alias_test - -import ( - "myalias/protos" // importing based on the alias import path - "testing" -) - -func use(interface{}) {} - -func TestProtos(t *testing.T) { - // just make sure both types exist - use(protos.A{}) - use(protos.B{}) -}