From 6a6d5f0a520b52d66e37670f65e5e466c0add512 Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Tue, 3 Dec 2024 13:24:48 -0600 Subject: [PATCH] fix: revert replace use of github.com/golang/protobuf/proto (#1534)" This reverts commit b9f8777913ed19a4c6de375857364133a92c63f7. This was breaking `go build` --- cmd/gapic-showcase/gapic-showcase.go | 2 +- server/services/echo_service_test.go | 2 +- server/services/iam_policy_service.go | 2 +- server/services/identity_service.go | 2 +- server/services/identity_service_test.go | 2 +- server/services/messaging_service.go | 2 +- server/services/messaging_service_test.go | 2 +- server/services/operations_service.go | 2 +- server/services/operations_service_test.go | 2 +- server/services/testing_service_test.go | 2 +- server/session_test.go | 2 +- server/spec/v1/unary.go | 2 +- server/spec/v1/unary_test.go | 2 +- server/waiter.go | 2 +- server/waiter_test.go | 2 +- util/genrest/internal/pbinfo/pbinfo.go | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cmd/gapic-showcase/gapic-showcase.go b/cmd/gapic-showcase/gapic-showcase.go index 55cc2036e..f2e733de8 100644 --- a/cmd/gapic-showcase/gapic-showcase.go +++ b/cmd/gapic-showcase/gapic-showcase.go @@ -9,8 +9,8 @@ import ( "os" "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" "github.com/spf13/cobra" - "google.golang.org/protobuf/proto" ) var Verbose, OutputJSON bool diff --git a/server/services/echo_service_test.go b/server/services/echo_service_test.go index 1cc81a83c..b38bb3c11 100644 --- a/server/services/echo_service_test.go +++ b/server/services/echo_service_test.go @@ -24,6 +24,7 @@ import ( "testing" "time" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" durpb "github.com/golang/protobuf/ptypes/duration" pb "github.com/googleapis/gapic-showcase/server/genproto" @@ -33,7 +34,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" durationpb "google.golang.org/protobuf/types/known/durationpb" ) diff --git a/server/services/iam_policy_service.go b/server/services/iam_policy_service.go index 45043c888..f2e30481a 100644 --- a/server/services/iam_policy_service.go +++ b/server/services/iam_policy_service.go @@ -19,9 +19,9 @@ import ( "sync" iampb "cloud.google.com/go/iam/apiv1/iampb" + "github.com/golang/protobuf/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) var missingResource error = status.Error(codes.InvalidArgument, "Missing required argument: resource") diff --git a/server/services/identity_service.go b/server/services/identity_service.go index af3d651dd..2c9a0e823 100644 --- a/server/services/identity_service.go +++ b/server/services/identity_service.go @@ -19,13 +19,13 @@ import ( "fmt" "sync" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/empty" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) // NewIdentityServer returns a new instance of showcase identity server. diff --git a/server/services/identity_service_test.go b/server/services/identity_service_test.go index 848592728..799d56813 100644 --- a/server/services/identity_service_test.go +++ b/server/services/identity_service_test.go @@ -20,12 +20,12 @@ import ( "strings" "testing" + "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/fieldmaskpb" ) diff --git a/server/services/messaging_service.go b/server/services/messaging_service.go index 37e496c3b..63a1e0cd7 100644 --- a/server/services/messaging_service.go +++ b/server/services/messaging_service.go @@ -25,6 +25,7 @@ import ( "time" "cloud.google.com/go/longrunning/autogen/longrunningpb" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/empty" "github.com/googleapis/gapic-showcase/server" @@ -32,7 +33,6 @@ import ( errdetails "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) // NewMessagingServer returns an instance of a messaging server. diff --git a/server/services/messaging_service_test.go b/server/services/messaging_service_test.go index dfdbdf6cf..e251ce753 100644 --- a/server/services/messaging_service_test.go +++ b/server/services/messaging_service_test.go @@ -24,6 +24,7 @@ import ( "testing" "time" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/timestamp" "github.com/google/go-cmp/cmp" @@ -32,7 +33,6 @@ import ( "golang.org/x/sync/errgroup" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/fieldmaskpb" ) diff --git a/server/services/operations_service.go b/server/services/operations_service.go index 31c4eaf05..c6b86445c 100644 --- a/server/services/operations_service.go +++ b/server/services/operations_service.go @@ -23,13 +23,13 @@ import ( "time" lropb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/empty" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) // NewOperationsServer returns a new OperationsServer for the Showcase API. diff --git a/server/services/operations_service_test.go b/server/services/operations_service_test.go index 60104a232..c10f3880e 100644 --- a/server/services/operations_service_test.go +++ b/server/services/operations_service_test.go @@ -22,12 +22,12 @@ import ( "time" lropb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) func TestGetOperation_wait(t *testing.T) { diff --git a/server/services/testing_service_test.go b/server/services/testing_service_test.go index 5cf5f04f3..d8a87bf8d 100644 --- a/server/services/testing_service_test.go +++ b/server/services/testing_service_test.go @@ -19,12 +19,12 @@ import ( "encoding/base64" "testing" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" ) func Test_Session_lifecycle(t *testing.T) { diff --git a/server/session_test.go b/server/session_test.go index da9f4eb41..9f74c8c77 100644 --- a/server/session_test.go +++ b/server/session_test.go @@ -18,9 +18,9 @@ import ( "context" "testing" + "github.com/golang/protobuf/proto" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc" - "google.golang.org/protobuf/proto" ) func TestSessionProto(t *testing.T) { diff --git a/server/spec/v1/unary.go b/server/spec/v1/unary.go index c6544ed6a..02925d3bd 100644 --- a/server/spec/v1/unary.go +++ b/server/spec/v1/unary.go @@ -20,10 +20,10 @@ import ( "fmt" "sync" + "github.com/golang/protobuf/proto" "github.com/googleapis/gapic-showcase/server" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc" - "google.golang.org/protobuf/proto" ) type unaryTest struct { diff --git a/server/spec/v1/unary_test.go b/server/spec/v1/unary_test.go index 5191a7505..4b0fa7e5f 100644 --- a/server/spec/v1/unary_test.go +++ b/server/spec/v1/unary_test.go @@ -18,9 +18,9 @@ import ( "context" "testing" + "github.com/golang/protobuf/proto" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/grpc" - "google.golang.org/protobuf/proto" ) func Test_unaryTest_GetName(t *testing.T) { diff --git a/server/waiter.go b/server/waiter.go index d171eb66d..3b2bb434a 100644 --- a/server/waiter.go +++ b/server/waiter.go @@ -20,9 +20,9 @@ import ( "time" lropb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" pb "github.com/googleapis/gapic-showcase/server/genproto" - "google.golang.org/protobuf/proto" ) var waiterSingleton Waiter = &waiterImpl{ diff --git a/server/waiter_test.go b/server/waiter_test.go index a8e84f6c3..90ccdcb0f 100644 --- a/server/waiter_test.go +++ b/server/waiter_test.go @@ -21,11 +21,11 @@ import ( "time" lropb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/timestamp" pb "github.com/googleapis/gapic-showcase/server/genproto" "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/protobuf/proto" ) func TestGetWaiterInstance(t *testing.T) { diff --git a/util/genrest/internal/pbinfo/pbinfo.go b/util/genrest/internal/pbinfo/pbinfo.go index 9ee97b773..d11d01b38 100644 --- a/util/genrest/internal/pbinfo/pbinfo.go +++ b/util/genrest/internal/pbinfo/pbinfo.go @@ -25,8 +25,8 @@ import ( "strings" "unicode" + "github.com/golang/protobuf/proto" "github.com/golang/protobuf/protoc-gen-go/descriptor" - "google.golang.org/protobuf/proto" ) // ProtoType represents a type in protobuf descriptors.