-
Notifications
You must be signed in to change notification settings - Fork 1.6k
devsite: add github.com/golang/protobuf to google.golang.org/protobuf migration guide #1075
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
Comments
Ah, the new file is being written to a different location. I'll open another ticket. |
That's an odd error. Is |
No it's a custom struct. I opened a separate ticket for that issue at #1076. |
Another issue I hope an upgrade guide would cover is how or whether utility functions like |
You'd be interested in https://go-review.googlesource.com/c/protobuf/+/225298 |
I'd also be interested in a migration document and status on things like ptypes. Switching imports to "google.golang.org/protobuf/proto" was seamless , but protoc-gen-go still generates pb.go files that reference v1 imports, and I don't see any new FileOptions in https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto or new parameters to protoc-gen-go that would force v2 generation, so my projects all have the v1 and v2 packages in them now. Getting to just v2 packages would be great. |
The migration plan for the well-known types is still being worked on. https://go-review.googlesource.com/c/protobuf/+/225298 generates first-class support for well-known types directly into the generated packages. |
Colleagues, the ptypes.MarshalAny and ptypes.UnmarshalAny methods did not migrate to google.golang.org/protobuf, but they remained in the example and now it’s not clear how to unmarshal any on a struct. |
You are correct. In the v1.20.0 release notes, there are several portions of the old API that do not yet have an equivalent replacement in the
A moral replacement for |
Thank you, @dsnet! |
Is there a document anywhere that describes how to upgrade a v1 project to a v2 project? There is a blog post, however it isn't comprehensive. I tried searching both in this repository and in https://github.com/protocolbuffers/protobuf-go.
Currently, I'm running into this error, and I'm unsure how to resolve it. (I can open this specific instance as a separate issue. However, were an upgrade guide to exist, I presume that it would describe how to address the problem I'm running into.)
I am attempting to regenerate protobuf files using the new protoc-gen-go however the generated file is identical to the old file so I'm unsure what I'm missing.
The text was updated successfully, but these errors were encountered: