-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
APIv2: generated messages are incompatible with current v1 package #1014
Comments
😢 I’m pretty sure that this is going to be a sticky issue indefinitely. Some project will always end up with a stale version of the APIv1 package, and end up complaining that we broke compatibility or something like that. |
https://go-review.googlesource.com/c/protobuf/+/218939 adds a compile-time assertion on a future v1.4 of We'll remove this assertion after some period of time, but we think it's probably necessary for the initial release. |
We are seeing a similar problem when using
What exactly is the remediation here? |
This is a problem to file against |
Ok, thanks! |
gogo/protobuf#678 for tracking. |
@dsnet Actually, looking back at this issue, I think this is a compatibility issue with the new golang/protobuf changes. This is causing a major number of changes required across the container community. Basically, we're all stuck on v1.3 of golang/protobuf because any project using gogo is stuck. I've noticed quite a few changes in this project that might be making it very hard for users to move forward on this. Is there anything we can do to fix this? I have tens of projects that have protobuf (both golang and gogo) as a dependency with no way forward due to these breaks. On the other side of this issue, the upstream changes aren't really addressing any major problems we've had in the past that would warrant this level of work. |
Turns out it uses the new protobuf version under the hood, and there are backwards compatibility issues: golang/protobuf#1014
Turns out it uses the new protobuf version under the hood, and there are backwards compatibility issues: golang/protobuf#1014
Turns out it uses the new protobuf version under the hood, and there are backwards compatibility issues: golang/protobuf#1014
Turns out it uses the new protobuf version under the hood, and there are backwards compatibility issues: golang/protobuf#1014
The APIv2
protoc-gen-go
is generating code that doesn't work with the current APIv1 proto package, failing with a panic at runtime when passed to a v1 function:We will have an updated APIv1 package that's compatible with these messages, but that doesn't help the case when someone is using the older package. It's okay for new generated code to require newer package versions, but compatibility failures need to be detected at compile time (or, worst case, init time), not runtime.
The text was updated successfully, but these errors were encountered: