Generated opam files in SCM for projects using dune

Recently I converted some existing libraries to use dune as buildsystem. Since a while dune can create <package>.opam files from dune-project. Since a dune-project file is required anyway it feels wrong to maintain the opam info in two files. Therefore I think *.opam files should not be kept in SCM.

Does opam make any use of the *.opam files in a SCM? I think it uses just the files downloaded from the opam repositories.

1 Like

You need opam files in the repo for pinning or installing them from the dev repo.

When this feature originally came out I thought I can avoid having this information duplicated but it currently is not feasible. There is some effort underway to tell opam how it can get the information (e.g. “call dune to get an opam file”) but so far the ecosystem is not ready.

1 Like