This leads to some confusing situation for "universal" code, where not adding open Ppx_deriving_json_runtime.Primitives leads to errors like Unbound value string_to_json on the Melange build, but adding it leads to unused open Ppx_deriving_json_runtime.Primitives on the OCaml build.
I wonder if there's a way around this, besides silencing the warnings?
It seems that the Melange ppx requires
string_to_json
:https://github.com/melange-community/melange-json/blob/14453795349684cbb8bb201b4fd2c9107b0dc7da/ppx/browser/ppx_deriving_json_js.ml#L197
while the OCaml implementation does not:
https://github.com/melange-community/melange-json/blob/14453795349684cbb8bb201b4fd2c9107b0dc7da/ppx/native/ppx_deriving_json_native.ml#L209-L224
This leads to some confusing situation for "universal" code, where not adding
open Ppx_deriving_json_runtime.Primitives
leads to errors likeUnbound value string_to_json
on the Melange build, but adding it leads tounused open Ppx_deriving_json_runtime.Primitives
on the OCaml build.I wonder if there's a way around this, besides silencing the warnings?