We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
optional
proto3 has restored optional, so for a field
syntax = "proto3"; message X { optional bool mybool = 1; }
we regain the ability to distinguish between
has_mybool()
mybool()
as in proto2.
optional is optional. If a field is marked optional in proto3, we get the proto2 behavior.
See https://developers.google.com/protocol-buffers/docs/proto3#specifying_field_rules.
We should consider adopting optional, moving away from wrappers like google.protobuf.UInt32Value.
google.protobuf.UInt32Value
If we created a clean proto, it could just be like:
syntax = "proto3"; message BenchmarkSpec { optional uint32 requests_per_second = 1 [(validate.rules).uint32 = {gte: 1, lte: 1000000}]; optional uint32 connections = 2 [(validate.rules).uint32 = {gte: 1, lte: 1000000}]; // ...
The gRPC service would be surprisingly easy to update. Maybe:
message StartRequest { oneof opts { CommandLineOptions options = 1; BenchmarkSpec benchmark_spec = 2; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
proto3 has restored
optional
, so for a fieldwe regain the ability to distinguish between
has_mybool()
false)has_mybool()
true,mybool()
false)as in proto2.
optional
is optional. If a field is markedoptional
in proto3, we get the proto2 behavior.See https://developers.google.com/protocol-buffers/docs/proto3#specifying_field_rules.
We should consider adopting
optional
, moving away from wrappers likegoogle.protobuf.UInt32Value
.If we created a clean proto, it could just be like:
The gRPC service would be surprisingly easy to update. Maybe:
The text was updated successfully, but these errors were encountered: