janestreet / janestreet/ppx_custom_printf
Report multiple errors
- Dominant language
- OCaml
- Stars
- 22
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice if, when relevant, `ppx_custom_yojson` would embed the error instead of raising.
For instance, in:
```ocaml
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!
Contributor guide
Research direction
Start by examining how ppx_custom_yojson handles invalid format specifications in the example from the issue. The payload names no files or tests, so first locate that error-handling path and existing diagnostics; done should include reporting both errors and preserving Merlin's ability to determine the generated function arity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100