# \[ANN\] OCamlformat 0.14.0

**URL:** <https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435>\
**Category:** Ecosystem\
**Tags:** ocamlformat, release\
**Created:** [April 3, 2020, 8:35am UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435 "2020-04-03T08:35:33Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![emillon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/emillon/32/1206_2.png) [@emillon](https://discuss.ocaml.org/u/emillon)\
**Post date:** [April 10, 2020, 5:51pm UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435/21 "2020-04-10T17:51:49Z")

</div>

Hello,

As described in this thread, ocamlformat 0.14.0 introduced a new algorithm to determine how  
documentation comments are placed. We underestimated the impact of making this the default, and this means that many unwanted diffs were present for 0.13.0 -\> 0.14.0 upgrades.

We are going to prepare a 0.14.1 release next week reverting this behavior back to the 0.13.0 defaults. Users still on 0.13.0 are encouraged to wait for this and upgrade directly to 0.14.1.

Sorry for the inconvenience, and thanks for the feedback!

---

<div class="post-metadata">

**Author:** ![emillon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/emillon/32/1206_2.png) [@emillon](https://discuss.ocaml.org/u/emillon)\
**Post date:** [April 14, 2020, 10:20am UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435/22 "2020-04-14T10:20:47Z")

</div>

> [@Zimm\_i48](#):
>
> How can you consider this as anything else but formatting? I don’t want to have to think whether I separate my declarations by zero, one or two newlines.

Yes, that’s a good point. Bottom line is that spacing between items is not super consistent at the moment (see [Feature request: Simpler spacing heuristics for modules · Issue #1253 · ocaml-ppx/ocamlformat · GitHub](https://github.com/ocaml-ppx/ocamlformat/issues/1253) for a recent example), so we’d like to improve that area. If we can find simple rule that works, that’s even better!

---

<div class="post-metadata">

**Author:** ![dbuenzli](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dbuenzli/32/18_2.png) [@dbuenzli](https://discuss.ocaml.org/u/dbuenzli)\
**Post date:** [April 14, 2020, 10:57am UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435/23 "2020-04-14T10:57:44Z")

</div>

> [@Zimm\_i48](#):
>
> That plan sounds good to me, except for spacing between module items. How can you consider this as anything else but formatting? I don’t want to have to think whether I separate my declarations by zero, one or two newlines.

Personally I do (at least between 0 or 1). I can’t imagine LaTeX choosing how to gather my sentences into paragraphs or splitting each of my paragraphs into one sentences paragraphs.

In module implementation I very often group one-liner definitions according to their relatedness. `ocamlformat` insisting on putting a space between these one-liners is one of the reasons among others I’m not using it, it worsens legibility by lack of compactness.

Basically the rule I would like is: after a one-liner definition don’t do anything special except collapsing blank lines to a single one if there is more than one following.

---

<div class="post-metadata">

**Author:** ![Juloo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/juloo/32/881_2.png) [@Juloo](https://discuss.ocaml.org/u/Juloo)\
**Post date:** [April 16, 2020, 1:25pm UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435/24 "2020-04-16T13:25:58Z")

</div>

As Etienne mentioned, we have released OCamlformat 0.14.1, reverting the change to the defaults and our plans to deprecate the `doc-comments` option.

For projects that already upgraded to 0.14.0 (eg. Coq), the `doc-comments` option will change its meaning again. It is necessary to add `doc-comments=before` to have the documentation comments placed before.  
Moreover, the new option `doc-comments-val` added in 0.14.0 has a higher precedence than `doc-comments`, even when it’s not set. It is thus necessary to set them both to `before` to have the old “before” behavior.  
This will be improved in the next release (see [https://github.com/ocaml-ppx/ocamlformat/pull/1340](https://github.com/ocaml-ppx/ocamlformat/pull/1340)).

Thank you to our early adopters to bear with us. We are improving our release process to reduce confusion for the next updates. As usual, if you have any feedback, please open an issue on [https://github.com/ocaml-ppx/ocamlformat](https://github.com/ocaml-ppx/ocamlformat) to discuss it with us.

[Previous page](https://discuss.ocaml.org/t/ann-ocamlformat-0-14-0/5435.md?page=1)
