Conversation
Leonidas-from-XIV
left a comment
There was a problem hiding this comment.
I haven't looked through all (obviously and also sensibly because the changes are often of the same type), but here's my observations. I think some of them are solid improvements, some of them could be improved still.
| type ('float, 'int) t = | ||
| { elapsed_time : 'float | ||
| (** Real time elapsed since the process started and the process | ||
| (** Real time elapsed since the process started and the process |
There was a problem hiding this comment.
I like that the comments beginnings are aligned with the field they're documenting.
| let write base_dir = | ||
| let () = Unix.mkdir base_dir 0o777 in | ||
| let dune = {| | ||
| let dune = |
There was a problem hiding this comment.
This seems a bit wasteful.
There was a problem hiding this comment.
This was changed in ocaml-ppx/ocamlformat#2480 but perhaps with a different case in mind.
@dvulakh Do you have an opinion ?
There was a problem hiding this comment.
When formatting with --profile=janestreet, we want to keep the new behavior (multiline delimited strings always get their own lines).
We don't mind if --profile=ocamlformat or --profile=default keep some multiline strings docked, though.
| (fun j -> | ||
| sprintf "M_%d_%d_%d_%d.f()" (library_index - 1) j mod_rows k) | ||
| (count subsets_per_library)) | ||
| List.map |
There was a problem hiding this comment.
I like that the function bodies are indented by two from the fun and not from the ( in front of fun. Seems more consistent.
bench/micro/path_bench.ml
Outdated
| ; "right root", (long_path, ".") | ||
| ; "short paths", (short_path, short_path) | ||
| ; "long paths", (long_path, long_path) | ||
| ]]) |
There was a problem hiding this comment.
Much more readable, only a bit surprising where the [ starts. It is aligned with the content of the string? What if the start is {foo|, where is the indent? I think just 2 characters from the item to which the attribute is attached would be more consistent.
There was a problem hiding this comment.
It was in fact indented by 2 starting from the opening parenthese. Here's a more intuitive indentation: ocaml-ppx/ocamlformat#2613
But because this is already changed, a better formatting is possible: ocaml-ppx/ocamlformat#2615
| ({ Dune_rules.Main.contexts = _; scontexts } : Dune_rules.Main.build_system) | ||
| (context : Context.t) | ||
| dirs | ||
| : Descr.Workspace.t Memo.t |
There was a problem hiding this comment.
A bit undecided on this. It's kind of nice that the arguments are not indented the same amount as the function body (as that makes them bleed together), but the return type still is which is quite inconsistent.
23067cb to
9b8527b
Compare
9b8527b to
6f24a29
Compare
|
What's happening in CI ? |
6f24a29 to
ca3d70f
Compare
Signed-off-by: Jules Aguillon <jules@j3s.fr>
ca3d70f to
bd0448f
Compare
|
LGTM. Can we wait until this version is available in nixpkgs though? |
|
As this is not a PR that can be reviewed or rebased, I'll close it and let a maintainer do the upgrade when appropriate. |
The aim of this preview is to gather feedback.
Changelog can be found here: https://github.com/ocaml-ppx/ocamlformat/blob/main/CHANGES.md