ocaml-ppx / ocamlformat

Auto-formatter for OCaml code
MIT License
633 stars 179 forks source link

Support for OCaml 5.3 effect syntax #2562

Open Zeta611 opened 4 months ago

Zeta611 commented 4 months ago

As mentioned in #2559, this provides a support for OCaml 5.3 effect syntax.

Zeta611 commented 2 weeks ago

No problem! :)

I see few tests have been failed due to build error---is it something to be worried about?

Julow commented 2 weeks ago

The CI is failing when testing on a larger corpus of code with errors like this:

File "code/infer/infer/src/integration/IssuesTest.ml", line 17, characters 50-56:
17 |   Option.iter taint_policy_privacy_effect ~f:(fun effect ->
                                                       ^^^^^^
Error: Syntax error
File "code/irmin/src/irmin/node_intf.ml", line 127, characters 7-13:
127 |   type effect := expected_depth:int -> node_key -> t option
             ^^^^^^
Error: Syntax error

5.3 also have a mechanism for disabling keywords in the lexer, that would have to be backported first. I'll work on backporting this and making it work with the ocaml-version that ocamlformat has.