Skip to content

How to handle compatibility issues with v1.4? #1126

Closed
@RainbowMango

Description

@RainbowMango

The struct type InternalMessageInfo has been deprecated by github.com/golang/protobuf@v1.4.0:

// Deprecated: Do not use.
type InternalMessageInfo struct{}
func (*InternalMessageInfo) DiscardUnknown(Message) { panic("not implemented") }
func (*InternalMessageInfo) Marshal([]byte, Message, bool) ([]byte, error) { panic("not implemented") }
func (*InternalMessageInfo) Merge(Message, Message) { panic("not implemented") }
func (*InternalMessageInfo) Size(Message) int { panic("not implemented") }
func (*InternalMessageInfo) Unmarshal(Message, []byte) error { panic("not implemented") }

But there are a whole bunch of modules still using *.pb.go file which contains a reference of InternalMessageInfo, such as

Kubernetes wants to involve a new module version which depends on github.com/golang/protobuf@v1.4.0, but this work has been blocked as several modules in Kubernetes' vendor still referring InternalMessageInfo, more details please refer to kubernetes/kubernetes#90582 (comment).

Does it's the right approach to update all those modules by re-compile *.proto?
If yes, there are two protoc-gen-go, one and two, which one should I choose? and should I use the latest version?

@dsnet I will be appreciate if you can give some guidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions