From fe70498a8982bef951311b37aa8568218ce8801a Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 18 Jul 2023 17:31:15 +0200 Subject: [PATCH] Prepare 0.26.0 (#2403) * Editorialize the changelog - Non-bug entries are moved to the "Changes" section. - Lists are sorted by PR number. - Similar entries are merged. - Spelling is improved * Bump version numbers * Mark breaking changes in the changelog with `*` --- CHANGES.md | 52 +++++++++++++++++++++++------------------ README.md | 2 +- doc/faq.mld | 2 +- doc/getting_started.mld | 2 +- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9c893009a7..73d0a58f62 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,10 @@ -## unreleased +# Changelog + +Items marked with an asterisk (`*`) are changes that are likely to format +existing code differently from the previous release when using the default +profile. This started with version 0.26.0. + +## 0.26.0 (2023-07-18) ### Removed @@ -8,36 +14,36 @@ ### Bug fixes -- Fix crash due to `let f (type a) :> a M.u = ..` (#2399, @Julow) -- Fix crash due to `module T = (val (x : (module S)))` (#2370, @Julow) +- Fix crash caused by `let f (type a) :> a M.u = ..` (#2399, @Julow) +- Fix crash caused by `module T = (val (x : (module S)))` (#2370, @Julow) - Fix invalid formatting of `then begin end` (#2369, @Julow) - Protect match after `fun _ : _ ->` (#2352, @Julow) - Fix invalid formatting of `(::)` (#2347, @Julow) -- Fix formatting of string literals in code blocks (#2338, #2349, @Julow) -- Improve formatting of module arguments (#2322, @Julow) -- Consistent indentation of `@@ let+ x = ...` (#2315, #2396, @Julow) -- Remove double parenthesis around tuple in a match (#2308, @Julow) -- Consistent indentation of `fun (type a) ->` that follow `fun x ->` (#2294, @Julow) -- Improve indentation of `~label:(fun` (#2271, #2291, #2293, #2298, #2398, @Julow) -- Fix non-stabilizing comments attached to private/virtual/mutable keywords (#2272, #2307, @gpetiot, @Julow) -- Fix formatting of comments in "disable" chunks (#2279, @gpetiot) +- Fix indentation of module-expr extensions (#2323, @gpetiot) +* Remove double parentheses around tuples in a match (#2308, @Julow) +* Remove extra parentheses around module packs (#2305, @Julow, @gpetiot) - Fix indentation of trailing double-semicolons (#2295, @gpetiot) -- Remove extra parentheses around module packs (#2305, @Julow, @gpetiot) -- Fix identation of module-expr extensions (#2323, @gpetiot) -- Don't print warnings related to odoc code-blocks when '--quiet' is set (#2336, @gpetiot) +- Fix formatting of comments in "disable" chunks (#2279, @gpetiot) +- Fix non-stabilizing comments attached to private/virtual/mutable keywords (#2272, #2307, @gpetiot, @Julow) ### Changes -- Improve formatting of doc-comments (#2376, #2377, #2379, #2378, @Julow) -- Disable reporting of deprecated alerts while formatting code blocks (#2373, @Julow) -- Improve indentation of `as`-patterns (#2359, @Julow) -- Restore short form for first-class modules: `((module M) : (module S))` is formatted as `(module M : S)`) (#2280, #2300, @gpetiot, @Julow) -- Restore short form formatting of record field aliases (#2282, #2388, @gpetiot, @Julow) -- Tweaks the JaneStreet profile to be more consistent with ocp-indent (#2214, #2281, #2284, #2289, #2299, #2302, #2309, #2310, #2311, #2313, #2316, #2362, #2363, @gpetiot, @Julow) -- Improve formatting of class signatures (#2301, #2387, @gpetiot, @Julow) +- Improve formatting of doc-comments (#2338, #2349, #2376, #2377, #2379, #2378, @Julow) + Remove unnecessary escaping and preserve empty lines. +* Indent `as`-patterns that have parentheses (#2359, @Julow) +- Don't print warnings related to odoc code-blocks when '--quiet' is set (#2336, #2373, @gpetiot, @Julow) +* Improve formatting of module arguments (#2322, @Julow) +* Don't indent attributes after a let/val/external (#2317, @Julow) +- Consistent indentation of `@@ let+ x = ...` (#2315, #2396, @Julow) + It was formatted differently than `@@ let x = ...`. +* Improve formatting of class expressions and signatures (#2301, #2328, #2387, @gpetiot, @Julow) +* Consistent indentation of `fun (type a) ->` following `fun x ->` (#2294, @Julow) +* Restore short-form formatting of record field aliases (#2282, #2388, @gpetiot, @Julow) +* Restore short-form for first-class modules: `((module M) : (module S))` is formatted as `(module M : S)`) (#2280, #2300, @gpetiot, @Julow) +* Improve indentation of `~label:(fun ...` (#2271, #2291, #2293, #2298, #2398, @Julow) + The `fun` keyword is docked where possible and the arguments are indented to avoid confusion with the body. - JaneStreet profile: treat comments as doc-comments (#2261, #2344, #2354, #2365, #2392, @gpetiot, @Julow) -- Don't indent attributes after a let/val/external (#2317, @Julow) -- Adjust indentation of class-expr function body (#2328, @gpetiot) +- Tweaks the JaneStreet profile to be more consistent with ocp-indent (#2214, #2281, #2284, #2289, #2299, #2302, #2309, #2310, #2311, #2313, #2316, #2362, #2363, @gpetiot, @Julow) ### New features diff --git a/README.md b/README.md index fd9d516d2c..a804011e2e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ To set up your project to use the default profile and the ocamlformat version yo ``` profile = default -version = 0.25.1 +version = 0.26.0 ``` For more information on configuration options, check out the [documentation](https://ocaml.org/p/ocamlformat/latest/doc/index.html) or run `ocamlformat --help`. diff --git a/doc/faq.mld b/doc/faq.mld index 01f0c2bf46..55960f10d5 100644 --- a/doc/faq.mld +++ b/doc/faq.mld @@ -21,7 +21,7 @@ The recommended way is to use a versioned default profile, such as: {[ profile = default -version = 0.25.1 +version = 0.26.0 ]} (or replace with the output of [ocamlformat --version]) diff --git a/doc/getting_started.mld b/doc/getting_started.mld index b4b3e844da..900645b4c9 100644 --- a/doc/getting_started.mld +++ b/doc/getting_started.mld @@ -21,7 +21,7 @@ dune build @install First of all, make sure you have an [.ocamlformat] file at the root of your project. Setting up your project to use the default profile and the OCamlFormat version you installed (hopefully the last one) in this [.ocamlformat] file is considered good practice: {[ profile = default -version = 0.25.1 +version = 0.26.0 ]} To manually invoke OCamlformat the general command is: