From c1654ab8d5728168166a7fc271d05762ef3b39dd Mon Sep 17 00:00:00 2001 From: Manjari Akella Date: Fri, 22 Sep 2023 14:04:18 -0700 Subject: [PATCH] Migrate github.com/golang/mock to github.com/uber-go/mock --- MODULE.bazel | 2 +- docs/go/core/bzlmod.md | 2 +- docs/go/extras/extras.bzl | 4 +- docs/go/extras/extras.md | 18 ++-- extras/gomock.bzl | 14 +-- extras/gomock/BUILD.bazel | 6 +- go.mod | 2 +- go/private/repositories.bzl | 16 ++-- tests/extras/gomock/BUILD.bazel | 2 +- ...e.patch => org_uber_go_mock-gazelle.patch} | 96 +++++++++---------- 10 files changed, 80 insertions(+), 82 deletions(-) rename third_party/{com_github_golang_mock-gazelle.patch => org_uber_go_mock-gazelle.patch} (89%) diff --git a/MODULE.bazel b/MODULE.bazel index d4aef07cee..6dcbaa8ad3 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -38,10 +38,10 @@ go_deps.module( use_repo( go_deps, "com_github_gogo_protobuf", - "com_github_golang_mock", "com_github_golang_protobuf", "org_golang_google_genproto", "org_golang_google_grpc", "org_golang_google_protobuf", "org_golang_x_net", + "org_uber_go_mock", ) diff --git a/docs/go/core/bzlmod.md b/docs/go/core/bzlmod.md index 780f32d5c5..0982347508 100644 --- a/docs/go/core/bzlmod.md +++ b/docs/go/core/bzlmod.md @@ -112,9 +112,9 @@ go_deps.from_file(go_mod = "//:go.mod") use_repo( go_deps, "com_github_gogo_protobuf", - "com_github_golang_mock", "com_github_golang_protobuf", "org_golang_x_net", + "org_uber_go_mock", ) ``` diff --git a/docs/go/extras/extras.bzl b/docs/go/extras/extras.bzl index 3ebe466626..80c0d052e6 100644 --- a/docs/go/extras/extras.bzl +++ b/docs/go/extras/extras.bzl @@ -1,6 +1,6 @@ """ [gazelle rule]: https://github.com/bazelbuild/bazel-gazelle#bazel-rule - [golang/mock]: https://github.com/golang/mock + [uber-go/mock]: https://github.com/uber-go/mock [core go rules]: /docs/go/core/rules.md # Extra rules @@ -14,7 +14,7 @@ to make life a little easier. ## Additional resources - [gazelle rule] -- [golang/mock] +- [uber-go/mock] - [core go rules] ------------------------------------------------------------------------ diff --git a/docs/go/extras/extras.md b/docs/go/extras/extras.md index b66a4dcbd2..821420d52f 100644 --- a/docs/go/extras/extras.md +++ b/docs/go/extras/extras.md @@ -2,7 +2,7 @@ [gazelle rule]: https://github.com/bazelbuild/bazel-gazelle#bazel-rule - [golang/mock]: https://github.com/golang/mock + [uber-go/mock]: https://github.com/uber-go/mock [core go rules]: /docs/go/core/rules.md # Extra rules @@ -16,7 +16,7 @@ to make life a little easier. ## Additional resources - [gazelle rule] -- [golang/mock] +- [uber-go/mock] - [core go rules] ------------------------------------------------------------------------ @@ -37,7 +37,7 @@ gomock(name, library, < imports, copyright_file, mock_names, kwargs) -Calls [mockgen](https://github.com/golang/mock) to generates a Go file containing mocks from the given library. +Calls [mockgen](https://github.com/uber-go/mock) to generates a Go file containing mocks from the given library. If `source` is given, the mocks are generated in source mode; otherwise in reflective mode. @@ -52,13 +52,13 @@ If `source` is given, the mocks are generated in source mode; otherwise in refle | out | the output Go file name. | none | | source | a Go file in the given library. If this is given, gomock will call mockgen in source mode to mock all interfaces in the file. | None | | interfaces | a list of interfaces in the given library to be mocked in reflective mode. | [] | -| package | the name of the package the generated mocks should be in. If not specified, uses mockgen's default. See [mockgen's -package](https://github.com/golang/mock#flags) for more information. | "" | -| self_package | the full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. See [mockgen's -self_package](https://github.com/golang/mock#flags) for more information. | "" | -| aux_files | a map from source files to their package path. This only needed when source is provided. See [mockgen's -aux_files](https://github.com/golang/mock#flags) for more information. | {} | +| package | the name of the package the generated mocks should be in. If not specified, uses mockgen's default. See [mockgen's -package](https://github.com/uber-go/mock#flags) for more information. | "" | +| self_package | the full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. See [mockgen's -self_package](https://github.com/uber-go/mock#flags) for more information. | "" | +| aux_files | a map from source files to their package path. This only needed when source is provided. See [mockgen's -aux_files](https://github.com/uber-go/mock#flags) for more information. | {} | | mockgen_tool | the mockgen tool to run. | Label("//extras/gomock:mockgen") | -| imports | dictionary of name-path pairs of explicit imports to use. See [mockgen's -imports](https://github.com/golang/mock#flags) for more information. | {} | -| copyright_file | optional file containing copyright to prepend to the generated contents. See [mockgen's -copyright_file](https://github.com/golang/mock#flags) for more information. | None | -| mock_names | dictionary of interface name to mock name pairs to change the output names of the mock objects. Mock names default to 'Mock' prepended to the name of the interface. See [mockgen's -mock_names](https://github.com/golang/mock#flags) for more information. | {} | +| imports | dictionary of name-path pairs of explicit imports to use. See [mockgen's -imports](https://github.com/uber-go/mock#flags) for more information. | {} | +| copyright_file | optional file containing copyright to prepend to the generated contents. See [mockgen's -copyright_file](https://github.com/uber-go/mock#flags) for more information. | None | +| mock_names | dictionary of interface name to mock name pairs to change the output names of the mock objects. Mock names default to 'Mock' prepended to the name of the interface. See [mockgen's -mock_names](https://github.com/uber-go/mock#flags) for more information. | {} | | kwargs |

-

| none | diff --git a/extras/gomock.bzl b/extras/gomock.bzl index 72fbaabc2f..be931869d0 100644 --- a/extras/gomock.bzl +++ b/extras/gomock.bzl @@ -151,7 +151,7 @@ _gomock_source = rule( ) def gomock(name, library, out, source = None, interfaces = [], package = "", self_package = "", aux_files = {}, mockgen_tool = _MOCKGEN_TOOL, imports = {}, copyright_file = None, mock_names = {}, **kwargs): - """Calls [mockgen](https://github.com/golang/mock) to generates a Go file containing mocks from the given library. + """Calls [mockgen](https://github.com/uber-go/mock) to generates a Go file containing mocks from the given library. If `source` is given, the mocks are generated in source mode; otherwise in reflective mode. @@ -161,13 +161,13 @@ def gomock(name, library, out, source = None, interfaces = [], package = "", sel out: the output Go file name. source: a Go file in the given `library`. If this is given, `gomock` will call mockgen in source mode to mock all interfaces in the file. interfaces: a list of interfaces in the given `library` to be mocked in reflective mode. - package: the name of the package the generated mocks should be in. If not specified, uses mockgen's default. See [mockgen's -package](https://github.com/golang/mock#flags) for more information. - self_package: the full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. See [mockgen's -self_package](https://github.com/golang/mock#flags) for more information. - aux_files: a map from source files to their package path. This only needed when `source` is provided. See [mockgen's -aux_files](https://github.com/golang/mock#flags) for more information. + package: the name of the package the generated mocks should be in. If not specified, uses mockgen's default. See [mockgen's -package](https://github.com/uber-go/mock#flags) for more information. + self_package: the full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. See [mockgen's -self_package](https://github.com/uber-go/mock#flags) for more information. + aux_files: a map from source files to their package path. This only needed when `source` is provided. See [mockgen's -aux_files](https://github.com/uber-go/mock#flags) for more information. mockgen_tool: the mockgen tool to run. - imports: dictionary of name-path pairs of explicit imports to use. See [mockgen's -imports](https://github.com/golang/mock#flags) for more information. - copyright_file: optional file containing copyright to prepend to the generated contents. See [mockgen's -copyright_file](https://github.com/golang/mock#flags) for more information. - mock_names: dictionary of interface name to mock name pairs to change the output names of the mock objects. Mock names default to 'Mock' prepended to the name of the interface. See [mockgen's -mock_names](https://github.com/golang/mock#flags) for more information. + imports: dictionary of name-path pairs of explicit imports to use. See [mockgen's -imports](https://github.com/uber-go/mock#flags) for more information. + copyright_file: optional file containing copyright to prepend to the generated contents. See [mockgen's -copyright_file](https://github.com/uber-go/mock#flags) for more information. + mock_names: dictionary of interface name to mock name pairs to change the output names of the mock objects. Mock names default to 'Mock' prepended to the name of the interface. See [mockgen's -mock_names](https://github.com/uber-go/mock#flags) for more information. kwargs: common attributes](https://bazel.build/reference/be/common-definitions#common-attributes) to all Bazel rules. """ if source: diff --git a/extras/gomock/BUILD.bazel b/extras/gomock/BUILD.bazel index 5eb1e0879b..3531d4487a 100644 --- a/extras/gomock/BUILD.bazel +++ b/extras/gomock/BUILD.bazel @@ -1,17 +1,17 @@ alias( name = "gomock", - actual = "@com_github_golang_mock//gomock", + actual = "@org_uber_go_mock//gomock", visibility = ["//visibility:public"], ) alias( name = "mockgen", - actual = "@com_github_golang_mock//mockgen", + actual = "@org_uber_go_mock//mockgen", visibility = ["//visibility:public"], ) alias( name = "mockgen_model", - actual = "@com_github_golang_mock//mockgen/model", + actual = "@org_uber_go_mock//mockgen/model", visibility = ["//visibility:public"], ) diff --git a/go.mod b/go.mod index 8b81c68bbb..1d67803ee2 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/bazelbuild/rules_go go 1.18 require ( - github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 google.golang.org/protobuf v1.28.0 + go.uber.org/mock v0.3.0 ) require ( diff --git a/go/private/repositories.bzl b/go/private/repositories.bzl index dc16e06c1f..5f73fe991b 100644 --- a/go/private/repositories.bzl +++ b/go/private/repositories.bzl @@ -256,22 +256,20 @@ def go_rules_dependencies(force = False): patch_args = ["-p1"], ) - # releaser:upgrade-dep golang mock + # go.uber.org/mock dependency _maybe( http_archive, - name = "com_github_golang_mock", - # v1.7.0-rc.1, latest as of 2023-06-08 + name = "org_uber_go_mock", + # 0.3.0 latest as of 2023-09-20 urls = [ - "https://mirror.bazel.build/github.com/golang/mock/archive/refs/tags/v1.7.0-rc.1.zip", - "https://github.com/golang/mock/archive/refs/tags/v1.7.0-rc.1.zip", + "https://github.com/uber-go/mock/archive/refs/tags/v0.3.0.zip", ], patches = [ - # releaser:patch-cmd gazelle -repo_root . -go_prefix github.com/golang/mock -go_naming_convention import_alias - Label("//third_party:com_github_golang_mock-gazelle.patch"), + Label("//third_party:org_uber_go_mock-gazelle.patch"), ], patch_args = ["-p1"], - sha256 = "5359c78b0c1649cf7beb3b48ff8b1d1aaf0243b22ea4789aba94805280075d8e", - strip_prefix = "mock-1.7.0-rc.1", + sha256 = "d20bfd623dfb4e2fa1cdac617cde142f72f53285894c137c7911fc1afce0de7c", + strip_prefix = "mock-0.3.0", ) # This may be overridden by go_register_toolchains, but it's not mandatory diff --git a/tests/extras/gomock/BUILD.bazel b/tests/extras/gomock/BUILD.bazel index c6948bf750..b9a07ca05b 100644 --- a/tests/extras/gomock/BUILD.bazel +++ b/tests/extras/gomock/BUILD.bazel @@ -29,5 +29,5 @@ go_test( "client_test.go", ], embed = [":client"], - deps = ["@com_github_golang_mock//gomock"], + deps = ["@org_uber_go_mock//gomock"], ) diff --git a/third_party/com_github_golang_mock-gazelle.patch b/third_party/org_uber_go_mock-gazelle.patch similarity index 89% rename from third_party/com_github_golang_mock-gazelle.patch rename to third_party/org_uber_go_mock-gazelle.patch index ac6576d533..ab06b17d49 100644 --- a/third_party/com_github_golang_mock-gazelle.patch +++ b/third_party/org_uber_go_mock-gazelle.patch @@ -13,7 +13,7 @@ diff -urN a/gomock/BUILD.bazel b/gomock/BUILD.bazel + "doc.go", + "matchers.go", + ], -+ importpath = "github.com/golang/mock/gomock", ++ importpath = "go.uber.org/mock/gomock", + visibility = ["//visibility:public"], +) + @@ -45,7 +45,7 @@ diff -urN a/gomock/internal/mock_gomock/BUILD.bazel b/gomock/internal/mock_gomoc +go_library( + name = "mock_gomock", + srcs = ["mock_matcher.go"], -+ importpath = "github.com/golang/mock/gomock/internal/mock_gomock", ++ importpath = "go.uber.org/mock/gomock/internal/mock_gomock", + visibility = ["//gomock:__subpackages__"], + deps = ["//gomock"], +) @@ -71,7 +71,7 @@ diff -urN a/mockgen/BUILD.bazel b/mockgen/BUILD.bazel + "reflect.go", + "version.go", + ], -+ importpath = "github.com/golang/mock/mockgen", ++ importpath = "go.uber.org/mock/mockgen", + visibility = ["//visibility:private"], + deps = [ + "//mockgen/model", @@ -107,7 +107,7 @@ diff -urN a/mockgen/internal/tests/aux_imports_embedded_interface/BUILD.bazel b/ + "bugreport.go", + "bugreport_mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/aux_imports_embedded_interface", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/aux_imports_embedded_interface", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -136,7 +136,7 @@ diff -urN a/mockgen/internal/tests/aux_imports_embedded_interface/faux/BUILD.baz +go_library( + name = "faux", + srcs = ["faux.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/aux_imports_embedded_interface/faux", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/aux_imports_embedded_interface/faux", + visibility = ["//mockgen:__subpackages__"], +) + @@ -157,7 +157,7 @@ diff -urN a/mockgen/internal/tests/const_array_length/BUILD.bazel b/mockgen/inte + "input.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/const_array_length", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/const_array_length", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -179,7 +179,7 @@ diff -urN a/mockgen/internal/tests/copyright_file/BUILD.bazel b/mockgen/internal + "input.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/copyright_file", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/copyright_file", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -198,7 +198,7 @@ diff -urN a/mockgen/internal/tests/custom_package_name/client/v1/BUILD.bazel b/m +go_library( + name = "client", + srcs = ["client.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/custom_package_name/client/v1", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/custom_package_name/client/v1", + visibility = ["//mockgen:__subpackages__"], +) + @@ -216,7 +216,7 @@ diff -urN a/mockgen/internal/tests/custom_package_name/greeter/BUILD.bazel b/moc +go_library( + name = "greeter", + srcs = ["greeter.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/custom_package_name/greeter", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/custom_package_name/greeter", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//mockgen/internal/tests/custom_package_name/client/v1:client", @@ -251,7 +251,7 @@ diff -urN a/mockgen/internal/tests/custom_package_name/validator/BUILD.bazel b/m +go_library( + name = "validator", + srcs = ["validate.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/custom_package_name/validator", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/custom_package_name/validator", + visibility = ["//mockgen:__subpackages__"], +) + @@ -272,7 +272,7 @@ diff -urN a/mockgen/internal/tests/dot_imports/BUILD.bazel b/mockgen/internal/te + "input.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/dot_imports", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/dot_imports", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -294,7 +294,7 @@ diff -urN a/mockgen/internal/tests/empty_interface/BUILD.bazel b/mockgen/interna + "input.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/empty_interface", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/empty_interface", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -316,7 +316,7 @@ diff -urN a/mockgen/internal/tests/extra_import/BUILD.bazel b/mockgen/internal/t + "import.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/extra_import", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/extra_import", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -338,7 +338,7 @@ diff -urN a/mockgen/internal/tests/generated_identifier_conflict/BUILD.bazel b/m + "bugreport.go", + "bugreport_mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/generated_identifier_conflict", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/generated_identifier_conflict", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -367,7 +367,7 @@ diff -urN a/mockgen/internal/tests/generics/BUILD.bazel b/mockgen/internal/tests + "external.go", + "generics.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/generics", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/generics", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//mockgen/internal/tests/generics/other", @@ -389,7 +389,7 @@ diff -urN a/mockgen/internal/tests/generics/other/BUILD.bazel b/mockgen/internal +go_library( + name = "other", + srcs = ["other.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/generics/other", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/generics/other", + visibility = ["//mockgen:__subpackages__"], +) + @@ -432,7 +432,7 @@ diff -urN a/mockgen/internal/tests/import_embedded_interface/BUILD.bazel b/mockg + "net.go", + "net_mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_embedded_interface", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_embedded_interface", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -466,7 +466,7 @@ diff -urN a/mockgen/internal/tests/import_embedded_interface/ersatz/BUILD.bazel +go_library( + name = "ersatz", + srcs = ["ersatz.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_embedded_interface/ersatz", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_embedded_interface/ersatz", + visibility = ["//mockgen:__subpackages__"], +) + @@ -487,7 +487,7 @@ diff -urN a/mockgen/internal/tests/import_embedded_interface/faux/BUILD.bazel b/ + "conflict.go", + "faux.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_embedded_interface/faux", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_embedded_interface/faux", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//mockgen/internal/tests/import_embedded_interface/other/ersatz", @@ -509,7 +509,7 @@ diff -urN a/mockgen/internal/tests/import_embedded_interface/other/ersatz/BUILD. +go_library( + name = "ersatz", + srcs = ["ersatz.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_embedded_interface/other/ersatz", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_embedded_interface/other/ersatz", + visibility = ["//mockgen:__subpackages__"], +) + @@ -527,7 +527,7 @@ diff -urN a/mockgen/internal/tests/import_embedded_interface/other/log/BUILD.baz +go_library( + name = "log", + srcs = ["log.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_embedded_interface/other/log", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_embedded_interface/other/log", + visibility = ["//mockgen:__subpackages__"], +) + @@ -545,7 +545,7 @@ diff -urN a/mockgen/internal/tests/import_source/BUILD.bazel b/mockgen/internal/ +go_library( + name = "import_source", + srcs = ["source_mock.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_source", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_source", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -570,7 +570,7 @@ diff -urN a/mockgen/internal/tests/import_source/definition/BUILD.bazel b/mockge + "source.go", + "source_mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/import_source/definition", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/import_source/definition", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -589,7 +589,7 @@ diff -urN a/mockgen/internal/tests/internal_pkg/BUILD.bazel b/mockgen/internal/t +go_library( + name = "internal_pkg", + srcs = ["generate.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/internal_pkg", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/internal_pkg", + visibility = ["//mockgen:__subpackages__"], +) + @@ -607,7 +607,7 @@ diff -urN a/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/BUILD.bazel +go_library( + name = "pkg", + srcs = ["input.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg", + visibility = ["//mockgen:__subpackages__"], +) + @@ -625,7 +625,7 @@ diff -urN a/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/reflect_outp +go_library( + name = "reflect_output", + srcs = ["mock.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/reflect_output", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/reflect_output", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -647,7 +647,7 @@ diff -urN a/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/source_outpu +go_library( + name = "source_output", + srcs = ["mock.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/source_output", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/internal_pkg/subdir/internal/pkg/source_output", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -669,7 +669,7 @@ diff -urN a/mockgen/internal/tests/missing_import/output/BUILD.bazel b/mockgen/i +go_library( + name = "output", + srcs = ["source_mock.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/missing_import/output", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/missing_import/output", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -691,7 +691,7 @@ diff -urN a/mockgen/internal/tests/missing_import/source/BUILD.bazel b/mockgen/i +go_library( + name = "source", + srcs = ["source.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/missing_import/source", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/missing_import/source", + visibility = ["//mockgen:__subpackages__"], +) + @@ -709,7 +709,7 @@ diff -urN a/mockgen/internal/tests/mock_in_test_package/BUILD.bazel b/mockgen/in +go_library( + name = "mock_in_test_package", + srcs = ["user.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/mock_in_test_package", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/mock_in_test_package", + visibility = ["//mockgen:__subpackages__"], +) + @@ -740,7 +740,7 @@ diff -urN a/mockgen/internal/tests/overlapping_methods/BUILD.bazel b/mockgen/int + "mock.go", + "overlap.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/overlapping_methods", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/overlapping_methods", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -766,7 +766,7 @@ diff -urN a/mockgen/internal/tests/panicing_test/BUILD.bazel b/mockgen/internal/ +go_library( + name = "panicing_test", + srcs = ["panic.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/panicing_test", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/panicing_test", + visibility = ["//mockgen:__subpackages__"], +) + @@ -794,7 +794,7 @@ diff -urN a/mockgen/internal/tests/parenthesized_parameter_type/BUILD.bazel b/mo + "input.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/parenthesized_parameter_type", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/parenthesized_parameter_type", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -813,7 +813,7 @@ diff -urN a/mockgen/internal/tests/performance/big_interface/BUILD.bazel b/mockg +go_library( + name = "big_interface", + srcs = ["big_interface.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/performance/big_interface", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/performance/big_interface", + visibility = ["//mockgen:__subpackages__"], +) + @@ -834,7 +834,7 @@ diff -urN a/mockgen/internal/tests/self_package/BUILD.bazel b/mockgen/internal/t + "mock.go", + "types.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/self_package", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/self_package", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -853,7 +853,7 @@ diff -urN a/mockgen/internal/tests/test_package/BUILD.bazel b/mockgen/internal/t +go_library( + name = "test_package", + srcs = ["foo.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/test_package", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/test_package", + visibility = ["//mockgen:__subpackages__"], +) + @@ -883,7 +883,7 @@ diff -urN a/mockgen/internal/tests/unexported_method/BUILD.bazel b/mockgen/inter + "bugreport.go", + "bugreport_mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/unexported_method", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/unexported_method", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -913,7 +913,7 @@ diff -urN a/mockgen/internal/tests/vendor_dep/BUILD.bazel b/mockgen/internal/tes + "mock.go", + "vendor_dep.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/vendor_dep", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/vendor_dep", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -935,7 +935,7 @@ diff -urN a/mockgen/internal/tests/vendor_dep/source_mock_package/BUILD.bazel b/ +go_library( + name = "source_mock_package", + srcs = ["mock.go"], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/vendor_dep/source_mock_package", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/vendor_dep/source_mock_package", + visibility = ["//mockgen:__subpackages__"], + deps = [ + "//gomock", @@ -960,7 +960,7 @@ diff -urN a/mockgen/internal/tests/vendor_pkg/BUILD.bazel b/mockgen/internal/tes + "doc.go", + "mock.go", + ], -+ importpath = "github.com/golang/mock/mockgen/internal/tests/vendor_pkg", ++ importpath = "go.uber.org/mock/mockgen/internal/tests/vendor_pkg", + visibility = ["//mockgen:__subpackages__"], + deps = ["//gomock"], +) @@ -979,7 +979,7 @@ diff -urN a/mockgen/model/BUILD.bazel b/mockgen/model/BUILD.bazel +go_library( + name = "model", + srcs = ["model.go"], -+ importpath = "github.com/golang/mock/mockgen/model", ++ importpath = "go.uber.org/mock/mockgen/model", + visibility = ["//visibility:public"], +) + @@ -1003,7 +1003,7 @@ diff -urN a/sample/BUILD.bazel b/sample/BUILD.bazel +go_library( + name = "sample", + srcs = ["user.go"], -+ importpath = "github.com/golang/mock/sample", ++ importpath = "go.uber.org/mock/sample", + visibility = ["//visibility:public"], + deps = [ + "//sample/imp1", @@ -1043,7 +1043,7 @@ diff -urN a/sample/concurrent/BUILD.bazel b/sample/concurrent/BUILD.bazel +go_library( + name = "concurrent", + srcs = ["concurrent.go"], -+ importpath = "github.com/golang/mock/sample/concurrent", ++ importpath = "go.uber.org/mock/sample/concurrent", + visibility = ["//visibility:public"], +) + @@ -1071,7 +1071,7 @@ diff -urN a/sample/concurrent/mock/BUILD.bazel b/sample/concurrent/mock/BUILD.ba +go_library( + name = "mock", + srcs = ["concurrent_mock.go"], -+ importpath = "github.com/golang/mock/sample/concurrent/mock", ++ importpath = "go.uber.org/mock/sample/concurrent/mock", + visibility = ["//visibility:public"], + deps = ["//gomock"], +) @@ -1090,7 +1090,7 @@ diff -urN a/sample/imp1/BUILD.bazel b/sample/imp1/BUILD.bazel +go_library( + name = "imp1", + srcs = ["imp1.go"], -+ importpath = "github.com/golang/mock/sample/imp1", ++ importpath = "go.uber.org/mock/sample/imp1", + visibility = ["//visibility:public"], +) + @@ -1108,7 +1108,7 @@ diff -urN a/sample/imp2/BUILD.bazel b/sample/imp2/BUILD.bazel +go_library( + name = "imp2", + srcs = ["imp2.go"], -+ importpath = "github.com/golang/mock/sample/imp2", ++ importpath = "go.uber.org/mock/sample/imp2", + visibility = ["//visibility:public"], +) + @@ -1126,7 +1126,7 @@ diff -urN a/sample/imp3/BUILD.bazel b/sample/imp3/BUILD.bazel +go_library( + name = "imp3", + srcs = ["imp3.go"], -+ importpath = "github.com/golang/mock/sample/imp3", ++ importpath = "go.uber.org/mock/sample/imp3", + visibility = ["//visibility:public"], +) + @@ -1144,7 +1144,7 @@ diff -urN a/sample/imp4/BUILD.bazel b/sample/imp4/BUILD.bazel +go_library( + name = "imp4", + srcs = ["imp4.go"], -+ importpath = "github.com/golang/mock/sample/imp4", ++ importpath = "go.uber.org/mock/sample/imp4", + visibility = ["//visibility:public"], +) +