Groups
Groups
Sign in
Groups
Groups
Protocol Buffers
Conversations
About
Send feedback
Help
We are getting "ProtoPackageIsVersion4" for Go, but what should we update? I thought google.golang.org was the future?
29 views
Skip to first unread message
Christoffer Pettersson
unread,
Apr 16, 2020, 6:52:23 AM
4/16/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
Hey
We are confused about something.
When we generate our .proto files, they are now referring to:
import (
reflect "reflect"
sync "sync"
proto "
github.com/golang/protobuf/proto
"
protoreflect "
google.golang.org/protobuf/reflect/protoreflect
"
protoimpl "
google.golang.org/protobuf/runtime/protoimpl
"
)
According to FAQ, it says it is because we are using an old version of
github.com/golang/protobuf
:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#enforce-version-apiv1
But everywhere it says
google.golang.org/protobuf
should be used, and not
github.com/golang/protobuf
So this is really confusing.
We are using protoc version 3.11.4 (the latest) and protoc-gen-go 1.21 (the latest) and using Protocol Buffers v3 syntax.
Why is protoc 3.11.4 and protoc-gen-go stil use
github.com
and not
google.golang.org
?
And how do fix it? Is it possible to make protoc-gen-go use
google.golang.org
for the auto-generated Go-files?
Thanks for any response,
// Christoffer
https://developers.google.com/protocol-buffers/docs/reference/go/faq#enforce-version-apiv1
https://developers.google.com/protocol-buffers/docs/reference/go/faq#enforce-version-apiv1
Reply all
Reply to author
Forward
0 new messages