irmin
irmin copied to clipboard
irmin: add lock files
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.
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.
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
?
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).
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.
It's still a good idea to have a lock file here for anyone who wants to compile the irmin binary easily.
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.