-
Notifications
You must be signed in to change notification settings - Fork 10.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
Use new protobuf serialization/deserialization API in C# marshallers #23485
Conversation
@JamesNK @JunTaoLuo feel free to review to changes to the C# generator (the rest of the stuff is bumping protobuf dependency and regenerating code). |
Exciting. Can you confirm my understanding of how it will work:
|
Yes, and I like that we don't need a protoc flag because that would add a whole lot of complexity.
Yes, if you're using Grpc.Tools and upgrade to vNext, that will automatically give you a new version of both
Yes, but If you are using GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE, you'll still need to define GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION (because currently we're not checking I'd still like to benchmark to see what's the impact on performance (we can now avoid some copies and allocations, which should be very noticeable especially for large messages). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. When it is checked in I can use the preview package from the nightly feed to measure results.
I started an adhoc package build: sponge/2438292f-625d-4905-87fd-6ca36d137e8c (I'll post the public link to nugets later). |
The link to download adhoc-built nugets: |
I created a PR for upgrade to 3.13.0 #23855. |
This is basically blocked by #23855. |
cf03936
to
6458840
Compare
6458840
to
94ecb37
Compare
94ecb37
to
c1c268f
Compare
#23855 has been merged, so I rebased. The tests were passing before so this should work well. |
CC @markdroth once a get an LGTM from @apolcyn this PR is good to merge. |
I tested this build with grpc-dotnet and the test app run successfully. Once this PR is merged I'll update grpc-dotnet to use the latest nightly build of Grpc.Tools, and run all unit tests with it. |
Does that explain googleapis/gax-dotnet#420? Currently I don't have information about what's broken, but I'm expecting it's something like:
Once I've got more information, I'll probably try to reproduce it and file a new issue - I think it's a bit of a problem if all dependencies have to be regenerated. |
Based on #23855 (protobuf 3.13.0 support the new C# (de)serialization)
Update grpc stub codegen to use the new serialization / deserialization API (see protocolbuffers/protobuf#7576 and protocolbuffers/protobuf#7351)
Inspired by #21653, but this PR is simpler and supersedes it.