From 0e9a819d72bdaec2b68e47fe965d486b63fa7196 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 18 Jan 2022 13:15:33 -0500 Subject: [PATCH] Regenerate Protocol Buffers Go code to remove dependency on deprecated Go module (#140) Reference: https://github.com/golang/protobuf/pull/1306 This does not appear to be generating any meaningful differences. Updated via: ```console pushd tfprotov5/internal/tfplugin5 ./generate.sh popd pushd tfprotov6/internal/tfplugin6 ./generate.sh popd go mod tidy ``` --- go.mod | 1 - tfprotov5/internal/tfplugin5/tfplugin5.pb.go | 9 ++----- .../internal/tfplugin5/tfplugin5_grpc.pb.go | 25 +++++++++++++------ tfprotov6/internal/tfplugin6/tfplugin6.pb.go | 9 ++----- .../internal/tfplugin6/tfplugin6_grpc.pb.go | 4 +++ 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index a1708112..86ee5ab2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/hashicorp/terraform-plugin-go go 1.16 require ( - github.com/golang/protobuf v1.4.3 github.com/google/go-cmp v0.5.6 github.com/hashicorp/go-hclog v1.1.0 github.com/hashicorp/go-plugin v1.4.3 diff --git a/tfprotov5/internal/tfplugin5/tfplugin5.pb.go b/tfprotov5/internal/tfplugin5/tfplugin5.pb.go index 793eed7a..706b8dad 100644 --- a/tfprotov5/internal/tfplugin5/tfplugin5.pb.go +++ b/tfprotov5/internal/tfplugin5/tfplugin5.pb.go @@ -19,14 +19,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.3 // source: tfplugin5.proto package tfplugin5 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -40,10 +39,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StringKind int32 const ( diff --git a/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go b/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go index 2a1c19ad..37fef965 100644 --- a/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go +++ b/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.3 +// source: tfplugin5.proto package tfplugin5 @@ -11,6 +15,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ProviderClient is the client API for Provider service. @@ -223,8 +228,8 @@ type UnsafeProviderServer interface { mustEmbedUnimplementedProviderServer() } -func RegisterProviderServer(s *grpc.Server, srv ProviderServer) { - s.RegisterService(&_Provider_serviceDesc, srv) +func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) { + s.RegisterService(&Provider_ServiceDesc, srv) } func _Provider_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -443,7 +448,10 @@ func _Provider_Stop_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } -var _Provider_serviceDesc = grpc.ServiceDesc{ +// Provider_ServiceDesc is the grpc.ServiceDesc for Provider service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Provider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tfplugin5.Provider", HandlerType: (*ProviderServer)(nil), Methods: []grpc.MethodDesc{ @@ -537,7 +545,7 @@ func (c *provisionerClient) ValidateProvisionerConfig(ctx context.Context, in *V } func (c *provisionerClient) ProvisionResource(ctx context.Context, in *ProvisionResource_Request, opts ...grpc.CallOption) (Provisioner_ProvisionResourceClient, error) { - stream, err := c.cc.NewStream(ctx, &_Provisioner_serviceDesc.Streams[0], "/tfplugin5.Provisioner/ProvisionResource", opts...) + stream, err := c.cc.NewStream(ctx, &Provisioner_ServiceDesc.Streams[0], "/tfplugin5.Provisioner/ProvisionResource", opts...) if err != nil { return nil, err } @@ -613,8 +621,8 @@ type UnsafeProvisionerServer interface { mustEmbedUnimplementedProvisionerServer() } -func RegisterProvisionerServer(s *grpc.Server, srv ProvisionerServer) { - s.RegisterService(&_Provisioner_serviceDesc, srv) +func RegisterProvisionerServer(s grpc.ServiceRegistrar, srv ProvisionerServer) { + s.RegisterService(&Provisioner_ServiceDesc, srv) } func _Provisioner_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -692,7 +700,10 @@ func _Provisioner_Stop_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -var _Provisioner_serviceDesc = grpc.ServiceDesc{ +// Provisioner_ServiceDesc is the grpc.ServiceDesc for Provisioner service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Provisioner_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tfplugin5.Provisioner", HandlerType: (*ProvisionerServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/tfprotov6/internal/tfplugin6/tfplugin6.pb.go b/tfprotov6/internal/tfplugin6/tfplugin6.pb.go index 332ece40..b0401ed8 100644 --- a/tfprotov6/internal/tfplugin6/tfplugin6.pb.go +++ b/tfprotov6/internal/tfplugin6/tfplugin6.pb.go @@ -19,14 +19,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.23.0 -// protoc v3.15.6 +// protoc-gen-go v1.27.1 +// protoc v3.19.3 // source: tfplugin6.proto package tfplugin6 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -40,10 +39,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StringKind int32 const ( diff --git a/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go b/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go index 957e9d23..3ae65545 100644 --- a/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go +++ b/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.3 +// source: tfplugin6.proto package tfplugin6