Open Kakadu opened 9 months ago
This is done to improve compatibility with ocp-indent for those that use both in their formatting pipeline. This appeared in https://github.com/ocaml-ppx/ocamlformat/pull/2428 and can be avoided with the option ocp-indent-compat=false
(--no-ocp-indent-compat
on the CLI)
Thanks, it helps. Another question: is there a list of options to migrate from version A to A+1 without changing the OCaml code? I believe that ocamlformat --print-config --profile=janestreet
doesn't give a full list.
P.S. The answer is probably no, because you mention hidden options which are not available outside https://github.com/ocaml-ppx/ocamlformat/issues/2414 P.P.S. It is not a shortcoming of janestreet profile, it hapens with default too. It looks like 0.26.1 had increased indent somehow, in a manner that it is not controlled my 'max-indent='
@@ -1731,8 +1722,8 @@ module Make (AstHelpers : GTHELPERS_sig.S) = struct
self#wrap_tr_function_str ~loc tdecl
(Exp.app_list ~loc (Exp.new_ ~loc @@ Lident class_name)
@@ List.map rec_typenames ~f:(fun name ->
- Exp.fun_ ~loc (Pat.unit ~loc)
- @@ Exp.sprintf ~loc "%s_%s" self#plugin_name name)
+ Exp.fun_ ~loc (Pat.unit ~loc)
+ @@ Exp.sprintf ~loc "%s_%s" self#plugin_name name)
@ self#apply_fas_in_new_object ~loc tdecl)
method fancy_app ~loc trf (inh : Exp.t) subj = Exp.app ~loc trf subj
There's no such backward compatibility options. We are very careful at the changes made to the default profile but that's not the case of the janestreet profile, which changes often.
The placement of a comma looks weird.