Skip to content
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

Add support for proto3 optional #156

Closed
wants to merge 4 commits into from

Conversation

@Tim-Zhang Tim-Zhang force-pushed the optional-support-2.x branch from f5591e2 to c61e277 Compare August 24, 2022 10:09
@Tim-Zhang Tim-Zhang marked this pull request as draft August 24, 2022 10:09
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #156 (8ad8f2f) into master (4f1e5f1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   26.00%   26.00%           
=======================================
  Files          16       16           
  Lines        2415     2415           
=======================================
  Hits          628      628           
  Misses       1787     1787           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Got error:
protoc --rust_out=. --ttrpc_out=. --plugin=protoc-gen-ttrpc=`which ttrpc_rust_plugin` test.proto
test.proto: is a proto3 file that contains optional fields, but code generator
protoc-gen-ttrpc hasn't been updated to support optional fields in proto3.
Please ask the owner of this code generator to support proto3 optional.--ttrpc_out:

According to the doc: https://github.com/protocolbuffers/protobuf/blob/main/docs/implementing_proto3_presence.md#signaling-that-your-code-generator-supports-proto3-optional

Although ttrpc-compiler have already supported `proto3 optionals`, code can't be generated using `protoc` unless we signal that we support `proto3 optionals`

Signed-off-by: Tim Zhang <[email protected]>
@Tim-Zhang Tim-Zhang force-pushed the optional-support-2.x branch from c61e277 to 2a3b86c Compare August 24, 2022 11:42
@Tim-Zhang Tim-Zhang changed the title Signal that ttrpc-compiler supports proto3 optionals Add support for proto3 optionals Aug 24, 2022
@Tim-Zhang
Copy link
Member Author

Wait for pr stepancheg/rust-protobuf#649

bump protobuf to 2.27.1

Signed-off-by: Tim Zhang <[email protected]>
And bump protobuf to 2.27.1

Signed-off-by: Tim Zhang <[email protected]>
Add a optional field to health.proto.

Signed-off-by: Tim Zhang <[email protected]>
@Tim-Zhang Tim-Zhang force-pushed the optional-support-2.x branch from 2a3b86c to 8ad8f2f Compare August 24, 2022 11:50
@Tim-Zhang Tim-Zhang changed the title Add support for proto3 optionals Add support for proto3 optional Sep 7, 2022
@Tim-Zhang Tim-Zhang closed this Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant