@@ -6,6 +6,16 @@ profile. This started with version 0.26.0.
66
77## unreleased
88
9+ ### Deprecated
10+
11+ - Starting in this release, ocamlformat can use cmdliner >= 2.0.0. When that is
12+ the case, the tool no longer accepts unambiguous option names prefixes. For
13+ example, ` --max-iter ` is not accepted anymore, you have to pass the full
14+ option ` --max-iters ` . This does not apply to the keys in the ` .ocamlformat `
15+ configuration files, which have always required the full name.
16+ See dbuenzli/cmdliner #200 .
17+ (#2680 , @emillon )
18+
919### Fixed
1020
1121- Fixed ` wrap-comments=true ` not working with the janestreet profile (#2645 , @Julow )
@@ -33,13 +43,47 @@ profile. This started with version 0.26.0.
3343
3444- Fix crash due to edge case with asterisk-prefixed comments (#2674 , @Julow )
3545
46+
3647- Fix crash when formatting ` mld ` files that cannot be lexed as ocaml (e.g.
3748 containing LaTeX or C code) (#2684 , @emillon )
49+
50+ - \* Fix double parens around module constraint in functor application :
51+ ` module M = F ((A : T)) ` becomes ` module M = F (A : T) ` . (#2678 , @EmileTrotignon )
52+
53+ - Fix misplaced ` ;; ` due to interaction with floating doc comments.
54+ (#2691 , @EmileTrotignon )
55+
56+ - The formatting of attributes of expression is now aware of the attributes
57+ infix or postix positions: ` ((fun [@a] x -> y) [@b]) ` is formatted without
58+ moving attributes. (#2676 , @EmileTrotignon )
59+
60+ - ` begin%e ... end ` and ` begin [@a] ... end ` nodes are always preserved.
61+ (#2676 , @EmileTrotignon )
62+
63+ - ` begin end ` syntax for ` () ` is now preserved. (#2676 , @EmileTrotignon )
64+
65+ - \* The formatting of infix extensions is now consistent with regular
66+ formatting by construction. This reduces indentation in ` f @@ match%e `
67+ expressions to the level of indentation in ` f @@ match ` . Other unknown
68+ inconsistencies might also be fixed. (#2676 , @EmileTrotignon )
69+
70+ - \* The spacing of infix attributes is now consistent across keywords. Every
71+ keyword but ` begin ` ` function ` , and ` fun ` had attributes stuck to the keyword:
72+ ` match[@a] ` , but ` fun [@a] ` . Now its also ` fun[@a] ` . (#2676 , @EmileTrotignon )
73+
74+ - \* The formatting of` let a = b in fun ... ` is now consistent with other
75+ contexts like ` a ; fun ... ` . A check for the syntax ` let a = fun ... in ... `
76+ was made more precise. (#2705 , @EmileTrotignon )
77+
78+ - Fix a crash on ` type 'a t = A : 'a. {a: 'a} -> 'a t ` . (#2710 , @EmileTrotignon )
79+
3880### Changed
3981
40- - ` begin if ` , ` lazy begin ` , ` begin match ` and ` begin fun ` can now be printed on
41- the same line, with one less indentation level for the body of the inner
42- expression. (#2664 , #2666 , #2671 , #2672 , @EmileTrotignon ) For example :
82+ - ` |> begin ` , ` ~arg:begin ` , ` begin if ` , ` lazy begin ` , ` begin match ` ,
83+ ` begin fun ` and ` map li begin fun ` can now be printed on the same line, with
84+ one less indentation level for the body of the inner expression.
85+ (#2664 , #2666 , #2671 , #2672 , #2681 , #2685 , #2693 , @EmileTrotignon )
86+ For example :
4387 ``` ocaml
4488 (* before *)
4589 begin
@@ -52,6 +96,36 @@ profile. This started with version 0.26.0.
5296 end
5397 ```
5498
99+ - \* ` break-struct=natural ` now also applies to ` sig ... end ` . (#2682 , @EmileTrotignon )
100+
101+ - \* ` ;; ` is added at the of every toplevel-expression, except if its the last
102+ thing in the struct (#2683 , @EmileTrotignon ) For example:
103+ ``` ocaml
104+ (* before *)
105+ print_endline "foo"
106+ let a = 3
107+
108+ (* after *)
109+ print_endline "foo" ;;
110+ let a = 3
111+ ```
112+
113+ - \* Infix apply docking behaviour from --ocp-indent-compat is promoted to
114+ everyone. The most common effect is that ` |> map (fun ` is now indented from
115+ ` |> ` and not from ` map ` :
116+ ``` ocaml
117+ (* before *)
118+ v
119+ |>>>>>> map (fun x ->
120+ x )
121+ (* after *)
122+ v
123+ |>>>>>> map (fun x ->
124+ x )
125+ ```
126+ ` @@ match ` can now also be on one line.
127+ (#2694 , @EmileTrotignon )
128+
55129## 0.27.0
56130
57131### Highlight
0 commit comments