Bin_prot v0.9.0 adds bin_prot shapes, more details in shape/README.md. As a result, [@@deriving bin_prot] generates an additional function: bin_shape_<type>.
Code manually defining bin_prot functions is likely to break since this new function needs to be implemented. In most cases, this code can be replaced by the use of Bin_prot.Utils.Make_binable:
include Bin_prot.Utils.Make_binable
(struct
module Binable = <module with a type t that is bin_prottable>
type t = <some OCaml type>
let to_binable = <convert from t to Binable.t>
let of_binable = <convert from Binable.t to t>
end)
Using this functor will guarantee compability with both Bin_prot < v0.9.0 and Bin_prot v0.9.0.
Bin_prot v0.9.0 adds bin_prot shapes, more details in shape/README.md. As a result,
[@@deriving bin_prot]
generates an additional function:bin_shape_<type>
.Code manually defining bin_prot functions is likely to break since this new function needs to be implemented. In most cases, this code can be replaced by the use of
Bin_prot.Utils.Make_binable
:Using this functor will guarantee compability with both Bin_prot < v0.9.0 and Bin_prot v0.9.0.