Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Use gogo/protobuf #1746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iwaseyusuke
Copy link
Contributor

This patch fixes to migrate from protoc-gen-go to protoc-gen-gogofast.

Please note that with protoc-gen-gogo*, we need specify "M" parameters to override the well known types (e.g. any.Any of "google/protobuf").

Example of protoc command:

$ go get -u -v github.com/gogo/protobuf/protoc-gen-gogofast
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf \
    -I=${GOBGP}/api \
    --gogofast_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto

This patch fixes to migrate from protoc-gen-go to protoc-gen-gogofast.

Please note that with protoc-gen-gogo*, we need specify "M" parameters
to override the well known types (e.g. any.Any of "google/protobuf").

Example of protoc command:
$ go get -u -v github.com/gogo/protobuf/protoc-gen-gogofast
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf \
    -I=${GOBGP}/api \
    --gogofast_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto

Signed-off-by: IWASE Yusuke <[email protected]>
@fenollp
Copy link

fenollp commented Mar 22, 2024

I believe gogoproto died after Go's v2 of protobuf. This is alive though may be too binary-incompatible: https://github.com/planetscale/vtprotobuf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants