-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
What is the problem you're trying to solve
We'd like to migrate off from github.com/gogo/protobuf. The package is looking for owners since 2020 and no longer compatible with https://go.dev/blog/protobuf-apiv2.
This is the master ticket to associate all PRs related to the migration.
Describe the solution you'd like
Use google.golang.org/protobuf instead.
We have removed gogo/protobuf and upgraded protobuf on the following packages.
https://github.com/containerd/protobuild
https://github.com/containerd/ttrpc
- Use google.golang.org/protobuf instead of github.com/gogo/protobuf ttrpc#99
- Add protoc-gen-go-ttrpc ttrpc#96
gogo/protobuf's code generation extension
There are multiple gogo/protobuf extensions which don't work with protoc-gen-go. That being said, those types are mostly invisible from our Go client. So we might be able to just follow Google's new convention (e.g. using protobuf's Time instead time.Time) instead of making them fully Go-idiomatic.
- gogoproto.nullable (used in 71 places): protoc-gen-go: support generating structs with non-pointer message fields golang/protobuf#1225
- gogoproto.stdtime (27): protoc-gen-go: support generating standard Go types in place of well-known-types golang/protobuf#414
- gogoproto.customename (5): Google's protoc-gen-go doesn't generate Go-idiomatic code in terms of capitalizing acronyms. For example
cpuin proto becomesCpu, notCPU. We are discussing about the issue in protoc-gen-gogoctrd wouldn't work without gogo/protobuf #6219. - gogoproto.unmarshaller_all (1): This one and the below are only used by pkg/runtimeoptions/v1/api.proto.
- gogoproto.stringer_all (1)
- gogoproto.sizer_all (1)
- gogoproto.marshaler_all (1)
- gogoproto.goproto_unregonized_all (1)
- gogoproto.goproto_stringer_all (1)
- gogoproto.goproto_getters_all (1)
Addressed
Fixed by #6699
- gogoproto.customtype (10): All of them are used to use
github.com/opencontainers/go-digest.Digestinstead of string.
Fixed by #6708
- gogoproto.enum_customname
- gogoproto.goproto_enum_prefix: protoc-gen-go: remove type name from generated enum golang/protobuf#513
- gogoproto.enumvalue_customname
Metadata
Metadata
Assignees
Labels
Type
Projects
Status