We are pleased to announce the release of ocamlformat 0.14.2.
This minor release improves the recent 0.14.0 and 0.14.1 releases regarding the doc-comments option.
How to migrate from 0.13.0
Here are the changes of the doc-comments options compared to ocamlformat 0.13.0:
-
afterhas been renamed toafter-when-possibleto take into account the technical limitations of ocamlformat; - a new value
before-except-valhas been added, placing doc-comments before the corresponding code, but placing doc-comments of val and external declarations after the corresponding declaration; -
beforeis unchanged.
Here is the full list of changes made by the 0.14.0 release: [ANN] OCamlformat 0.14.0
How to migrate from 0.14.0
The 0.14.0 release lead to some regression of the doc-comments behavior that (although intended for us) lead to some surprise from a lot of users.
The behavior of doc-comments has thus been reverted to it’s 0.13.0 state with the following changes:
The doc-comments-val option has been removed and merged with doc-comments. The placement of documentation comments on val and external items is now controlled by doc-comments .
-
doc-comments=afterbecomesdoc-comments=after-when-possibleto take into account the technical limitations of ocamlformat; -
doc-comments=beforeis unchanged; -
doc-comments-valis now replaced withdoc-comments
To reproduce the former behaviors
-
doc-comments=before+doc-comments-val=before: now usedoc-comments=before; -
doc-comments=before+doc-comments-val=after: now usedoc-comments=before-except-val; -
doc-comments=after+doc-comments-val=before: this behavior did not make much sense and is not available anymore; -
doc-comments=after+doc-comments-val=after: now usedoc-comments=after-when-possible.
How to migrate from 0.14.1
The 0.14.1 release was preserving the behavior of 0.13.0 regarding doc-comments, it added a unset value to the doc-comments-val option.
This option has been removed with the following changes:
The doc-comments-val option has been removed and merged with doc-comments. The placement of documentation comments on val and external items is now controlled by doc-comments .
-
doc-comments=afterbecomesdoc-comments=after-when-possibleto take into account the technical limitations of ocamlformat; -
doc-comments=beforeis unchanged; -
doc-comments-valis now replaced withdoc-comments
To reproduce the former behaviors
-
doc-comments=before+doc-comments-val=before: now usedoc-comments=before; -
doc-comments=before+doc-comments-val=after: now usedoc-comments=before-except-val; -
doc-comments=after+doc-comments-val=before: this behavior did not make much sense and is not available anymore; -
doc-comments=after+doc-comments-val=after: now usedoc-comments=after-when-possible.
Thank you
We would like to thank our early users to help us on the road of a stable 1.0.0 release of ocamlformat.