ppx_deriving_yojson
ppx_deriving_yojson copied to clipboard
Remove constraint on Yojson 2
I tried running the tests with Yojson 2 and they seem to… just work. So this constraint seems to be overly cautionous.
Not quite, the old Yojson.Safe.json type is still referenced is some places:
https://github.com/ocaml-ppx/ppx_deriving_yojson/blob/64c3af970e4e0d0f21cdfc5187968aa1d35fc21e/src/ppx_deriving_yojson.ml#L122
It might be better to remove them and require yojson >= 2.0, but maybe since they’re in the left part of the pattern it’s fine to leave. I don’t know.
Yes, it is there but it seems like it doesn't hurt, somehow what it compiles to does not cause issues. Probably because packages that use Yojson.Safe.json in their types for derivation can't use Yojson 2.0 anyway and have to have the restriction applied there.
I can also remove that match pattern, since Yojson.Safe.t was added in 1.6 and ppx_deriving_yojson requires 1.6 already.
Seems to have been done by https://github.com/ocaml-ppx/ppx_deriving_yojson/commit/69671f7653c210ac926c498976af3f30a5948f9c
Oops, indeed. Sorry i missed your PR