mransan / ocaml-protoc

A Protobuf Compiler for OCaml
https://mransan.github.io/ocaml-protoc/
MIT License
179 stars 33 forks source link

Calling a message `Unit` yields uncompileable code #128

Closed Leonidas-from-XIV closed 5 years ago

Leonidas-from-XIV commented 6 years ago

It gets translated into unit which then fails to compile because the .ml and the .mli file disagree on what unit refers to and yields confusing errors like:

Error: The implementation src/licensing/licensing_types.pp.ml
       does not match the interface src/licensing/.licensing.objs/licensing__Licensing_types.cmi:
       Values do not match:
         val default_unit_unlimited : unit -> unit_unlimited
       is not included in
         val default_unit_unlimited : unit -> unit_unlimited
       File "src/licensing/licensing_types.mli", line 73, characters 0-51:
         Expected declaration
       File "src/licensing/licensing_types.ml", line 67, characters 8-30:
         Actual declaration
mransan commented 5 years ago

Fixed in #145 will start an opam release.