owl icon indicating copy to clipboard operation
owl copied to clipboard

Not using the align-* options of ocamlformat

Open gpetiot opened this issue 4 years ago • 2 comments

Hi, as the continuous effort of maintaining ocamlformat and simplifying the code and its options, the align-* options (--align-cases, --align-constructors-decl, --align-variants-decl) often come up as options we would like to remove from ocamlformat.

Apart from the (ocamlformat) code simplification, and moving slowly but surely towards an uniform configuration that would suit more projects, we can also raise the argument that using such option may add some noise in the reformatting each time one aligned item is added or removed (since they are all reindented when the longest item changes) and that's not something we want to promote in ocamlformat.

Since owl is one of the very few projects using these options, what do you think of the possibility of having them removed from ocamlformat in the future? cc @emillon @julow

gpetiot avatar Jun 04 '21 14:06 gpetiot

Friendly ping about this, these are options we would like to deprecate then remove for the next release. We strongly feel that this kind of feature should live outside of ocamlformat (a postprocessing tool could be written to realign the lines of choice)

gpetiot avatar Jul 21 '21 15:07 gpetiot

@gpetiot Thanks for the advice! Please feel free to make or amend the current PR, and we will merge it once v0.20.0 is released.

jzstark avatar Nov 07 '21 15:11 jzstark