From 7c32e1f43e7733b36032e0c911c87b961186a2ee Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Mon, 22 Dec 2025 14:14:43 -0700 Subject: [PATCH] Migrate importpaths to use v4 Fixes #407 --- BUILD.bazel | 2 +- README.md | 2 +- cmd/examplegen/BUILD.bazel | 2 +- cmd/gazelle/BUILD.bazel | 2 +- cmd/gazelle/README.md | 2 +- cmd/gazelle/fix-update.go | 2 +- cmd/gazelle/integration_test.go | 2 +- cmd/gazelle/internal/wspace/BUILD.bazel | 2 +- cmd/gazelle/langs.go | 4 +- cmd/gazelle/update-repos.go | 2 +- cmd/gencopy/BUILD.bazel | 2 +- docs/CORE_RULES.md | 14 +++--- docs/GAZELLE.md | 8 ++-- docs/HISTORY.md | 2 +- example/assets/BUILD.bazel | 6 +-- example/assets/api.pb.go | 2 +- example/assets/api.proto | 2 +- example/assets/api_request.pb.go | 2 +- example/assets/api_request.proto | 2 +- example/assets/api_response.pb.go | 2 +- example/assets/api_response.proto | 2 +- example/golden/golden_test.go | 2 +- .../golden/testdata/mappingsmerge/BUILD.in | 4 +- .../golden/testdata/mappingsmerge/BUILD.out | 6 +-- .../testdata/mappingsmerge/example.proto | 2 +- .../testdata/mappingsmerge/support.proto | 2 +- .../testdata/proto_compiled_sources/README.md | 2 +- .../proto_gazelle_data_test.bzl | 2 +- example/person/BUILD.bazel | 4 +- example/person/person.proto | 2 +- example/place/BUILD.bazel | 4 +- example/place/place.proto | 2 +- example/routeguide/BUILD.bazel | 6 +-- example/routeguide/routeguide.proto | 2 +- example/thing/BUILD.bazel | 4 +- example/thing/thing.proto | 2 +- go.mod | 2 +- language/example/BUILD.bazel | 2 +- language/example/example.go | 2 +- language/proto_go_modules/BUILD.bazel | 2 +- language/protobuf/BUILD.bazel | 2 +- language/protobuf/protobuf.go | 44 +++++++++---------- pkg/goldentest/BUILD.bazel | 2 +- pkg/language/noop/BUILD.bazel | 2 +- pkg/language/protobuf/BUILD.bazel | 2 +- pkg/language/protobuf/config.go | 2 +- pkg/language/protobuf/generate.go | 2 +- pkg/language/protobuf/kinds.go | 2 +- pkg/language/protobuf/lang.go | 2 +- pkg/language/protobuf/override.go | 2 +- pkg/language/protobuf/override_test.go | 2 +- pkg/language/protobuf/resolve.go | 2 +- pkg/plugin/akka/akka_grpc/BUILD.bazel | 2 +- .../akka/akka_grpc/protoc_gen_akka_grpc.go | 2 +- .../akka_grpc/protoc_gen_akka_grpc_test.go | 4 +- pkg/plugin/bufbuild/BUILD.bazel | 2 +- pkg/plugin/bufbuild/connect_es_plugin.go | 2 +- pkg/plugin/bufbuild/es_plugin.go | 2 +- pkg/plugin/bufbuild/es_plugin_test.go | 4 +- pkg/plugin/builtin/BUILD.bazel | 2 +- pkg/plugin/builtin/cpp_plugin.go | 2 +- pkg/plugin/builtin/cpp_plugin_test.go | 4 +- pkg/plugin/builtin/csharp_plugin.go | 2 +- pkg/plugin/builtin/csharp_plugin_test.go | 4 +- pkg/plugin/builtin/grpc_grpc_cpp.go | 2 +- pkg/plugin/builtin/java_plugin.go | 2 +- pkg/plugin/builtin/java_plugin_test.go | 4 +- pkg/plugin/builtin/js_closure_plugin.go | 2 +- pkg/plugin/builtin/js_closure_plugin_test.go | 4 +- pkg/plugin/builtin/js_common_plugin.go | 2 +- pkg/plugin/builtin/js_common_plugin_test.go | 4 +- pkg/plugin/builtin/objc_plugin.go | 2 +- pkg/plugin/builtin/objc_plugin_test.go | 4 +- pkg/plugin/builtin/php_plugin.go | 2 +- pkg/plugin/builtin/php_plugin_test.go | 4 +- pkg/plugin/builtin/pyi_plugin.go | 2 +- pkg/plugin/builtin/pyi_plugin_test.go | 4 +- pkg/plugin/builtin/python_plugin.go | 2 +- pkg/plugin/builtin/python_plugin_test.go | 4 +- pkg/plugin/builtin/ruby_plugin.go | 2 +- pkg/plugin/builtin/ruby_plugin_test.go | 4 +- pkg/plugin/gogo/protobuf/BUILD.bazel | 2 +- pkg/plugin/gogo/protobuf/protoc-gen-gogo.go | 2 +- pkg/plugin/golang/protobuf/BUILD.bazel | 2 +- pkg/plugin/golang/protobuf/protoc-gen-go.go | 2 +- .../golang/protobuf/protoc-gen-go_test.go | 4 +- pkg/plugin/grpc/grpc/BUILD.bazel | 2 +- .../grpc/grpc/protoc-gen-grpc-python.go | 2 +- .../grpc/grpc/protoc-gen-grpc-python_test.go | 4 +- pkg/plugin/grpc/grpcgo/BUILD.bazel | 2 +- pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go | 4 +- pkg/plugin/grpc/grpcjava/BUILD.bazel | 2 +- .../grpc/grpcjava/protoc-gen-grpc-java.go | 2 +- pkg/plugin/grpc/grpcnode/BUILD.bazel | 2 +- .../grpc/grpcnode/protoc-gen-grpc-node.go | 2 +- pkg/plugin/grpc/grpcweb/BUILD.bazel | 2 +- .../grpc/grpcweb/protoc-gen-grpc-web.go | 2 +- .../grpcecosystem/grpcgateway/BUILD.bazel | 2 +- .../grpcgateway/protoc-gen-grpc-gateway.go | 2 +- .../protoc-gen-grpc-gateway_test.go | 2 +- pkg/plugin/scalapb/scalapb/BUILD.bazel | 2 +- .../scalapb/scalapb/protoc_gen_scala.go | 2 +- .../scalapb/scalapb/protoc_gen_scala_test.go | 4 +- pkg/plugin/scalapb/zio_grpc/BUILD.bazel | 2 +- .../scalapb/zio_grpc/protoc_gen_zio_grpc.go | 2 +- .../zio_grpc/protoc_gen_zio_grpc_test.go | 4 +- pkg/plugin/stackb/grpc_js/BUILD.bazel | 2 +- .../stackb/grpc_js/protoc-gen-grpc-js.go | 2 +- pkg/plugin/stephenh/ts-proto/BUILD.bazel | 2 +- .../stephenh/ts-proto/protoc-gen-ts-proto.go | 2 +- .../ts-proto/protoc-gen-ts-proto_test.go | 4 +- pkg/plugintest/BUILD.bazel | 2 +- pkg/plugintest/case.go | 2 +- pkg/plugintest/utils.go | 2 +- pkg/protoc/BUILD.bazel | 2 +- pkg/rule/rules_cc/BUILD.bazel | 2 +- pkg/rule/rules_cc/cc_library.go | 2 +- pkg/rule/rules_cc/grpc_cc_library.go | 2 +- pkg/rule/rules_cc/proto_cc_library.go | 2 +- pkg/rule/rules_closure/BUILD.bazel | 2 +- pkg/rule/rules_closure/closure_js_library.go | 2 +- .../rules_closure/grpc_closure_js_library.go | 2 +- .../rules_closure/proto_closure_js_library.go | 2 +- pkg/rule/rules_go/BUILD.bazel | 2 +- pkg/rule/rules_go/go_library.go | 2 +- pkg/rule/rules_go/go_library_test.go | 2 +- pkg/rule/rules_java/BUILD.bazel | 2 +- pkg/rule/rules_java/grpc_java_library.go | 2 +- pkg/rule/rules_java/java_library.go | 2 +- pkg/rule/rules_java/proto_java_library.go | 2 +- pkg/rule/rules_nodejs/BUILD.bazel | 2 +- pkg/rule/rules_nodejs/grpc_nodejs_library.go | 2 +- pkg/rule/rules_nodejs/grpc_web_js_library.go | 2 +- pkg/rule/rules_nodejs/js_library.go | 2 +- pkg/rule/rules_nodejs/proto_nodejs_library.go | 2 +- pkg/rule/rules_nodejs/proto_ts_library.go | 2 +- pkg/rule/rules_python/BUILD.bazel | 2 +- pkg/rule/rules_python/grpc_py_library.go | 2 +- pkg/rule/rules_python/proto_py_library.go | 2 +- .../rules_python/proto_py_library_test.go | 2 +- pkg/rule/rules_python/py_library.go | 2 +- pkg/rule/rules_python/py_library_test.go | 2 +- pkg/rule/rules_scala/BUILD.bazel | 2 +- pkg/rule/rules_scala/scala_library.go | 6 +-- pkg/rule/rules_scala/scala_library_test.go | 2 +- pkg/rule/rules_scala/scala_proto_library.go | 2 +- rules/private/proto_repository_tools.bzl | 6 +-- 147 files changed, 210 insertions(+), 210 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 4c8760cc4..73db7103e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -10,7 +10,7 @@ exports_files([ # ---------------------------------------------------- # Gazelle # ---------------------------------------------------- -# gazelle:prefix github.com/stackb/rules_proto +# gazelle:prefix github.com/stackb/rules_proto/v4 # gazelle:exclude vendor # gazelle:exclude node_modules # gazelle:go_generate_proto false diff --git a/README.md b/README.md index ffc08720e..8efa604e2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # `rules_proto (v4)` -![build-status](https://github.com/stackb/rules_proto/actions/workflows/ci.yaml/badge.svg) +![build-status](https://github.com/stackb/rules_proto/v4/actions/workflows/ci.yaml/badge.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/stackb/rules_proto.svg)](https://pkg.go.dev/github.com/stackb/rules_proto) Bazel starlark rules for building protocol buffers +/- gRPC :sparkles:. diff --git a/cmd/examplegen/BUILD.bazel b/cmd/examplegen/BUILD.bazel index f5166f095..209caaadb 100644 --- a/cmd/examplegen/BUILD.bazel +++ b/cmd/examplegen/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "generator.go", "template.go", ], - importpath = "github.com/stackb/rules_proto/cmd/examplegen", + importpath = "github.com/stackb/rules_proto/v4/cmd/examplegen", visibility = ["//visibility:private"], ) diff --git a/cmd/gazelle/BUILD.bazel b/cmd/gazelle/BUILD.bazel index 9571e018e..a76806e3f 100644 --- a/cmd/gazelle/BUILD.bazel +++ b/cmd/gazelle/BUILD.bazel @@ -23,7 +23,7 @@ go_library( "profiler.go", "update-repos.go", ], - importpath = "github.com/stackb/rules_proto/cmd/gazelle", + importpath = "github.com/stackb/rules_proto/v4/cmd/gazelle", visibility = ["//visibility:public"], deps = [ "//cmd/gazelle/internal/wspace", diff --git a/cmd/gazelle/README.md b/cmd/gazelle/README.md index 520f8a517..049dabce1 100644 --- a/cmd/gazelle/README.md +++ b/cmd/gazelle/README.md @@ -6,7 +6,7 @@ To upgrade gazelle, one must: - Compare changes in the source repo@version to the files here. It's easiest to just copy over each file and see where the diffs are. Make sure `langs.go` - includes `github.com/stackb/rules_proto/language/protobuf`. + includes `github.com/stackb/rules_proto/v4/language/protobuf`. - Since the `proto_gazelle.bzl` rule uses `@bazel_gazelle//internal:gazelle.bash.in`, changes there must remain compatible with proto_gazelle. Look at the diff there and make sure the diff --git a/cmd/gazelle/fix-update.go b/cmd/gazelle/fix-update.go index 057062817..a69fac13a 100644 --- a/cmd/gazelle/fix-update.go +++ b/cmd/gazelle/fix-update.go @@ -39,7 +39,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/bazelbuild/bazel-gazelle/walk" - "github.com/stackb/rules_proto/cmd/gazelle/internal/wspace" + "github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace" ) // updateConfig holds configuration information needed to run the fix and diff --git a/cmd/gazelle/integration_test.go b/cmd/gazelle/integration_test.go index d0346fca4..79239d2e0 100644 --- a/cmd/gazelle/integration_test.go +++ b/cmd/gazelle/integration_test.go @@ -31,7 +31,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/testtools" "github.com/google/go-cmp/cmp" - "github.com/stackb/rules_proto/cmd/gazelle/internal/wspace" + "github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace" ) // skipIfWorkspaceVisible skips the test if the WORKSPACE file for the diff --git a/cmd/gazelle/internal/wspace/BUILD.bazel b/cmd/gazelle/internal/wspace/BUILD.bazel index 550e539ce..f0da95934 100644 --- a/cmd/gazelle/internal/wspace/BUILD.bazel +++ b/cmd/gazelle/internal/wspace/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "wspace", srcs = ["finder.go"], - importpath = "github.com/stackb/rules_proto/cmd/gazelle/internal/wspace", + importpath = "github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace", visibility = ["//visibility:public"], ) diff --git a/cmd/gazelle/langs.go b/cmd/gazelle/langs.go index 021652958..a84ea14be 100644 --- a/cmd/gazelle/langs.go +++ b/cmd/gazelle/langs.go @@ -19,8 +19,8 @@ import ( "github.com/bazelbuild/bazel-gazelle/language" golang "github.com/bazelbuild/bazel-gazelle/language/go" "github.com/bazelbuild/bazel-gazelle/language/proto" - "github.com/stackb/rules_proto/language/proto_go_modules" - "github.com/stackb/rules_proto/language/protobuf" + "github.com/stackb/rules_proto/v4/language/proto_go_modules" + "github.com/stackb/rules_proto/v4/language/protobuf" ) var languages = []language.Language{ diff --git a/cmd/gazelle/update-repos.go b/cmd/gazelle/update-repos.go index 1ef3095b9..ef3bbd756 100644 --- a/cmd/gazelle/update-repos.go +++ b/cmd/gazelle/update-repos.go @@ -32,7 +32,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/merger" "github.com/bazelbuild/bazel-gazelle/repo" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/cmd/gazelle/internal/wspace" + "github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace" ) type updateReposConfig struct { diff --git a/cmd/gencopy/BUILD.bazel b/cmd/gencopy/BUILD.bazel index 6b1117ae3..ca0ce8855 100644 --- a/cmd/gencopy/BUILD.bazel +++ b/cmd/gencopy/BUILD.bazel @@ -5,7 +5,7 @@ exports_files(["gencopy.bash.in"]) go_library( name = "gencopy_lib", srcs = ["gencopy.go"], - importpath = "github.com/stackb/rules_proto/cmd/gencopy", + importpath = "github.com/stackb/rules_proto/v4/cmd/gencopy", visibility = ["//visibility:private"], deps = ["@com_github_google_go_cmp//cmp"], ) diff --git a/docs/CORE_RULES.md b/docs/CORE_RULES.md index 9c52a50c2..056027f5a 100644 --- a/docs/CORE_RULES.md +++ b/docs/CORE_RULES.md @@ -117,7 +117,7 @@ Consider the following rule within the package `example/thing`: ```python proto_compile( name = "thing_go_compile", - output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/example/thing/thing.pb.go"], + output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/v4/example/thing/thing.pb.go"], outputs = ["thing.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "thing_proto", @@ -133,7 +133,7 @@ Let's temporarily comment out the `output_mappings` attribute and rebuild: ```python proto_compile( name = "thing_go_compile", - # output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/example/thing/thing.pb.go"], + # output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/v4/example/thing/thing.pb.go"], outputs = ["thing.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "thing_proto", @@ -142,7 +142,7 @@ proto_compile( ```sh $ bazel build //example/thing:thing_go_compile -ERROR: /github.com/stackb/rules_proto/example/thing/BUILD.bazel:54:14: output 'example/thing/thing.pb.go' was not created +ERROR: /github.com/stackb/rules_proto/v4/example/thing/BUILD.bazel:54:14: output 'example/thing/thing.pb.go' was not created ``` What happened? Let's add a debugging attribute `verbose = True` on the rule: @@ -152,7 +152,7 @@ after the `protoc` tool is invoked: ```python proto_compile( name = "thing_go_compile", - # output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/example/thing/thing.pb.go"], + # output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/v4/example/thing/thing.pb.go"], outputs = ["thing.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "thing_proto", @@ -169,17 +169,17 @@ $ bazel build //example/thing:thing_go_compile ./bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/timestamp_proto-descriptor-set.proto.bin ##### SANDBOX AFTER RUNNING PROTOC -./bazel-out/darwin-fastbuild/bin/github.com/stackb/rules_proto/example/thing/thing.pb.go +./bazel-out/darwin-fastbuild/bin/github.com/stackb/rules_proto/v4/example/thing/thing.pb.go ``` So, the file was created, but not in the location we wanted. In this case the `protoc-gen-go` plugin is not "playing nice" with Bazel. Because this `thing.proto` has -`option go_package = "github.com/stackb/rules_proto/example/thing;thing";`, the +`option go_package = "github.com/stackb/rules_proto/v4/example/thing;thing";`, the output location is no longer based on the `package`. This is a problem, because Bazel semantics disallow declaring a File outside its package boundary. As a result, we need to do a -`mv ./bazel-out/darwin-fastbuild/bin/github.com/stackb/rules_proto/example/thing/thing.pb.go ./bazel-out/darwin-fastbuild/bin/example/thing/thing.pb.go` +`mv ./bazel-out/darwin-fastbuild/bin/github.com/stackb/rules_proto/v4/example/thing/thing.pb.go ./bazel-out/darwin-fastbuild/bin/example/thing/thing.pb.go` to relocate the file into its expected location before the action terminates. Therefore, the `output_mappings` attribute is a list of entries that map file diff --git a/docs/GAZELLE.md b/docs/GAZELLE.md index 8e4a6c113..2fad92db5 100644 --- a/docs/GAZELLE.md +++ b/docs/GAZELLE.md @@ -234,7 +234,7 @@ proto_library( proto_compile( name = "person_go_compile", - output_mappings = ["person.pb.go=github.com/stackb/rules_proto/example/person/person.pb.go"], + output_mappings = ["person.pb.go=github.com/stackb/rules_proto/v4/example/person/person.pb.go"], outputs = ["person.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "person_proto", @@ -244,7 +244,7 @@ proto_compile( proto_go_library( name = "person_go_proto", srcs = ["person.pb.go"], - importpath = "github.com/stackb/rules_proto/example/person", + importpath = "github.com/stackb/rules_proto/v4/example/person", visibility = ["//visibility:public"], deps = [ "//example/place:place_go_proto", @@ -280,7 +280,7 @@ With this change, we get: proto_compiled_sources( name = "person_go_compiled_sources", srcs = ["person.pb.go"], - output_mappings = ["person.pb.go=github.com/stackb/rules_proto/example/person/person.pb.go"], + output_mappings = ["person.pb.go=github.com/stackb/rules_proto/v4/example/person/person.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "person_proto", visibility = ["//visibility:public"], @@ -305,7 +305,7 @@ gazelle extension: go_library( name = "person", srcs = ["person.pb.go"], - importpath = "github.com/stackb/rules_proto/example/person", + importpath = "github.com/stackb/rules_proto/v4/example/person", visibility = ["//visibility:public"], deps = [ "//example/place:place_go_proto", diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 271a54605..bdab9b37d 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -48,7 +48,7 @@ plugins that do things like: ## v3 The way gazelle stored resolve data in memory changed in 0.35. Uprading to this -in https://github.com/stackb/rules_proto/pull/357 was a breaking change. +in https://github.com/stackb/rules_proto/v4/pull/357 was a breaking change. ## v4 diff --git a/example/assets/BUILD.bazel b/example/assets/BUILD.bazel index a4d3416e1..9e929228c 100644 --- a/example/assets/BUILD.bazel +++ b/example/assets/BUILD.bazel @@ -59,7 +59,7 @@ proto_library( proto_compiled_sources( name = "api_go_compiled_sources", srcs = ["api.pb.go"], - output_mappings = ["api.pb.go=github.com/stackb/rules_proto/example/assets/api.pb.go"], + output_mappings = ["api.pb.go=github.com/stackb/rules_proto/v4/example/assets/api.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "api_proto", visibility = ["//visibility:public"], @@ -68,7 +68,7 @@ proto_compiled_sources( proto_compiled_sources( name = "api_request_go_compiled_sources", srcs = ["api_request.pb.go"], - output_mappings = ["api_request.pb.go=github.com/stackb/rules_proto/example/assets/api_request.pb.go"], + output_mappings = ["api_request.pb.go=github.com/stackb/rules_proto/v4/example/assets/api_request.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "api_request_proto", visibility = ["//visibility:public"], @@ -77,7 +77,7 @@ proto_compiled_sources( proto_compiled_sources( name = "api_response_go_compiled_sources", srcs = ["api_response.pb.go"], - output_mappings = ["api_response.pb.go=github.com/stackb/rules_proto/example/assets/api_response.pb.go"], + output_mappings = ["api_response.pb.go=github.com/stackb/rules_proto/v4/example/assets/api_response.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "api_response_proto", visibility = ["//visibility:public"], diff --git a/example/assets/api.pb.go b/example/assets/api.pb.go index dcae28326..a295237a6 100644 --- a/example/assets/api.pb.go +++ b/example/assets/api.pb.go @@ -87,7 +87,7 @@ const file_example_assets_api_proto_rawDesc = "" + "\x18example/assets/api.proto\x12\x0eexample.assets\x1a example/assets/api_request.proto\x1a!example/assets/api_response.proto\"|\n" + "\vApiExchange\x124\n" + "\arequest\x18\x01 \x01(\v2\x1a.example.assets.ApiRequestR\arequest\x127\n" + - "\bresponse\x18\x02 \x01(\v2\x1b.example.assets.ApiResponseR\bresponseB5Z3github.com/stackb/rules_proto/example/assets;assetsb\x06proto3" + "\bresponse\x18\x02 \x01(\v2\x1b.example.assets.ApiResponseR\bresponseB8Z6github.com/stackb/rules_proto/v4/example/assets;assetsb\x06proto3" var ( file_example_assets_api_proto_rawDescOnce sync.Once diff --git a/example/assets/api.proto b/example/assets/api.proto index 82d4d241a..0b4445d3b 100644 --- a/example/assets/api.proto +++ b/example/assets/api.proto @@ -7,7 +7,7 @@ package example.assets; import "example/assets/api_request.proto"; import "example/assets/api_response.proto"; -option go_package = "github.com/stackb/rules_proto/example/assets;assets"; +option go_package = "github.com/stackb/rules_proto/v4/example/assets;assets"; // ApiExchange is a demonstrative example of an API call that has a request and // a response. diff --git a/example/assets/api_request.pb.go b/example/assets/api_request.pb.go index 3af7d3443..0b88e5821 100644 --- a/example/assets/api_request.pb.go +++ b/example/assets/api_request.pb.go @@ -72,7 +72,7 @@ const file_example_assets_api_request_proto_rawDesc = "" + " example/assets/api_request.proto\x12\x0eexample.assets\"$\n" + "\n" + "ApiRequest\x12\x16\n" + - "\x06header\x18\x01 \x03(\tR\x06headerB5Z3github.com/stackb/rules_proto/example/assets;assetsb\x06proto3" + "\x06header\x18\x01 \x03(\tR\x06headerB8Z6github.com/stackb/rules_proto/v4/example/assets;assetsb\x06proto3" var ( file_example_assets_api_request_proto_rawDescOnce sync.Once diff --git a/example/assets/api_request.proto b/example/assets/api_request.proto index 665d775d6..e4891caed 100644 --- a/example/assets/api_request.proto +++ b/example/assets/api_request.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package example.assets; -option go_package = "github.com/stackb/rules_proto/example/assets;assets"; +option go_package = "github.com/stackb/rules_proto/v4/example/assets;assets"; message ApiRequest { repeated string header = 1; } diff --git a/example/assets/api_response.pb.go b/example/assets/api_response.pb.go index 58b67b7ca..335cce1a5 100644 --- a/example/assets/api_response.pb.go +++ b/example/assets/api_response.pb.go @@ -80,7 +80,7 @@ const file_example_assets_api_response_proto_rawDesc = "" + "!example/assets/api_response.proto\x12\x0eexample.assets\"9\n" + "\vApiResponse\x12\x12\n" + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x16\n" + - "\x06status\x18\x02 \x01(\tR\x06statusB5Z3github.com/stackb/rules_proto/example/assets;assetsb\x06proto3" + "\x06status\x18\x02 \x01(\tR\x06statusB8Z6github.com/stackb/rules_proto/v4/example/assets;assetsb\x06proto3" var ( file_example_assets_api_response_proto_rawDescOnce sync.Once diff --git a/example/assets/api_response.proto b/example/assets/api_response.proto index a19e0e0d7..54ff41a14 100644 --- a/example/assets/api_response.proto +++ b/example/assets/api_response.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package example.assets; -option go_package = "github.com/stackb/rules_proto/example/assets;assets"; +option go_package = "github.com/stackb/rules_proto/v4/example/assets;assets"; message ApiResponse { int32 code = 1; diff --git a/example/golden/golden_test.go b/example/golden/golden_test.go index 78a5598f2..ace70873a 100644 --- a/example/golden/golden_test.go +++ b/example/golden/golden_test.go @@ -3,7 +3,7 @@ package golden import ( "testing" - "github.com/stackb/rules_proto/pkg/goldentest" + "github.com/stackb/rules_proto/v4/pkg/goldentest" ) func TestGoldens(t *testing.T) { diff --git a/example/golden/testdata/mappingsmerge/BUILD.in b/example/golden/testdata/mappingsmerge/BUILD.in index b9164ec8c..14e9ecfc4 100644 --- a/example/golden/testdata/mappingsmerge/BUILD.in +++ b/example/golden/testdata/mappingsmerge/BUILD.in @@ -21,7 +21,7 @@ proto_library( proto_compile( name = "mappingsmerge_go_compile", - output_mappings = ["example.pb.go=github.com/stackb/rules_proto/example/golden/mappingsmerge/example.pb.go"], + output_mappings = ["example.pb.go=github.com/stackb/rules_proto/v4/example/golden/mappingsmerge/example.pb.go"], outputs = ["example.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "mappingsmerge_proto", @@ -30,7 +30,7 @@ proto_compile( proto_go_library( name = "mappingsmerge_go_proto", srcs = ["example.pb.go"], - importpath = "github.com/stackb/rules_proto/example/golden/mappingsmerge", + importpath = "github.com/stackb/rules_proto/v4/example/golden/mappingsmerge", visibility = ["//visibility:public"], deps = [ "@org_golang_google_protobuf//reflect/protoreflect", diff --git a/example/golden/testdata/mappingsmerge/BUILD.out b/example/golden/testdata/mappingsmerge/BUILD.out index 861b1d071..13a0e6dea 100644 --- a/example/golden/testdata/mappingsmerge/BUILD.out +++ b/example/golden/testdata/mappingsmerge/BUILD.out @@ -25,8 +25,8 @@ proto_library( proto_compile( name = "mappingsmerge_go_compile", output_mappings = [ - "example.pb.go=github.com/stackb/rules_proto/example/golden/mappingsmerge/example.pb.go", - "support.pb.go=github.com/stackb/rules_proto/example/golden/mappingsmerge/support.pb.go", + "example.pb.go=github.com/stackb/rules_proto/v4/example/golden/mappingsmerge/example.pb.go", + "support.pb.go=github.com/stackb/rules_proto/v4/example/golden/mappingsmerge/support.pb.go", ], outputs = [ "example.pb.go", @@ -42,7 +42,7 @@ proto_go_library( "example.pb.go", "support.pb.go", ], - importpath = "github.com/stackb/rules_proto/example/golden/mappingsmerge", + importpath = "github.com/stackb/rules_proto/v4/example/golden/mappingsmerge", visibility = ["//visibility:public"], deps = [ "@org_golang_google_protobuf//reflect/protoreflect", diff --git a/example/golden/testdata/mappingsmerge/example.proto b/example/golden/testdata/mappingsmerge/example.proto index b40e85a80..5dd439d65 100644 --- a/example/golden/testdata/mappingsmerge/example.proto +++ b/example/golden/testdata/mappingsmerge/example.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/stackb/rules_proto/example/golden/mappingsmerge"; +option go_package = "github.com/stackb/rules_proto/v4/example/golden/mappingsmerge"; enum Enum{ UNKNOWN = 0; diff --git a/example/golden/testdata/mappingsmerge/support.proto b/example/golden/testdata/mappingsmerge/support.proto index 95fcacb8f..2a718e9b5 100644 --- a/example/golden/testdata/mappingsmerge/support.proto +++ b/example/golden/testdata/mappingsmerge/support.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/stackb/rules_proto/example/golden/mappingsmerge"; +option go_package = "github.com/stackb/rules_proto/v4/example/golden/mappingsmerge"; message M{} diff --git a/example/golden/testdata/proto_compiled_sources/README.md b/example/golden/testdata/proto_compiled_sources/README.md index d066a6162..8f1d681f9 100644 --- a/example/golden/testdata/proto_compiled_sources/README.md +++ b/example/golden/testdata/proto_compiled_sources/README.md @@ -7,4 +7,4 @@ The api/v1 subdirectory contains a typical proto. The src/idl subdirectory contains a proto that also uses strip_import_prefix (see -[#358](https://github.com/stackb/rules_proto/issues/358)). \ No newline at end of file +[#358](https://github.com/stackb/rules_proto/v4/issues/358)). \ No newline at end of file diff --git a/example/golden/testdata/proto_repository/proto_gazelle_data_test.bzl b/example/golden/testdata/proto_repository/proto_gazelle_data_test.bzl index 57dd2939f..343b3e72d 100644 --- a/example/golden/testdata/proto_repository/proto_gazelle_data_test.bzl +++ b/example/golden/testdata/proto_repository/proto_gazelle_data_test.bzl @@ -1,6 +1,6 @@ """proto_gazelle_data_test is a regression test. -See https://github.com/stackb/rules_proto/issues/342. +See https://github.com/stackb/rules_proto/v4/issues/342. """ diff --git a/example/person/BUILD.bazel b/example/person/BUILD.bazel index f78ef8a17..102727ab3 100644 --- a/example/person/BUILD.bazel +++ b/example/person/BUILD.bazel @@ -38,7 +38,7 @@ proto_compile( proto_compile( name = "person_go_compile", - output_mappings = ["person.pb.go=github.com/stackb/rules_proto/example/person/person.pb.go"], + output_mappings = ["person.pb.go=github.com/stackb/rules_proto/v4/example/person/person.pb.go"], outputs = ["person.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "person_proto", @@ -48,7 +48,7 @@ proto_compile( proto_go_library( name = "person_go_proto", srcs = ["person.pb.go"], - importpath = "github.com/stackb/rules_proto/example/person", + importpath = "github.com/stackb/rules_proto/v4/example/person", visibility = ["//visibility:public"], deps = [ "//example/place:place_go_proto", diff --git a/example/person/person.proto b/example/person/person.proto index c7b006c5e..df5542709 100644 --- a/example/person/person.proto +++ b/example/person/person.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package example.person; -option go_package = "github.com/stackb/rules_proto/example/person;person"; +option go_package = "github.com/stackb/rules_proto/v4/example/person;person"; import "example/place/place.proto"; diff --git a/example/place/BUILD.bazel b/example/place/BUILD.bazel index fe7c3ebfc..2e24f3edd 100644 --- a/example/place/BUILD.bazel +++ b/example/place/BUILD.bazel @@ -38,7 +38,7 @@ proto_compile( proto_compile( name = "place_go_compile", - output_mappings = ["place.pb.go=github.com/stackb/rules_proto/example/place/place.pb.go"], + output_mappings = ["place.pb.go=github.com/stackb/rules_proto/v4/example/place/place.pb.go"], outputs = ["place.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "place_proto", @@ -48,7 +48,7 @@ proto_compile( proto_go_library( name = "place_go_proto", srcs = ["place.pb.go"], - importpath = "github.com/stackb/rules_proto/example/place", + importpath = "github.com/stackb/rules_proto/v4/example/place", visibility = ["//visibility:public"], deps = [ "//example/thing:thing_go_proto", diff --git a/example/place/place.proto b/example/place/place.proto index cd8d7b079..927ab2a53 100644 --- a/example/place/place.proto +++ b/example/place/place.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package example.place; -option go_package = "github.com/stackb/rules_proto/example/place;place"; +option go_package = "github.com/stackb/rules_proto/v4/example/place;place"; import "example/thing/thing.proto"; diff --git a/example/routeguide/BUILD.bazel b/example/routeguide/BUILD.bazel index 2078d05a3..0aeebb83c 100644 --- a/example/routeguide/BUILD.bazel +++ b/example/routeguide/BUILD.bazel @@ -82,8 +82,8 @@ proto_compile( proto_compile( name = "routeguide_go_compile", output_mappings = [ - "routeguide.pb.go=github.com/stackb/rules_proto/example/routeguide/routeguide.pb.go", - "routeguide_grpc.pb.go=github.com/stackb/rules_proto/example/routeguide/routeguide_grpc.pb.go", + "routeguide.pb.go=github.com/stackb/rules_proto/v4/example/routeguide/routeguide.pb.go", + "routeguide_grpc.pb.go=github.com/stackb/rules_proto/v4/example/routeguide/routeguide_grpc.pb.go", ], outputs = [ "routeguide.pb.go", @@ -103,7 +103,7 @@ proto_go_library( "routeguide.pb.go", "routeguide_grpc.pb.go", ], - importpath = "github.com/stackb/rules_proto/example/routeguide", + importpath = "github.com/stackb/rules_proto/v4/example/routeguide", visibility = ["//visibility:public"], deps = [ "@org_golang_google_grpc//:go_default_library", diff --git a/example/routeguide/routeguide.proto b/example/routeguide/routeguide.proto index 731e854b2..1a37bd7ba 100644 --- a/example/routeguide/routeguide.proto +++ b/example/routeguide/routeguide.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package example.routeguide; option java_multiple_files = true; -option go_package = "github.com/stackb/rules_proto/example/routeguide;routeguide"; +option go_package = "github.com/stackb/rules_proto/v4/example/routeguide;routeguide"; option java_outer_classname = "RouteGuideProto"; option objc_class_prefix = "RTG"; option csharp_namespace = "RouteGuide"; diff --git a/example/thing/BUILD.bazel b/example/thing/BUILD.bazel index cc7da8a2a..89324c20f 100644 --- a/example/thing/BUILD.bazel +++ b/example/thing/BUILD.bazel @@ -38,7 +38,7 @@ proto_compile( proto_compile( name = "thing_go_compile", - output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/example/thing/thing.pb.go"], + output_mappings = ["thing.pb.go=github.com/stackb/rules_proto/v4/example/thing/thing.pb.go"], outputs = ["thing.pb.go"], plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], proto = "thing_proto", @@ -48,7 +48,7 @@ proto_compile( proto_go_library( name = "thing_go_proto", srcs = ["thing.pb.go"], - importpath = "github.com/stackb/rules_proto/example/thing", + importpath = "github.com/stackb/rules_proto/v4/example/thing", visibility = ["//visibility:public"], deps = [ "@org_golang_google_protobuf//encoding/protojson", diff --git a/example/thing/thing.proto b/example/thing/thing.proto index 54eefef88..5fea4c8da 100644 --- a/example/thing/thing.proto +++ b/example/thing/thing.proto @@ -4,7 +4,7 @@ package example.thing; option java_multiple_files = true; option java_package = "com.github.stackb.rules_proto.example.thing"; -option go_package = "github.com/stackb/rules_proto/example/thing;thing"; +option go_package = "github.com/stackb/rules_proto/v4/example/thing;thing"; import "google/protobuf/timestamp.proto"; diff --git a/go.mod b/go.mod index e99a7a757..f03d7b956 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/stackb/rules_proto +module github.com/stackb/rules_proto/v4 go 1.23.1 diff --git a/language/example/BUILD.bazel b/language/example/BUILD.bazel index 08fd8f921..5c266a058 100644 --- a/language/example/BUILD.bazel +++ b/language/example/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "example", srcs = ["example.go"], - importpath = "github.com/stackb/rules_proto/language/example", + importpath = "github.com/stackb/rules_proto/v4/language/example", visibility = ["//visibility:public"], deps = [ "//pkg/language/noop", diff --git a/language/example/example.go b/language/example/example.go index e39bdac26..29b5fec3d 100644 --- a/language/example/example.go +++ b/language/example/example.go @@ -3,7 +3,7 @@ package example import ( "github.com/bazelbuild/bazel-gazelle/language" - "github.com/stackb/rules_proto/pkg/language/noop" + "github.com/stackb/rules_proto/v4/pkg/language/noop" // Put your own imports here! // _ "github.com/org/repo/pkg/plugin/foo" ) diff --git a/language/proto_go_modules/BUILD.bazel b/language/proto_go_modules/BUILD.bazel index 59ff5490e..24a5c38ce 100644 --- a/language/proto_go_modules/BUILD.bazel +++ b/language/proto_go_modules/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "language.go", "rule.go", ], - importpath = "github.com/stackb/rules_proto/language/proto_go_modules", + importpath = "github.com/stackb/rules_proto/v4/language/proto_go_modules", visibility = ["//visibility:public"], deps = [ "@bazel_gazelle//config", diff --git a/language/protobuf/BUILD.bazel b/language/protobuf/BUILD.bazel index 49e7dc759..fc88ea09e 100644 --- a/language/protobuf/BUILD.bazel +++ b/language/protobuf/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "protobuf", srcs = ["protobuf.go"], - importpath = "github.com/stackb/rules_proto/language/protobuf", + importpath = "github.com/stackb/rules_proto/v4/language/protobuf", visibility = ["//visibility:public"], deps = [ "//pkg/language/protobuf", diff --git a/language/protobuf/protobuf.go b/language/protobuf/protobuf.go index 79fe6567a..0edc5d54b 100644 --- a/language/protobuf/protobuf.go +++ b/language/protobuf/protobuf.go @@ -3,29 +3,29 @@ package protobuf import ( "github.com/bazelbuild/bazel-gazelle/language" - "github.com/stackb/rules_proto/pkg/language/protobuf" + "github.com/stackb/rules_proto/v4/pkg/language/protobuf" - _ "github.com/stackb/rules_proto/pkg/plugin/builtin" - _ "github.com/stackb/rules_proto/pkg/plugin/gogo/protobuf" - _ "github.com/stackb/rules_proto/pkg/plugin/golang/protobuf" - _ "github.com/stackb/rules_proto/pkg/plugin/grpc/grpc" - _ "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcgo" - _ "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcjava" - _ "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcnode" - _ "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcweb" - _ "github.com/stackb/rules_proto/pkg/plugin/grpcecosystem/grpcgateway" - _ "github.com/stackb/rules_proto/pkg/plugin/scalapb/scalapb" - _ "github.com/stackb/rules_proto/pkg/plugin/scalapb/zio_grpc" - _ "github.com/stackb/rules_proto/pkg/plugin/stackb/grpc_js" - _ "github.com/stackb/rules_proto/pkg/plugin/bufbuild" - _ "github.com/stackb/rules_proto/pkg/plugin/stephenh/ts-proto" - _ "github.com/stackb/rules_proto/pkg/rule/rules_cc" - _ "github.com/stackb/rules_proto/pkg/rule/rules_closure" - _ "github.com/stackb/rules_proto/pkg/rule/rules_go" - _ "github.com/stackb/rules_proto/pkg/rule/rules_java" - _ "github.com/stackb/rules_proto/pkg/rule/rules_nodejs" - _ "github.com/stackb/rules_proto/pkg/rule/rules_python" - _ "github.com/stackb/rules_proto/pkg/rule/rules_scala" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/gogo/protobuf" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/golang/protobuf" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpc" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcgo" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcjava" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcnode" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcweb" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/grpcecosystem/grpcgateway" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/scalapb" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/zio_grpc" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/stackb/grpc_js" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/bufbuild" + _ "github.com/stackb/rules_proto/v4/pkg/plugin/stephenh/ts-proto" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_cc" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_closure" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_go" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_java" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_nodejs" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_python" + _ "github.com/stackb/rules_proto/v4/pkg/rule/rules_scala" ) // NewLanguage is called by Gazelle to install this language extension in a diff --git a/pkg/goldentest/BUILD.bazel b/pkg/goldentest/BUILD.bazel index 780afe66f..1637ad29a 100644 --- a/pkg/goldentest/BUILD.bazel +++ b/pkg/goldentest/BUILD.bazel @@ -4,7 +4,7 @@ go_library( name = "goldentest", testonly = True, srcs = ["cases.go"], - importpath = "github.com/stackb/rules_proto/pkg/goldentest", + importpath = "github.com/stackb/rules_proto/v4/pkg/goldentest", visibility = ["//visibility:public"], deps = [ "@bazel_gazelle//testtools", diff --git a/pkg/language/noop/BUILD.bazel b/pkg/language/noop/BUILD.bazel index 4e96862e2..e3939dd67 100644 --- a/pkg/language/noop/BUILD.bazel +++ b/pkg/language/noop/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "noop", srcs = ["noop.go"], - importpath = "github.com/stackb/rules_proto/pkg/language/noop", + importpath = "github.com/stackb/rules_proto/v4/pkg/language/noop", visibility = ["//visibility:public"], deps = [ "@bazel_gazelle//config", diff --git a/pkg/language/protobuf/BUILD.bazel b/pkg/language/protobuf/BUILD.bazel index ff2a706f7..5a3090c98 100644 --- a/pkg/language/protobuf/BUILD.bazel +++ b/pkg/language/protobuf/BUILD.bazel @@ -12,7 +12,7 @@ go_library( "override.go", "resolve.go", ], - importpath = "github.com/stackb/rules_proto/pkg/language/protobuf", + importpath = "github.com/stackb/rules_proto/v4/pkg/language/protobuf", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/language/protobuf/config.go b/pkg/language/protobuf/config.go index 4b65f5565..dd13aad37 100644 --- a/pkg/language/protobuf/config.go +++ b/pkg/language/protobuf/config.go @@ -10,7 +10,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // The following methods are implemented to satisfy the diff --git a/pkg/language/protobuf/generate.go b/pkg/language/protobuf/generate.go index 039e9ca91..7f60a22f8 100644 --- a/pkg/language/protobuf/generate.go +++ b/pkg/language/protobuf/generate.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/language" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // GenerateRules extracts build metadata from source files in a directory. diff --git a/pkg/language/protobuf/kinds.go b/pkg/language/protobuf/kinds.go index c1f38a302..b212cf681 100644 --- a/pkg/language/protobuf/kinds.go +++ b/pkg/language/protobuf/kinds.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // Kinds returns a map of maps rule names (kinds) and information on how to diff --git a/pkg/language/protobuf/lang.go b/pkg/language/protobuf/lang.go index 36d236697..802fc5c26 100644 --- a/pkg/language/protobuf/lang.go +++ b/pkg/language/protobuf/lang.go @@ -1,7 +1,7 @@ package protobuf import ( - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // NewProtobufLang create a new protobufLang Gazelle extension implementation. diff --git a/pkg/language/protobuf/override.go b/pkg/language/protobuf/override.go index a383bac38..99f0225fd 100644 --- a/pkg/language/protobuf/override.go +++ b/pkg/language/protobuf/override.go @@ -7,7 +7,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/language/protobuf/override_test.go b/pkg/language/protobuf/override_test.go index 8e7fd0c50..bff6d8743 100644 --- a/pkg/language/protobuf/override_test.go +++ b/pkg/language/protobuf/override_test.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/rule" "github.com/google/go-cmp/cmp" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // TestOverrideRule demonstrates the shape of an override rule: as a carrier for diff --git a/pkg/language/protobuf/resolve.go b/pkg/language/protobuf/resolve.go index 00ed0d41e..834c3ec33 100644 --- a/pkg/language/protobuf/resolve.go +++ b/pkg/language/protobuf/resolve.go @@ -9,7 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // Imports returns a list of ImportSpecs that can be used to import the rule r. diff --git a/pkg/plugin/akka/akka_grpc/BUILD.bazel b/pkg/plugin/akka/akka_grpc/BUILD.bazel index 2c350e0e4..8e46174ef 100644 --- a/pkg/plugin/akka/akka_grpc/BUILD.bazel +++ b/pkg/plugin/akka/akka_grpc/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "akka_grpc", srcs = ["protoc_gen_akka_grpc.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/akka/akka_grpc", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/akka/akka_grpc", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc.go b/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc.go index 6d3205bce..eb9e6524a 100644 --- a/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc.go +++ b/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const AkkaGrpcPluginName = "akka:akka-grpc:protoc-gen-akka-grpc" diff --git a/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc_test.go b/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc_test.go index e12832b6d..25257081b 100644 --- a/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc_test.go +++ b/pkg/plugin/akka/akka_grpc/protoc_gen_akka_grpc_test.go @@ -3,8 +3,8 @@ package akka_grpc_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/akka/akka_grpc" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/akka/akka_grpc" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtoGenAkkaGrpcPlugin(t *testing.T) { diff --git a/pkg/plugin/bufbuild/BUILD.bazel b/pkg/plugin/bufbuild/BUILD.bazel index c71a8f430..5695c4746 100644 --- a/pkg/plugin/bufbuild/BUILD.bazel +++ b/pkg/plugin/bufbuild/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "connect_es_plugin.go", "es_plugin.go", ], - importpath = "github.com/stackb/rules_proto/pkg/plugin/bufbuild", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/bufbuild", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/bufbuild/connect_es_plugin.go b/pkg/plugin/bufbuild/connect_es_plugin.go index 53cc52dfc..af6ce3cbd 100644 --- a/pkg/plugin/bufbuild/connect_es_plugin.go +++ b/pkg/plugin/bufbuild/connect_es_plugin.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/bufbuild/es_plugin.go b/pkg/plugin/bufbuild/es_plugin.go index a9336313e..fbddce923 100644 --- a/pkg/plugin/bufbuild/es_plugin.go +++ b/pkg/plugin/bufbuild/es_plugin.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/bufbuild/es_plugin_test.go b/pkg/plugin/bufbuild/es_plugin_test.go index 266e706ef..638c49133 100644 --- a/pkg/plugin/bufbuild/es_plugin_test.go +++ b/pkg/plugin/bufbuild/es_plugin_test.go @@ -3,8 +3,8 @@ package bufbuild_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/bufbuild" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/bufbuild" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtocGenTsProtoPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/BUILD.bazel b/pkg/plugin/builtin/BUILD.bazel index f5aa1c015..d1dd12159 100644 --- a/pkg/plugin/builtin/BUILD.bazel +++ b/pkg/plugin/builtin/BUILD.bazel @@ -16,7 +16,7 @@ go_library( "python_plugin.go", "ruby_plugin.go", ], - importpath = "github.com/stackb/rules_proto/pkg/plugin/builtin", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/builtin", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/builtin/cpp_plugin.go b/pkg/plugin/builtin/cpp_plugin.go index 0f92714ac..af2164b82 100644 --- a/pkg/plugin/builtin/cpp_plugin.go +++ b/pkg/plugin/builtin/cpp_plugin.go @@ -2,7 +2,7 @@ package builtin import ( "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/cpp_plugin_test.go b/pkg/plugin/builtin/cpp_plugin_test.go index 07c06821e..ca35919ef 100644 --- a/pkg/plugin/builtin/cpp_plugin_test.go +++ b/pkg/plugin/builtin/cpp_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestCppPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/csharp_plugin.go b/pkg/plugin/builtin/csharp_plugin.go index 81d27e61b..29c4b7697 100644 --- a/pkg/plugin/builtin/csharp_plugin.go +++ b/pkg/plugin/builtin/csharp_plugin.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/csharp_plugin_test.go b/pkg/plugin/builtin/csharp_plugin_test.go index 32e277ce4..5a2b536ce 100644 --- a/pkg/plugin/builtin/csharp_plugin_test.go +++ b/pkg/plugin/builtin/csharp_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestCsharpPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/grpc_grpc_cpp.go b/pkg/plugin/builtin/grpc_grpc_cpp.go index 909a7d570..47c828dc0 100644 --- a/pkg/plugin/builtin/grpc_grpc_cpp.go +++ b/pkg/plugin/builtin/grpc_grpc_cpp.go @@ -2,7 +2,7 @@ package builtin import ( "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/java_plugin.go b/pkg/plugin/builtin/java_plugin.go index 38a790c47..e8f55af0c 100644 --- a/pkg/plugin/builtin/java_plugin.go +++ b/pkg/plugin/builtin/java_plugin.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/java_plugin_test.go b/pkg/plugin/builtin/java_plugin_test.go index 1723bc84a..263bfbae4 100644 --- a/pkg/plugin/builtin/java_plugin_test.go +++ b/pkg/plugin/builtin/java_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestJavaPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/js_closure_plugin.go b/pkg/plugin/builtin/js_closure_plugin.go index a0f55504a..ffe7d4d27 100644 --- a/pkg/plugin/builtin/js_closure_plugin.go +++ b/pkg/plugin/builtin/js_closure_plugin.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/js_closure_plugin_test.go b/pkg/plugin/builtin/js_closure_plugin_test.go index 39be29b8c..f6a7722bf 100644 --- a/pkg/plugin/builtin/js_closure_plugin_test.go +++ b/pkg/plugin/builtin/js_closure_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) // TODO(pcj): migrate this test to use the standalone protoc-gen-js plugin. diff --git a/pkg/plugin/builtin/js_common_plugin.go b/pkg/plugin/builtin/js_common_plugin.go index e86fe1e5d..8d39cfcc8 100644 --- a/pkg/plugin/builtin/js_common_plugin.go +++ b/pkg/plugin/builtin/js_common_plugin.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/js_common_plugin_test.go b/pkg/plugin/builtin/js_common_plugin_test.go index f6ef4c8b0..4e94a957a 100644 --- a/pkg/plugin/builtin/js_common_plugin_test.go +++ b/pkg/plugin/builtin/js_common_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) // TODO(pcj): migrate this test to use the standalone protoc-gen-js plugin. diff --git a/pkg/plugin/builtin/objc_plugin.go b/pkg/plugin/builtin/objc_plugin.go index 9ae4b2691..e1a768cf6 100644 --- a/pkg/plugin/builtin/objc_plugin.go +++ b/pkg/plugin/builtin/objc_plugin.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/objc_plugin_test.go b/pkg/plugin/builtin/objc_plugin_test.go index 2e168d449..c6289ff11 100644 --- a/pkg/plugin/builtin/objc_plugin_test.go +++ b/pkg/plugin/builtin/objc_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestObjcPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/php_plugin.go b/pkg/plugin/builtin/php_plugin.go index 2f11ba9b4..ecb7413fe 100644 --- a/pkg/plugin/builtin/php_plugin.go +++ b/pkg/plugin/builtin/php_plugin.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/php_plugin_test.go b/pkg/plugin/builtin/php_plugin_test.go index 3014d6ddd..53e7687f4 100644 --- a/pkg/plugin/builtin/php_plugin_test.go +++ b/pkg/plugin/builtin/php_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestPhpPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/pyi_plugin.go b/pkg/plugin/builtin/pyi_plugin.go index 0eb3f2916..3c1030b47 100644 --- a/pkg/plugin/builtin/pyi_plugin.go +++ b/pkg/plugin/builtin/pyi_plugin.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/pyi_plugin_test.go b/pkg/plugin/builtin/pyi_plugin_test.go index f2d1f3a6a..6c567378d 100644 --- a/pkg/plugin/builtin/pyi_plugin_test.go +++ b/pkg/plugin/builtin/pyi_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestPyiPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/python_plugin.go b/pkg/plugin/builtin/python_plugin.go index 1c11df39c..6a3dce1a8 100644 --- a/pkg/plugin/builtin/python_plugin.go +++ b/pkg/plugin/builtin/python_plugin.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/python_plugin_test.go b/pkg/plugin/builtin/python_plugin_test.go index 0dd9625fe..ccb4bdf4b 100644 --- a/pkg/plugin/builtin/python_plugin_test.go +++ b/pkg/plugin/builtin/python_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestPythonPlugin(t *testing.T) { diff --git a/pkg/plugin/builtin/ruby_plugin.go b/pkg/plugin/builtin/ruby_plugin.go index 0596fddf3..1299099b0 100644 --- a/pkg/plugin/builtin/ruby_plugin.go +++ b/pkg/plugin/builtin/ruby_plugin.go @@ -2,7 +2,7 @@ package builtin import ( "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/builtin/ruby_plugin_test.go b/pkg/plugin/builtin/ruby_plugin_test.go index 08765f6d7..e9de2fef7 100644 --- a/pkg/plugin/builtin/ruby_plugin_test.go +++ b/pkg/plugin/builtin/ruby_plugin_test.go @@ -3,8 +3,8 @@ package builtin_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/builtin" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/builtin" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestRubyPlugin(t *testing.T) { diff --git a/pkg/plugin/gogo/protobuf/BUILD.bazel b/pkg/plugin/gogo/protobuf/BUILD.bazel index 14ab88582..b57c5e964 100644 --- a/pkg/plugin/gogo/protobuf/BUILD.bazel +++ b/pkg/plugin/gogo/protobuf/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "protobuf", srcs = ["protoc-gen-gogo.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/gogo/protobuf", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/gogo/protobuf", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/gogo/protobuf/protoc-gen-gogo.go b/pkg/plugin/gogo/protobuf/protoc-gen-gogo.go index 7d237db26..6919618d8 100644 --- a/pkg/plugin/gogo/protobuf/protoc-gen-gogo.go +++ b/pkg/plugin/gogo/protobuf/protoc-gen-gogo.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const gogoGrpcPluginOption = "plugins=grpc" diff --git a/pkg/plugin/golang/protobuf/BUILD.bazel b/pkg/plugin/golang/protobuf/BUILD.bazel index 3a9bfe73a..aba72eb85 100644 --- a/pkg/plugin/golang/protobuf/BUILD.bazel +++ b/pkg/plugin/golang/protobuf/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "protobuf", srcs = ["protoc-gen-go.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/golang/protobuf", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/golang/protobuf", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/golang/protobuf/protoc-gen-go.go b/pkg/plugin/golang/protobuf/protoc-gen-go.go index 7a0cf08e4..8f70e07a0 100644 --- a/pkg/plugin/golang/protobuf/protoc-gen-go.go +++ b/pkg/plugin/golang/protobuf/protoc-gen-go.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // TransitiveImportMappingsKey stores a map[string]string on the library diff --git a/pkg/plugin/golang/protobuf/protoc-gen-go_test.go b/pkg/plugin/golang/protobuf/protoc-gen-go_test.go index f94e9229f..4f8a1a8b2 100644 --- a/pkg/plugin/golang/protobuf/protoc-gen-go_test.go +++ b/pkg/plugin/golang/protobuf/protoc-gen-go_test.go @@ -3,8 +3,8 @@ package protobuf_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/golang/protobuf" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/golang/protobuf" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtocGenGoPlugin(t *testing.T) { diff --git a/pkg/plugin/grpc/grpc/BUILD.bazel b/pkg/plugin/grpc/grpc/BUILD.bazel index 2b20e6697..a088da330 100644 --- a/pkg/plugin/grpc/grpc/BUILD.bazel +++ b/pkg/plugin/grpc/grpc/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "grpc", srcs = ["protoc-gen-grpc-python.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpc/grpc", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpc", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/grpc/grpc/protoc-gen-grpc-python.go b/pkg/plugin/grpc/grpc/protoc-gen-grpc-python.go index d42087979..448573f55 100644 --- a/pkg/plugin/grpc/grpc/protoc-gen-grpc-python.go +++ b/pkg/plugin/grpc/grpc/protoc-gen-grpc-python.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpc/grpc/protoc-gen-grpc-python_test.go b/pkg/plugin/grpc/grpc/protoc-gen-grpc-python_test.go index c5609ebf1..6b8b9192f 100644 --- a/pkg/plugin/grpc/grpc/protoc-gen-grpc-python_test.go +++ b/pkg/plugin/grpc/grpc/protoc-gen-grpc-python_test.go @@ -3,8 +3,8 @@ package grpc_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/grpc/grpc" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpc" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtocGenGrpcPython(t *testing.T) { diff --git a/pkg/plugin/grpc/grpcgo/BUILD.bazel b/pkg/plugin/grpc/grpcgo/BUILD.bazel index d130b2c7e..90b10e74e 100644 --- a/pkg/plugin/grpc/grpcgo/BUILD.bazel +++ b/pkg/plugin/grpc/grpcgo/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "grpcgo", srcs = ["protoc-gen-go-grpc.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcgo", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcgo", visibility = ["//visibility:public"], deps = [ "//pkg/plugin/golang/protobuf", diff --git a/pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go b/pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go index 038eeaf95..fa5954932 100644 --- a/pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go +++ b/pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go @@ -3,8 +3,8 @@ package grpcgo import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/plugin/golang/protobuf" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/plugin/golang/protobuf" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpc/grpcjava/BUILD.bazel b/pkg/plugin/grpc/grpcjava/BUILD.bazel index a380d745a..dfd21e32e 100644 --- a/pkg/plugin/grpc/grpcjava/BUILD.bazel +++ b/pkg/plugin/grpc/grpcjava/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "grpcjava", srcs = ["protoc-gen-grpc-java.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcjava", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcjava", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/grpc/grpcjava/protoc-gen-grpc-java.go b/pkg/plugin/grpc/grpcjava/protoc-gen-grpc-java.go index 1d4d33f02..e5291ab19 100644 --- a/pkg/plugin/grpc/grpcjava/protoc-gen-grpc-java.go +++ b/pkg/plugin/grpc/grpcjava/protoc-gen-grpc-java.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpc/grpcnode/BUILD.bazel b/pkg/plugin/grpc/grpcnode/BUILD.bazel index c773a1575..ddaecbb5f 100644 --- a/pkg/plugin/grpc/grpcnode/BUILD.bazel +++ b/pkg/plugin/grpc/grpcnode/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "grpcnode", srcs = ["protoc-gen-grpc-node.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcnode", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcnode", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/grpc/grpcnode/protoc-gen-grpc-node.go b/pkg/plugin/grpc/grpcnode/protoc-gen-grpc-node.go index 8478c0430..64d7dfe1a 100644 --- a/pkg/plugin/grpc/grpcnode/protoc-gen-grpc-node.go +++ b/pkg/plugin/grpc/grpcnode/protoc-gen-grpc-node.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpc/grpcweb/BUILD.bazel b/pkg/plugin/grpc/grpcweb/BUILD.bazel index 23184ca80..a4e6857bd 100644 --- a/pkg/plugin/grpc/grpcweb/BUILD.bazel +++ b/pkg/plugin/grpc/grpcweb/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "grpcweb", srcs = ["protoc-gen-grpc-web.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpc/grpcweb", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpc/grpcweb", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/grpc/grpcweb/protoc-gen-grpc-web.go b/pkg/plugin/grpc/grpcweb/protoc-gen-grpc-web.go index 93a6b9069..7974268dd 100644 --- a/pkg/plugin/grpc/grpcweb/protoc-gen-grpc-web.go +++ b/pkg/plugin/grpc/grpcweb/protoc-gen-grpc-web.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpcecosystem/grpcgateway/BUILD.bazel b/pkg/plugin/grpcecosystem/grpcgateway/BUILD.bazel index 31a2bfc89..c50ffd9d0 100644 --- a/pkg/plugin/grpcecosystem/grpcgateway/BUILD.bazel +++ b/pkg/plugin/grpcecosystem/grpcgateway/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "grpcgateway", srcs = ["protoc-gen-grpc-gateway.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/grpcecosystem/grpcgateway", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/grpcecosystem/grpcgateway", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway.go b/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway.go index 83d51f346..d5aef3d2a 100644 --- a/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway.go +++ b/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway_test.go b/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway_test.go index a904cc982..2aec10fcd 100644 --- a/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway_test.go +++ b/pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway_test.go @@ -3,7 +3,7 @@ package grpcgateway import ( "testing" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) const serviceEmpty = ` diff --git a/pkg/plugin/scalapb/scalapb/BUILD.bazel b/pkg/plugin/scalapb/scalapb/BUILD.bazel index 1c0fa8395..7be95d3e0 100644 --- a/pkg/plugin/scalapb/scalapb/BUILD.bazel +++ b/pkg/plugin/scalapb/scalapb/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "scalapb", srcs = ["protoc_gen_scala.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/scalapb/scalapb", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/scalapb", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/scalapb/scalapb/protoc_gen_scala.go b/pkg/plugin/scalapb/scalapb/protoc_gen_scala.go index 445c6c58a..87ed51a67 100644 --- a/pkg/plugin/scalapb/scalapb/protoc_gen_scala.go +++ b/pkg/plugin/scalapb/scalapb/protoc_gen_scala.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ScalaPBPluginName = "scalapb:scalapb:protoc-gen-scala" diff --git a/pkg/plugin/scalapb/scalapb/protoc_gen_scala_test.go b/pkg/plugin/scalapb/scalapb/protoc_gen_scala_test.go index d3f18b642..1a25ae72c 100644 --- a/pkg/plugin/scalapb/scalapb/protoc_gen_scala_test.go +++ b/pkg/plugin/scalapb/scalapb/protoc_gen_scala_test.go @@ -3,8 +3,8 @@ package scalapb_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/scalapb/scalapb" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/scalapb" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtoGenScalaPlugin(t *testing.T) { diff --git a/pkg/plugin/scalapb/zio_grpc/BUILD.bazel b/pkg/plugin/scalapb/zio_grpc/BUILD.bazel index 55f5a9800..db553399f 100644 --- a/pkg/plugin/scalapb/zio_grpc/BUILD.bazel +++ b/pkg/plugin/scalapb/zio_grpc/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "zio_grpc", srcs = ["protoc_gen_zio_grpc.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/scalapb/zio_grpc", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/zio_grpc", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc.go b/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc.go index 99919fe35..502713bb1 100644 --- a/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc.go +++ b/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc.go @@ -4,7 +4,7 @@ import ( "path" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ZioGrpcPluginName = "scalapb:zio-grpc:protoc-gen-zio-grpc" diff --git a/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc_test.go b/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc_test.go index 90f89e1e4..8ebfce021 100644 --- a/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc_test.go +++ b/pkg/plugin/scalapb/zio_grpc/protoc_gen_zio_grpc_test.go @@ -3,8 +3,8 @@ package zio_grpc_test import ( "testing" - "github.com/stackb/rules_proto/pkg/plugin/scalapb/zio_grpc" - "github.com/stackb/rules_proto/pkg/plugintest" + "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/zio_grpc" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtoGenZioGrpcPlugin(t *testing.T) { diff --git a/pkg/plugin/stackb/grpc_js/BUILD.bazel b/pkg/plugin/stackb/grpc_js/BUILD.bazel index d268d8d3b..5d6b899db 100644 --- a/pkg/plugin/stackb/grpc_js/BUILD.bazel +++ b/pkg/plugin/stackb/grpc_js/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "grpc_js", srcs = ["protoc-gen-grpc-js.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/stackb/grpc_js", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/stackb/grpc_js", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/stackb/grpc_js/protoc-gen-grpc-js.go b/pkg/plugin/stackb/grpc_js/protoc-gen-grpc-js.go index 4089e8c1d..87fe9d021 100644 --- a/pkg/plugin/stackb/grpc_js/protoc-gen-grpc-js.go +++ b/pkg/plugin/stackb/grpc_js/protoc-gen-grpc-js.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/stephenh/ts-proto/BUILD.bazel b/pkg/plugin/stephenh/ts-proto/BUILD.bazel index fc484d9e1..f76788fca 100644 --- a/pkg/plugin/stephenh/ts-proto/BUILD.bazel +++ b/pkg/plugin/stephenh/ts-proto/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "ts-proto", srcs = ["protoc-gen-ts-proto.go"], - importpath = "github.com/stackb/rules_proto/pkg/plugin/stephenh/ts-proto", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugin/stephenh/ts-proto", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto.go b/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto.go index fbaa852b0..9975ae0d8 100644 --- a/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto.go +++ b/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bazelbuild/bazel-gazelle/label" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto_test.go b/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto_test.go index 5a73ee574..2923d66cf 100644 --- a/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto_test.go +++ b/pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto_test.go @@ -3,8 +3,8 @@ package ts_proto_test import ( "testing" - ts_proto "github.com/stackb/rules_proto/pkg/plugin/stephenh/ts-proto" - "github.com/stackb/rules_proto/pkg/plugintest" + ts_proto "github.com/stackb/rules_proto/v4/pkg/plugin/stephenh/ts-proto" + "github.com/stackb/rules_proto/v4/pkg/plugintest" ) func TestProtocGenTsProtoPlugin(t *testing.T) { diff --git a/pkg/plugintest/BUILD.bazel b/pkg/plugintest/BUILD.bazel index cff7079fc..c763d12c3 100644 --- a/pkg/plugintest/BUILD.bazel +++ b/pkg/plugintest/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "doc.go", "utils.go", ], - importpath = "github.com/stackb/rules_proto/pkg/plugintest", + importpath = "github.com/stackb/rules_proto/v4/pkg/plugintest", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/plugintest/case.go b/pkg/plugintest/case.go index 4f5ba74d5..871443abc 100644 --- a/pkg/plugintest/case.go +++ b/pkg/plugintest/case.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // Cases is a utility function that runs a mapping of test cases. diff --git a/pkg/plugintest/utils.go b/pkg/plugintest/utils.go index dca729bfd..796b73f52 100644 --- a/pkg/plugintest/utils.go +++ b/pkg/plugintest/utils.go @@ -9,7 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // PluginConfigurationOption modifies a configuration in-place diff --git a/pkg/protoc/BUILD.bazel b/pkg/protoc/BUILD.bazel index 7847116c8..7752307ef 100644 --- a/pkg/protoc/BUILD.bazel +++ b/pkg/protoc/BUILD.bazel @@ -34,7 +34,7 @@ go_library( "syntaxutil.go", "yconfig.go", ], - importpath = "github.com/stackb/rules_proto/pkg/protoc", + importpath = "github.com/stackb/rules_proto/v4/pkg/protoc", visibility = ["//visibility:public"], deps = [ "@bazel_gazelle//config", diff --git a/pkg/rule/rules_cc/BUILD.bazel b/pkg/rule/rules_cc/BUILD.bazel index f954304f4..f657e33a1 100644 --- a/pkg/rule/rules_cc/BUILD.bazel +++ b/pkg/rule/rules_cc/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "grpc_cc_library.go", "proto_cc_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_cc", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_cc", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_cc/cc_library.go b/pkg/rule/rules_cc/cc_library.go index 7829c08ba..318b4bda3 100644 --- a/pkg/rule/rules_cc/cc_library.go +++ b/pkg/rule/rules_cc/cc_library.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) var ccLibraryKindInfo = rule.KindInfo{ diff --git a/pkg/rule/rules_cc/grpc_cc_library.go b/pkg/rule/rules_cc/grpc_cc_library.go index 14d9ddedc..f01ebdec5 100644 --- a/pkg/rule/rules_cc/grpc_cc_library.go +++ b/pkg/rule/rules_cc/grpc_cc_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_cc/proto_cc_library.go b/pkg/rule/rules_cc/proto_cc_library.go index 55be4704c..31b3e61b2 100644 --- a/pkg/rule/rules_cc/proto_cc_library.go +++ b/pkg/rule/rules_cc/proto_cc_library.go @@ -3,7 +3,7 @@ package rules_cc import ( "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_closure/BUILD.bazel b/pkg/rule/rules_closure/BUILD.bazel index b020a7c96..59bdb5753 100644 --- a/pkg/rule/rules_closure/BUILD.bazel +++ b/pkg/rule/rules_closure/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "grpc_closure_js_library.go", "proto_closure_js_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_closure", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_closure", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_closure/closure_js_library.go b/pkg/rule/rules_closure/closure_js_library.go index bed2a68dd..85904e3f6 100644 --- a/pkg/rule/rules_closure/closure_js_library.go +++ b/pkg/rule/rules_closure/closure_js_library.go @@ -9,7 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const transitiveDepsKey = "_transitive_proto_library_deps" diff --git a/pkg/rule/rules_closure/grpc_closure_js_library.go b/pkg/rule/rules_closure/grpc_closure_js_library.go index cb06b6de6..85ff74477 100644 --- a/pkg/rule/rules_closure/grpc_closure_js_library.go +++ b/pkg/rule/rules_closure/grpc_closure_js_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_closure/proto_closure_js_library.go b/pkg/rule/rules_closure/proto_closure_js_library.go index 5898c2fce..c8c22d1d4 100644 --- a/pkg/rule/rules_closure/proto_closure_js_library.go +++ b/pkg/rule/rules_closure/proto_closure_js_library.go @@ -3,7 +3,7 @@ package rules_closure import ( "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_go/BUILD.bazel b/pkg/rule/rules_go/BUILD.bazel index efc627602..544dd5fb9 100644 --- a/pkg/rule/rules_go/BUILD.bazel +++ b/pkg/rule/rules_go/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "rules_go", srcs = ["go_library.go"], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_go", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_go", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_go/go_library.go b/pkg/rule/rules_go/go_library.go index 8f8f62575..80ade94a1 100644 --- a/pkg/rule/rules_go/go_library.go +++ b/pkg/rule/rules_go/go_library.go @@ -11,7 +11,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_go/go_library_test.go b/pkg/rule/rules_go/go_library_test.go index 05e7c7861..d39e13e42 100644 --- a/pkg/rule/rules_go/go_library_test.go +++ b/pkg/rule/rules_go/go_library_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func TestGoLibraryRuleImportPath(t *testing.T) { diff --git a/pkg/rule/rules_java/BUILD.bazel b/pkg/rule/rules_java/BUILD.bazel index 8b43ae790..30f30d7b3 100644 --- a/pkg/rule/rules_java/BUILD.bazel +++ b/pkg/rule/rules_java/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "java_library.go", "proto_java_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_java", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_java", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_java/grpc_java_library.go b/pkg/rule/rules_java/grpc_java_library.go index f5d537b15..9ccd27b7e 100644 --- a/pkg/rule/rules_java/grpc_java_library.go +++ b/pkg/rule/rules_java/grpc_java_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_java/java_library.go b/pkg/rule/rules_java/java_library.go index 9dbe8548a..346e55054 100644 --- a/pkg/rule/rules_java/java_library.go +++ b/pkg/rule/rules_java/java_library.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) var javaLibraryKindInfo = rule.KindInfo{ diff --git a/pkg/rule/rules_java/proto_java_library.go b/pkg/rule/rules_java/proto_java_library.go index 9dae3b8b3..9278c4195 100644 --- a/pkg/rule/rules_java/proto_java_library.go +++ b/pkg/rule/rules_java/proto_java_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_nodejs/BUILD.bazel b/pkg/rule/rules_nodejs/BUILD.bazel index 3a744906a..c6f61e3d1 100644 --- a/pkg/rule/rules_nodejs/BUILD.bazel +++ b/pkg/rule/rules_nodejs/BUILD.bazel @@ -9,7 +9,7 @@ go_library( "proto_nodejs_library.go", "proto_ts_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_nodejs", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_nodejs", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_nodejs/grpc_nodejs_library.go b/pkg/rule/rules_nodejs/grpc_nodejs_library.go index d938f3735..8c24802bd 100644 --- a/pkg/rule/rules_nodejs/grpc_nodejs_library.go +++ b/pkg/rule/rules_nodejs/grpc_nodejs_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_nodejs/grpc_web_js_library.go b/pkg/rule/rules_nodejs/grpc_web_js_library.go index ec05662a6..4d7e6e24e 100644 --- a/pkg/rule/rules_nodejs/grpc_web_js_library.go +++ b/pkg/rule/rules_nodejs/grpc_web_js_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_nodejs/js_library.go b/pkg/rule/rules_nodejs/js_library.go index eff1b0cbd..002bed19f 100644 --- a/pkg/rule/rules_nodejs/js_library.go +++ b/pkg/rule/rules_nodejs/js_library.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) var jsLibraryKindInfo = rule.KindInfo{ diff --git a/pkg/rule/rules_nodejs/proto_nodejs_library.go b/pkg/rule/rules_nodejs/proto_nodejs_library.go index 6ac7cb1ac..008ea181e 100644 --- a/pkg/rule/rules_nodejs/proto_nodejs_library.go +++ b/pkg/rule/rules_nodejs/proto_nodejs_library.go @@ -3,7 +3,7 @@ package rules_nodejs import ( "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_nodejs/proto_ts_library.go b/pkg/rule/rules_nodejs/proto_ts_library.go index 153bff2e1..7d2220c47 100644 --- a/pkg/rule/rules_nodejs/proto_ts_library.go +++ b/pkg/rule/rules_nodejs/proto_ts_library.go @@ -10,7 +10,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_python/BUILD.bazel b/pkg/rule/rules_python/BUILD.bazel index e3712bc8f..9e083e25c 100644 --- a/pkg/rule/rules_python/BUILD.bazel +++ b/pkg/rule/rules_python/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "proto_py_library.go", "py_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_python", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_python", visibility = ["//visibility:public"], deps = [ "//pkg/protoc", diff --git a/pkg/rule/rules_python/grpc_py_library.go b/pkg/rule/rules_python/grpc_py_library.go index 5b33b3c1f..3df236325 100644 --- a/pkg/rule/rules_python/grpc_py_library.go +++ b/pkg/rule/rules_python/grpc_py_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_python/proto_py_library.go b/pkg/rule/rules_python/proto_py_library.go index fa4217c74..6f2e76604 100644 --- a/pkg/rule/rules_python/proto_py_library.go +++ b/pkg/rule/rules_python/proto_py_library.go @@ -3,7 +3,7 @@ package rules_python import ( "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_python/proto_py_library_test.go b/pkg/rule/rules_python/proto_py_library_test.go index 36da10a55..aa6a2cb5e 100644 --- a/pkg/rule/rules_python/proto_py_library_test.go +++ b/pkg/rule/rules_python/proto_py_library_test.go @@ -7,7 +7,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/google/go-cmp/cmp" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func makeTestProtoLibrary(cfg ...func(*rule.Rule)) *rule.Rule { diff --git a/pkg/rule/rules_python/py_library.go b/pkg/rule/rules_python/py_library.go index f189258d2..e5263e7b5 100644 --- a/pkg/rule/rules_python/py_library.go +++ b/pkg/rule/rules_python/py_library.go @@ -9,7 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) var pyLibraryKindInfo = rule.KindInfo{ diff --git a/pkg/rule/rules_python/py_library_test.go b/pkg/rule/rules_python/py_library_test.go index 857d3ee5b..30dc1577c 100644 --- a/pkg/rule/rules_python/py_library_test.go +++ b/pkg/rule/rules_python/py_library_test.go @@ -8,7 +8,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/google/go-cmp/cmp" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func TestMaybeStripImportPrefix(t *testing.T) { diff --git a/pkg/rule/rules_scala/BUILD.bazel b/pkg/rule/rules_scala/BUILD.bazel index cb993b9d7..2fbeffa13 100644 --- a/pkg/rule/rules_scala/BUILD.bazel +++ b/pkg/rule/rules_scala/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "scala_library.go", "scala_proto_library.go", ], - importpath = "github.com/stackb/rules_proto/pkg/rule/rules_scala", + importpath = "github.com/stackb/rules_proto/v4/pkg/rule/rules_scala", visibility = ["//visibility:public"], deps = [ "//pkg/plugin/akka/akka_grpc", diff --git a/pkg/rule/rules_scala/scala_library.go b/pkg/rule/rules_scala/scala_library.go index 932d3d918..4a5b2888d 100644 --- a/pkg/rule/rules_scala/scala_library.go +++ b/pkg/rule/rules_scala/scala_library.go @@ -13,9 +13,9 @@ import ( "github.com/bmatcuk/doublestar" "github.com/emicklei/proto" - "github.com/stackb/rules_proto/pkg/plugin/akka/akka_grpc" - "github.com/stackb/rules_proto/pkg/plugin/scalapb/scalapb" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/plugin/akka/akka_grpc" + "github.com/stackb/rules_proto/v4/pkg/plugin/scalapb/scalapb" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) const ( diff --git a/pkg/rule/rules_scala/scala_library_test.go b/pkg/rule/rules_scala/scala_library_test.go index 1b3d818f8..a5e9daa58 100644 --- a/pkg/rule/rules_scala/scala_library_test.go +++ b/pkg/rule/rules_scala/scala_library_test.go @@ -9,7 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/google/go-cmp/cmp" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) // TestGetJavaPackageOption shows that an import named in (scalapb.options) works as expected. diff --git a/pkg/rule/rules_scala/scala_proto_library.go b/pkg/rule/rules_scala/scala_proto_library.go index d8424fdc3..3300c7c03 100644 --- a/pkg/rule/rules_scala/scala_proto_library.go +++ b/pkg/rule/rules_scala/scala_proto_library.go @@ -6,7 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - "github.com/stackb/rules_proto/pkg/protoc" + "github.com/stackb/rules_proto/v4/pkg/protoc" ) func init() { diff --git a/rules/private/proto_repository_tools.bzl b/rules/private/proto_repository_tools.bzl index 2f7bbfc6d..1e4a1ae47 100644 --- a/rules/private/proto_repository_tools.bzl +++ b/rules/private/proto_repository_tools.bzl @@ -35,7 +35,7 @@ def _proto_repository_tools_impl(ctx): rules_proto_path = ctx.path(Label("@build_stack_rules_proto//:MODULE.bazel")) ctx.symlink( rules_proto_path.dirname, - "src/github.com/stackb/rules_proto", + "src/github.com/stackb/rules_proto/v4", ) env.update({ @@ -66,7 +66,7 @@ def _proto_repository_tools_impl(ctx): go_tool, "run", ctx.path(ctx.attr._list_repository_tools_srcs), - "-dir=src/github.com/stackb/rules_proto", + "-dir=src/github.com/stackb/rules_proto/v4", # Run it under 'check' to assert file is up-to-date "-check=rules/private/proto_repository_tools_srcs.bzl", # Run it under 'skip' to not check (only for internal testing) @@ -89,7 +89,7 @@ def _proto_repository_tools_impl(ctx): "all=-trimpath=" + env["GOPATH"], "-asmflags", "all=-trimpath=" + env["GOPATH"], - "github.com/stackb/rules_proto/cmd/gazelle", + "github.com/stackb/rules_proto/v4/cmd/gazelle", ] result = env_execute(ctx, args, environment = env) if result.return_code: