Should the root opam file be named 'opam' or '<my_project_name>.opam'?

What is the recommended practice?

I use dune, if that matters.

Ok, dune has an answer to that:
Error: You cannot declare items to be installed without adding a <package>.opam file at the root of your project.


This is also the reason why most packages have moved away from opam. Adding the package name also allows to have multiple opam files, which is useful if you have subpackages (e.g. for optional dependencies).

1 Like