Skip to content

Manifest: generate octez-deps.opam et al.

Romain requested to merge nomadic-labs/tezos:romain-opam-lock into master

Context

This MR is a step towards using opam lock to replace tezos/opam-repository.

This MR modifies the manifest so that it generates opam/octez-deps.opam, which is a file that contains all external dependencies of Octez, along with their version constraints. One can then run opam install opam/octez-deps.opam to install them instead of using make build-deps, for instance. And one can run opam lock opam/octez-deps.opam to generate octez-deps.opam.locked, which is basically the same file but with all transitive dependencies and where all dependencies have fixed version numbers. The exact version number is the one which you have currently installed (for instance with opam install opam/octez-deps.opam).

This MR used to also generate opam/octez-tps-deps.opam. The idea was to separate TPS-specific dependencies in a different lock files so that devs and users don't have to install postgresql. To this end, I added a notion of profiles to the manifest. A profile corresponds to a variant of octez-deps file. Thanks to !6165 (merged) however we no longer need this different profile. But I'd like to keep the profile mechanism in the manifest even if it's unused in case we want to introduce other tools like TPS.

I also added a manually-written opam/octez-dev-deps.opam file. In other words, we have:

  • octez-deps.opam that we could use to replace make build-deps
  • octez-dev-deps.opam that we could use to replace make build-dev-deps

This MR updates the scripts that can be updated to use octez-{,dev-}deps.opam.

In the future, we plan to:

  • generate and commit lock files too
  • use them to improve the scripts further, in particular remove the packages folder of tezos/opam-repository and replace it with those lock files
  • and finally, remove tezos/opam-repository by moving Docker image generation to tezos/tezos.

Manually testing the MR

Run either make build-deps or opam install opam/octez-deps.opam. Then opam lock opam/octez-deps.opam creates octez-deps.opam.locked.

Run ./scripts/update_opam_repo.sh to check that it still works.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Romain

Merge request reports