-
Notifications
You must be signed in to change notification settings - Fork 328
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
Support Protobuf APIV2 #222
Comments
cc @spenczar |
This is a good set of questions. Thanks! Before getting into specifics, to make sure we're on the same page: Twirp generally has a bias towards pragmatism and keeping compatibility. Spencer set the tone in the announcement post, contrasting it on those two points with gRPC's requirement for http/2 and frequent refactors. Those remain important for Twirp's users (certainly the ones within Twitch). That sets guidelines for what changes won't be part of Twirp—but what changes will? The benefit of the change needs to outweigh the bias for stability. Maybe v2 / "v1.20" has significantly faster (de-)serialization, particularly for binary mode. Maybe v1 gets deprecated and everyone needs to move. Maybe the community moves to v2, and the shims required for v1 compatibility make v1 performance much worse. Those could be enough impetus to move to v2.
|
Greetings, We're working around this now by just shimming in a Will we get some buy in moving forward with this issue? |
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days |
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days |
The Go blog just posted that Protobuf's v2 work is officially released: https://blog.golang.org/a-new-go-api-for-protocol-buffers
While I haven't tried it out with Twirp yet, I just wanted to open an issue to track/answer some questions around this potentially breaking change.
The V1 of go's protobuf library has lived and still does in
github.com/golang/protobuf
while the new version now lives ingoogle.golang.org/protobuf
-- Therefore I will be referring to those import paths above in this issue to indicate which version I am referring to.Will Twirp adopting the new protobuf library mean a breaking change for everyone? The blog claims that golang/protobuf v1.4 uses google.golang.org/protobuf under the hood, so maybe that's the first step into migration?
If golang/protobuf v1.4 actually does work with Twirp well, does that mean all Twirp clients must upgrade to v1.4 if the server is using v1.4?
Should Twirp's new major version release (or the one after) incorporate generating the
.twirp.go
file with the new protobuf library?Are any of the new features mentioned in
google.golang.org/protobuf
useful for Twirp in a way that we couldn't do before? Such as printing defaults in json etc.The text was updated successfully, but these errors were encountered: