Actual behavior
with the latest protoc-gen-go-grpc, to fix the MustEmbedUnimplemented** we need to add v0.UnimplementedCorpServiceServer to the server struct.
Once we add that to the server provider, mockgen generates a server interface including mustEmbedUnimplementedCorpServiceServer() method but mocked NewMockCorpServiceServer which returns a MockCorpServiceServer lacks that method.
so these 2 types are not matching up and we get a Cannot use type MockCorpServiceServer as type v0.CorpServiceServer
Expected behavior
NewMockCorpServiceServer to mock the server correctly based on latest protoc grpc udpates
To Reproduce Steps to reproduce the behavior
update protoc-gen-go-grpc to v1.1.0
this issue started happening when
google.golang.org/protobuf was updated to 1.26.0
google.golang.org/grpc package was updated to 1.37.0
golang/mock was updated to 1.5.0
gomock mode is reflect
go version go1.16.3 darwin/amd64
here is the mockgen cmd I am running
mockgen -destination mocks/server_mock.go -package mocks github.com/signalsciences/sigsci/pod/proto/corp/v0 CorpServiceServer
Actual behavior with the latest protoc-gen-go-grpc, to fix the MustEmbedUnimplemented** we need to add v0.UnimplementedCorpServiceServer to the server struct. Once we add that to the server provider, mockgen generates a server interface including
mustEmbedUnimplementedCorpServiceServer()
method but mocked NewMockCorpServiceServer which returns a MockCorpServiceServer lacks that method. so these 2 types are not matching up and we get a Cannot use type MockCorpServiceServer as type v0.CorpServiceServerExpected behavior NewMockCorpServiceServer to mock the server correctly based on latest protoc grpc udpates
To Reproduce Steps to reproduce the behavior update protoc-gen-go-grpc to v1.1.0
this issue started happening when google.golang.org/protobuf was updated to 1.26.0 google.golang.org/grpc package was updated to 1.37.0 golang/mock was updated to 1.5.0
gomock mode is reflect go version go1.16.3 darwin/amd64
here is the mockgen cmd I am running
mockgen -destination mocks/server_mock.go -package mocks github.com/signalsciences/sigsci/pod/proto/corp/v0 CorpServiceServer