ocaml-protoc icon indicating copy to clipboard operation
ocaml-protoc copied to clipboard

Generated default functions

Open vbmithr opened this issue 7 years ago • 2 comments

I have an issue with the generated functions. I'm always getting functions like default_f ?field:int option () where it should be f ?field:int (). As opposed to the documentation. All my fields are optional in protobuf messages I use. Any idea?

vbmithr avatar Jan 31 '18 11:01 vbmithr

let me check this week.

mransan avatar Feb 08 '18 01:02 mransan

So yes I confirm in proto2 when a field is optional, the generated code for the default function could be nicer as you suggest.

mransan avatar Feb 08 '18 01:02 mransan