You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #158 enforces systematic checks that the code base is correctly indented with ocp-indent. This was already the case pretty much everywhere. This does raise the question, though: should we enforce something stronger? As far as I can see, we have four possibilities:
I am fine not enforcing anything. We have done that for a while and it has worked fine. However, I am not sure it is enough: has worked so far because we used similar IDEs.
This is what Formatting of OCaml and Dune #158 introduces. I think it costs very little because most of the code is already compatible with ocp-indent. I would be up for doing at least this. This will prevent future discussions on whether a file is indented correctly.
I am not a big fan of OCamlFormat; I've never really managed to use it in a satisfactory way. Also, it provides many options which could easily lead to endless debates on how to configure it exactly, which I think is counterproductive. However, it is a very easy option to implement, it is available via OPAM and a fair amount of package managers. It would be easy to enforce in CI as well.
I have had much more success with Topiary in term of formatting; it being opinionated also helps prevent some friction between developers. However, it is hard to get at the moment and will probably be very unstable from one version to the other, so I don't think it is mature enough for us at this point.
My vote would therefore be to go for option 2. WDYT @yurug?
The text was updated successfully, but these errors were encountered:
PR #158 enforces systematic checks that the code base is correctly indented with
ocp-indent
. This was already the case pretty much everywhere. This does raise the question, though: should we enforce something stronger? As far as I can see, we have four possibilities:ocp-indent
Here are my personal opinions on the topic:
I am fine not enforcing anything. We have done that for a while and it has worked fine. However, I am not sure it is enough: has worked so far because we used similar IDEs.
This is what Formatting of OCaml and Dune #158 introduces. I think it costs very little because most of the code is already compatible with
ocp-indent
. I would be up for doing at least this. This will prevent future discussions on whether a file is indented correctly.I am not a big fan of OCamlFormat; I've never really managed to use it in a satisfactory way. Also, it provides many options which could easily lead to endless debates on how to configure it exactly, which I think is counterproductive. However, it is a very easy option to implement, it is available via OPAM and a fair amount of package managers. It would be easy to enforce in CI as well.
I have had much more success with Topiary in term of formatting; it being opinionated also helps prevent some friction between developers. However, it is hard to get at the moment and will probably be very unstable from one version to the other, so I don't think it is mature enough for us at this point.
My vote would therefore be to go for option 2. WDYT @yurug?
The text was updated successfully, but these errors were encountered: