mransan
mransan
Yes I can see the potential for conflict and how modules would prevent it. Other solution could include a clever detection of conflict and generating a different name... the problem...
Thanks, it's going to take me a bit of time to make the fix (laptop need setup) but I'll try soon.
Yes this is the line that would need to provide the implementation for instance: https://github.com/mransan/ocaml-protoc/blob/b62a4d5d970533ce99f8c875c3522959ba56a569/src/compilerlib/pb_codegen_encode_yojson.ml#L209
let me check this week.
So yes I confirm in proto2 when a field is optional, the generated code for the default function could be nicer as you suggest.
records partially implemented in #16
const variant implemented in #17
Support for generating the default value set in the field attribute was added as part of #18
Missing functionality is the the support for the honoring the default enum value. At the moment default enum value is the first enum (Constructor in OCaml). While we really should...
Another missing functionality is to support default for optional fields (Don't use None but rather the default value).