janestreet / ppx_custom_printf

Printf-style format-strings for user-defined string conversion
MIT License
23 stars 9 forks source link

Report multiple errors #11

Open panglesd opened 1 year ago

panglesd commented 1 year ago

It would be nice if, when relevant, ppx_custom_yojson would embed the error instead of raising.

For instance, in:

let invalid1 =
  Format.printf !"The time is %{invalid#invalid} and the timezone is %{invalid#too}." time timezone

Currently, only the first error (string "invalid#invalid" should be of the form [...]) is reported, Merlin can't find any information about the arity of the generated function.

I would like to use this issue for an Outreachy project (see https://github.com/ocaml-ppx/ppxlib/issues/389). If you are willing to accept contributions, I would help in the reviewing process!