irmin icon indicating copy to clipboard operation
irmin copied to clipboard

irmin: add lock files

Open maiste opened this issue 3 years ago • 5 comments

To ensure users can create a switch without error, couldn't we add x.opam.locked files into the repository? Thanks to this, users could simply build a switch with:

 $ opam switch create . --deps-only --locked

The drawback is that when we release a new version, we must update these files.

maiste avatar Nov 15 '21 17:11 maiste

Adding a lock file is a good idea but I would rather recommend users to do opam monorepo pull instead of an opam switch create in that case. The CI should be able to do this automatically.

samoht avatar Nov 15 '21 18:11 samoht

As I'm not a user of opam monorepo: what is the difference between opam switch create and opam monorepo pull?

Also, in this case, should the lock files be created with opam monorepo lock?

maiste avatar Nov 15 '21 18:11 maiste

opam monorepo is a plugin to Opam that automates vendoring of Dune projects in a subdirectory in the project tree, so opam monorepo lock also runs a solver and writes a lock file containing the computed fixed versions, but that lock file also contains the development Git repositories so that the projects can be git clone-ed. Then opam monorepo pull fetches the dependencies locally so that dune build Just Works™ and there's no need to invoke opam to compile things.

AFAIK, the lock file produced by opam monorepo lock is fully-compatible with opam switch create (but the converse is not true).

craigfe avatar Nov 16 '21 09:11 craigfe

Lock files won't be added to this repository. They will be available on tarides/tezos-storage-bench.

Edit: one lock file will be added here, but the lock files for benchmarking will be stored into the other repository.

maiste avatar Feb 09 '22 15:02 maiste

It's still a good idea to have a lock file here for anyone who wants to compile the irmin binary easily.

samoht avatar Feb 09 '22 19:02 samoht

The lock file doesn't seem to be necessary as it has been moved to https://github.com/tarides/irmin-scratch. Closing it. Feel free to reopen if needed.

maiste avatar Sep 28 '22 12:09 maiste