-
Notifications
You must be signed in to change notification settings - Fork 76
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
[feature request] proto3 optional #75
Comments
This changes adds the optional support to the code generation response. It unconditionally adds this flag as the support should come in the generator using this library. This is done to avoid generators fail when someone is making a call to `protoc` with the experimental flag. Closes lyft#75
This changes adds the optional support to the code generation response. It unconditionally adds this flag as the support should come in the generator using this library. Closes lyft#75
please merge commits |
This changes adds the optional support to the code generation response. It unconditionally adds this flag as the support should come in the generator using this library. Closes lyft#75
I think #85 potentially missed out on re-defining how an The following explanation is no longer entirely accurate in
Hence shouldn't the following snippet in func (s *scalarT) IsOptional() bool {
return !s.fld.Syntax().SupportsRequiredPrefix() || s.ProtoLabel() == Optional
} be updated to just: func (s *scalarT) IsOptional() bool {
return s.ProtoLabel() == Optional
} |
Good catch @sarthak40, I think so. I also think that the check is a little bit convoluted...checking if optional is supported by testing if required is not supported before? 🤔 Anyway, yeah I think that it should be removed but we need to careful notifying as people relying on this boolean test would now suddenly see processes launching that weren't triggering before. |
I guess its a good thing that we advertise this as an unstable api spec in the readme then 😄 |
any plan to support proto3 optional?
ref:
proto3 field presence
proto3 optional impl
Need modify
persister.go
'sPersist
method adding or reading--experimental_allow_proto3_optional
flag from command-line?:The text was updated successfully, but these errors were encountered: