# \[ANN\] OCamlFormat 0.19.0

**URL:** <https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167>\
**Category:** Ecosystem\
**Tags:** announce, format, ocamlformat\
**Created:** [July 19, 2021, 12:27pm UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167 "2021-07-19T12:27:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpetiot](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/gpetiot/32/5184_2.png) [@gpetiot](https://discuss.ocaml.org/u/gpetiot)\
**Post date:** [July 19, 2021, 12:27pm UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167/1 "2021-07-19T12:27:21Z")

</div>

We are happy to announce the release of [OCamlFormat 0.19.0](https://github.com/ocaml-ppx/ocamlformat).

OCamlformat is an auto-formatter for OCaml code, writing the parse tree and comments in a consistent style, so that you do not have to worry about formatting it by hand, and to speed up code review by focusing on the important parts.

OCamlFormat is beta software. We expect the program to change considerably before we reach version 1.0.0. In particular, upgrading the `ocamlformat` package will cause your program to get reformatted. Sometimes it is relatively pain-free, but sometimes it will make a diff in almost every file. We are working towards having a tool that pleases most usecases in the OCaml community, please bear with us!

To make sure your project uses the last version of ocamlformat, please set

```auto
version=0.19.0

```

in your `.ocamlformat` file.

Main changes in `ocamlformat.0.19.0` are:

- OCaml 4.13 features are supported
- `ppxlib` dependency has been dropped
- A new `line-endings={lf,crlf}` option has been added for windows compatibility

Here is the [full list of changes](https://github.com/ocaml-ppx/ocamlformat/releases/tag/0.19.0).

We encourage you to try ocamlformat, that can be installed from opam directly ( `opam install ocamlformat` ), but please remember that it is still beta software. We have a [FAQ for new users](https://github.com/ocaml-ppx/ocamlformat#faq-for-new-users) that should help you decide if ocamlformat is the right choice for you.

The OCamlFormat dev team

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [July 19, 2021, 1:14pm UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167/2 "2021-07-19T13:14:11Z")

</div>

> [@gpetiot](#):
>
> A new `line-endings={lf,crlf}` option has been added for windows compatibility

Just to expand a bit on this feature: previously, `ocamlformat` would use the system EOL convention (ie LF on Unix-like OSs and CRLF on Windows). This meant that if you applied `ocamlformat` on systems with different EOL conventions, you would get a diff on every line on every file purely due to the changed newlines. Furthermore, this meant `ocamlformat` was hard to use if your project used LF on Windows (a common usage).

With the new option, `ocamlformat` enforces a given EOL convention. The system EOL convention is no longer used for any purpose and the EOL convention used is the one specified in `ocamlformat`’s config (LF by default).

Cheers,  
Nicolas

---

<div class="post-metadata">

**Author:** ![deividvale](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/deividvale/32/1345_2.png) [@deividvale](https://discuss.ocaml.org/u/deividvale)\
**Post date:** [July 21, 2021, 10:51am UTC](https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167/3 "2021-07-21T10:51:30Z")

</div>

The library works fine with my project.  
Congrats and thanks for the good work.
