Please commit dune-project files in your repositories :)

Hello,

Just a quick message to ask dune users to commit the dune-project file in their repositories. We introduced this file in Dune 1.0.0. Among other things, its main goal is to declare what version of Dune the project was written against.

For instance, if you write (lang dune 1.5) in your dune-project file then:

  • if you use a feature that was deprecated in Dune 1.6.0, you will not get a warning whatever version of Dune you are using
  • if you use a feature that was deleted in Dune 2.0.0, Dune 2.0.0 will still be able to understand your project and even build it in the majority of cases

It’s only when you decide to modernise your project and increase the version in the (lang dune x.y) line that you will have to take action and update your dune files.

If you don’t have a dune-project file in your repository, then Dune will assume that you are using the latest version of the language. This means that the build of your project could be broken by a major release of Dune.

8 Likes