[ANN] ppx_deriving_protocol 0.8

I’m happy to announce ppx_deriving_protocol v. 0.8

Ppx_deriving_protocol is a ppx to serialize and de-serialize ocaml data types. The ppx is generic in the sense that it allows users to plug in concrete protocol serializers and de-serializers without needing to modify the ppx or learning ocaml Ast.

The library include drivers for (de)serializing to/from json (Yojson.Safe.json) and xml_light (Xml.xml), but users of the library may choose to create their own.

The library currently handles most primitive types (int, string, bool, etc), lists, options, record and tuples types. The goal is to support most types, including sum-types.

More information can be found at https://github.com/andersfugmann/ppx-deriving-protocol

4 Likes

A bit of bike shedding here but ppx_protocol_conv is the more consistent name if it uses ppx_type_conv rather than ppx_deriving.

It’s a good point. I was indeed in doubt of what to call the library, since the stanza for using it is [@@deriving protocol ~driver=(module ...)].

I have no problem renaming library to ppx_protocol_conv. How would I deprecate the old opam package? Delete it, and create a new?.
If I rename the opam package name, I would also rename the git repository which would invalidate links in the old package.

1 Like

You could simply leave the old package name and make it depend on the correct opam package name. Adding that it is deprecated in the post install messages might be useful as well. Otherwise, I think you simply rename the git repo and submit a new package name as you said.

I would also rename the git repository which would invalidate links in the old package.

Github leaves redirects for renamed packages. So this shouldn’t be a problem.