[new release] ocamlformat (0.17.0) #18165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Auto-formatter for OCaml code
CHANGES:
Removed
Remove the 'let-open' option, deprecated since 0.16.0 (Remove the deprecated 'let-open' option ocaml-ppx/ocamlformat#1563, @gpetiot)
Remove support for OCaml 4.06 and 4.07, minimal version requirement bumped to OCaml 4.08 (Bump minimal ocaml version requirement to 4.08 ocaml-ppx/ocamlformat#1549, @gpetiot)
Remove the 'extension-sugar' option, deprecated since 0.14.0 (Remove deprecated option 'extension-sugar' ocaml-ppx/ocamlformat#1588, @gpetiot)
Bug fixes
Fix parsing of invalid file wrt original source handling (Fix parsing of invalid file wrt original source handling ocaml-ppx/ocamlformat#1542, @hhugo)
Preserve the syntax of infix set/get operators (Preserve the syntax of infix set/get operators ocaml-ppx/ocamlformat#1528, @gpetiot)
String.get
and similar calls used to be automatically rewritten to their corresponding infix form.()
, that was incorrect when using the-unsafe
compilation flag. Now the concrete syntax of these calls is preserved.Add location of invalid docstring in warning messages (Add location of invalid docstring in warning messages ocaml-ppx/ocamlformat#1529, @gpetiot)
Fix comments on the same line as prev and next elements (Fix comments on the same line as prev and next elements ocaml-ppx/ocamlformat#1556, @gpetiot)
Break or-patterns after comments and preserve their position at the end of line (Break or-patterns after comments and preserve their position at the end of line ocaml-ppx/ocamlformat#1555, @gpetiot)
Fix linebreak between signature items of the same group (Fix linebreak between signature items of the same group ocaml-ppx/ocamlformat#1560, @gpetiot)
Fix stack overflow on large string constants (Fix stack overflow on large string constants ocaml-ppx/ocamlformat#1562, @gpetiot)
Fix comment position around list cons operator (Fix comment position around list cons operator ocaml-ppx/ocamlformat#1567, @gpetiot)
Fix the vertical alignment test to break down comment groups (Fix the vertical alignment test to break down comment groups ocaml-ppx/ocamlformat#1575, @gpetiot)
Preserve spacing of toplevel comments (Preserve spacing of toplevel comments ocaml-ppx/ocamlformat#1554, @gpetiot)
Support more sugared extension points (Support more sugared extension points ocaml-ppx/ocamlformat#1587, @gpetiot)
Changes
Add buffer filename in the logs when applying ocamlformat (ocamlformat.el: add buffer filename in logs ocaml-ppx/ocamlformat#1557, @dannywillems)
Improve comment position in pattern collection (Improve comment position in pattern collection ocaml-ppx/ocamlformat#1576, @gpetiot)
Consistent positioning of lambda return type annotations when no-break-infix-before-func and pre/post extensions (Consistent positioning of lambda return type annotations when no-break-infix-before-func and pre/post extensions ocaml-ppx/ocamlformat#1581, @gpetiot)
New features