backtracking / mlpost

GNU Lesser General Public License v2.1
9 stars 4 forks source link

Use ocamlformat? #13

Open bobot opened 3 years ago

bobot commented 3 years ago

ocamlformat is quite nice for ensuring in such projects that the style is coherent. But for it to work it should be tested in the continuous integration (that we don't yet have in mlpost, but adding github actions is quite easy). However it also means that make fmt should be run in each MR, which is often overlooked.

backtracking commented 3 years ago

I currently get a warning related to the use of ocamlformat:

File "dune-project", line 2, characters 11-14:
2 | (using fmt 1.2)
               ^^^
Warning: Version 1.2 of integration with automatic formatters is not
supported until version 1.11 of the dune language.
There are no supported versions of this extension in version 1.1 of the dune
language.

Thus I'd like to switch to dune 2.0. But if I do so, I then have an issue with examples/dune that uses action:

File "examples/dune", line 21, characters 1-40:
21 |  (action
22 |   (diff dune.inc dune.inc.gen)))
Error: 'action' was deleted in version 2.0 of the dune language. Use a rule
stanza with the alias field instead

@rbonichon Do you think you could rewrite examples/dune as suggested in this message, so that we can switch to dune 2.0?

bobot commented 3 years ago

I will do it, it will allow me to see what I have done there. We ponder how to add support for generated rule in dune and this is one of the place where I could use it.

backtracking commented 3 years ago

thanks!

bobot commented 3 years ago

It should be done in 85fb24d. I was surprised that ppx_bitstring was not in the dependencies of mlpost.

backtracking commented 3 years ago

I had not updated mlpost.opam yet. That was on the TODO list for the release, which I should be doing soon. So thanks for having taken care of that!