Skip to content

6.0.0

Compare
Choose a tag to compare
@andersfugmann andersfugmann released this 13 Apr 15:29
· 28 commits to main since this release

CHANGES:

New features

  • Implement json serialization and deserialization (#5)
  • Support special json mapping for google types (#9)
  • Add deprecation annotations for deprecated fields, services etc (#8)
  • Add option to prefix generated files with their package name
  • Copy documentation from proto files into generated ocaml bindings

Bug fixes

  • Fix file output name if files contains a '-'
  • Resolve bug for Request/Response module aliases leading to
    generating uncompilable code. (#21)
  • Fix codegen bug for messages with out fields and setting
    singleton_records = true (#20)
  • In Services, the package field is now correctly set to None if
    the service if not defined in a package scope (#24)

Misc changes

  • Unify serialization and deserialization spec and optimize oneof
    handling
  • Simplify types used in code generation to improve readaility
  • *Replace val name': unit -> string with val name: unit -> string which will only return the full protobuf name
  • Optimize merge functions by applying eager evaluation
  • Change signature of to_proto' to return unit and not a writer

(* indicates breaking change)

Notes

Message.name': unit -> string has been renamed to Message.name: unit -> string, and is now contains the fully qualified protobuf
message name. Before the name was the ocaml module name of the
message.

Service.Message signature has been deprecated and replaced with
Spec.Message signature. Service.Message is now an alias for
Spec.Message and will be removed in future releases.