Skip to content

Latest commit

 

History

History
169 lines (147 loc) · 7.31 KB

Changelog.md

File metadata and controls

169 lines (147 loc) · 7.31 KB

6.2.0: Unreleased

  • Fix potential nameclash for messages defining extensions
  • Resolve compilation warning on deprecated fields enclosed in a oneof
  • Improve how comments are copied to generated code
  • Add flag 'singleton_oneof_as_option' to map single field onofs to option type (default on). Set to 'false' to keep old behaviour.
  • Improve copying of comments from .proto files into ocaml code using omd to parse markdown

6.1.0: 2024-04-25

  • Fix name resolution leading to wrongly mapped names
  • Fix codegen bug causing the plugin to reject valid protobuf
  • Add preliminary support for melange though disabling eager evaluation of serialize and deserialize functions when not using native or bytecode backends
  • Fix missing cflags when compiling test c stub
  • Make Map tests compatible with older versions of protoc
  • Fix negative integer test failues due to a bug in older versions of protobuf (google) c lib

6.0.0: 2024-04-13

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 without 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.

5.0.0: 2024-02-24

  • Fix service signature to be backward compatible
  • Create detatched fork for active development of ocaml-protoc-plugin. Thanks to @issuu for supporting initial development!
  • Merge messages when receiving multiple messages for the same (single) field per protobuf spec.
  • Add multiple buffer allocation strategies when serializing data
  • Sort fields in output as recommended in protobuf spec and implement fast deserialization when all fields are sorted.
  • Optimize serialization and deserialization resulting in ~5x speed improvments and is now on par with ocaml-protoc.
  • Improve handling of extensions and remove unused extensions argument for messages that do not carry extensions (Breaking change)
  • Add benchmarks based on bechamel for optimization and comparing performance against ocaml-protoc
  • Fix upper case handling in name mangling and apply name mangling for serivce records (thanks @crackcomm)
  • Fix bug in name resolution leading to uncompilable code

4.5.0: 2023-06-16

  • Add more fields in generated service structs to make it easier to extract service endpoint names for gRPC (#50)
  • Remove buckescript packaging support (#45)

4.4.0: 2023-03-13

  • Emit modules for service endpoints with request/reply and gRPC endpoint name (thanks @Nymphium)
  • Support importing from proto files with - in their name.

4.3.1: 2022-09-12

  • Fix serialization/deserialization on big endian architectures
  • Update tests for proto3 optional fields
  • Remove dependency on dune-configurator

4.3.0: 2022-09-09

  • Use pkg-config to locate google well known types (thanks @vprevosto)
  • Support proto3 optional fields
  • Map proto3 optional fields into option types

4.2.0: 2021-01-31

  • Do not serialize field values when the same as the default attribute.
  • Fix bug when uint32/64 where values are converted to negative integers if high bit is set.
  • Fix bug which prevented specification of multiple opens (thanks @rauanmayemir)

4.1.0: 2020-10-31

  • Fix bug with Proto2 default integer arguments for Int32 and Int64 types
  • Add function to construct messages with default values
  • Add missing includes for google well known types

4.0.0: 2020-05-10

  • Move userdefined opens to beginning of autogenerated files, to allow using new google types
  • [*] Wrap google types (protofiles using googles well known types will need to add open=Google_types to the list of compilation options
  • Disable warning 33 (unused opens) for user provided opens

3.0.0: 2020-01-06

  • Add custom option to mangle names (modules, fields and enums) to more Ocaml idiomatic names (snake_cased)
  • Change type of deserialize error type to be an lower bound polymorphic variant
  • Rewrite type mapping to ensure that no name clashes can exist.
  • Fix bug in nested cursive types referencing wrong types
  • Add custom options, so options to ocaml_protoc_plugin can be embedded in .proto files
  • Support extensions
  • Allow use of message name Ocaml_protoc_plugin
  • *Do not treat oneof fields as required, adding a `not_set variant to all oneofs.
  • Avoid name clash with imported .proto files
  • Avoid eager evaluation of members of recursivbe modules to fix bug triggered in bucklescript - @wokalski

2.0.0: 2019-10-20

  • Add examples
  • *Oneofs with only one element should not be a variant type
  • Add test when including proto files which defines the same package
  • Add google well know types (library ocaml-protoc-plugin.google_types).
  • *Move module to ocaml-protoc-plugin
  • Optimize deserialization of large nested structures
  • Provide pretty_printers aka deriving_show for Result.error and Field.t
  • Fix stack overflow when deserializing big nested structures
  • *Add option to not wrap single field type in records
  • Refactor type emitter to closely follow spec

1.0.0: 2019-10-12

  • Support enum aliasing
  • Avoid name clash with on 'name'
  • Fix code generation when argument contains a path
  • Refactor internal types to make serialization and deserialization type spec symmetrical.
  • Optimize deserialization for messages with max_id < 1024
  • Dont depend on Base in runtime
  • Slim runtime dependencies: Remove need for base, ocplib-endian and ppx_let
  • Honour [packed=...] flag.
  • Make fixed scalar types default to int32 and int64
  • Support proto2 specification
  • Add options to switch between int64|int32 and int
  • Fix name clash problem with special enum names
  • Refactor serializaton and deserialization to simplify emitted code
  • Eagerly evaluate serialization (for speed).

0.9: 2019-09-25

  • Initial Release