3

I'm using gogo/protobuf to generate protobufs for gRPC calls but recently they started failing due a marshalling method not being correctly generated. The error looks like this:

service/v1/service.pb.go:1347:27: m.ListMeta.MarshalToSizedBuffer undefined (type *"k8s.io/apimachinery/pkg/apis/meta/v1".ListMeta has no field or method MarshalToSizedBuffer)

I've tried reinstalling go and goenv, using a different gvm, and reverting changes to the proto files. The issue seems to resolve on our last stable branch of our proto files but if I make any changes the issue recurs. This is across two repos, one (proto files repo) using golang 1.11.1 and the other using golang 1.12.5.

I expected all methods that the protobufs needed to be generated in using the package.

ntalcus
  • 31
  • 3

1 Answers1

0

We resolved this issue by fixing the dependencies to a prior working version and upping our different golang repo's to be in the same major version.

ntalcus
  • 31
  • 3
  • Please, can you be more explicit on how did you fix this, Would appreciate your help. I want to know how did you fix the dependencies. – Invictus Sep 03 '19 at 22:25
  • Hi, Invictus. I was a bit imprecise in my wording. We fixed the versioning of dependencies that we were using in our repository to a set we knew had worked in the past. – ntalcus Nov 11 '19 at 04:37