protobuf-rules-gen icon indicating copy to clipboard operation
protobuf-rules-gen copied to clipboard

Support for `optional` in `proto3`

Open nilsreichardt opened this issue 4 years ago • 1 comments

Description

If I'm using proto3 and try to use optional I get this error:

is a proto3 file that contains optional fields, but code generator protoc-gen-firebase_rules hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--firebase_rules_out

My proto file:

syntax = "proto3";

message User {
    optional string name = 1;
}

nilsreichardt avatar May 27 '21 22:05 nilsreichardt

I wonder why it doesn't support optional. Does this represent a challenge to implement?

Aren't optional values pretty important in regards to protobuf? For example isn't one reasonable way to "version" messages to use the optional keyword for future versions of a message when adding fields?

colin-williams avatar May 18 '23 22:05 colin-williams