Closed bsr203 closed 3 years ago
Duplicate of #1033.
The generated import paths for the well-known types is not determined by our module, but rather by a release of the main protobuf toolchain itself.
The relevant changes have already been made to https://github.com/protocolbuffers/protobuf and is only blocked on a new release of the protobuf toolchain. There's nothing left that we can do on our end in this module.
thank you.
Hello,
I posted this on golang-nuts, but hope to reach the maintainers here.
I am coming back to a project after few months, and done upgrading to the latest libraries, but the generated code still points to deprecated versions. I read the blog post, and docs followed the instructions to install and use the library. Please see the below example. I was expecting github.com/golang/protobuf/proto -> google.golang.org/protobuf/proto github.com/golang/protobuf/ptypes/timestamp -> google.golang.org/protobuf/types/known/timestamppb
I see a recent commit to remove legacy proto import, but concerned about
timestamp
. My code usesgoogle.golang.org/protobuf/types/known/timestamppb
, but generatedgithub.com/golang/protobuf/ptypes/timestamp
. How can I change it to point to same.Thanks bsr
proto: (source https://developers.google.com/protocol-buffers/docs/gotutorial)
command:
$ protoc-gen-go --version protoc-gen-go v1.25.0
protoc -I=. --go_out=. ./addressbook.proto
generated code: