I am upgrading all the libraries(go, protoc, grpc) we use. Once I updated the protoc compiler , protoc-gen-go and regenerated the protos. Some of the structs in the pb.go file have new meta fields/variables added- state, sizeCache,unknownFields. These did not exist in the old pb file.
type x struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
a int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
b []byte `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
c string `protobuf:"bytes,3,opt,name=c,proto3" json:"c,omitempty"`
}
So addition of these fields results in compilation error, when creating this struct with the existing code. Are these fields something that needs to be taken care of by the code?