Skip to content

New repo layout regarding opam files

Hugo Heuzard requested to merge nomadic-labs/tezos:hhugo-mv-opam into master

Context

History - what we have

  • .ocamlformat files were duplicated in the tree because their scope stops at dune-project files.
  • We have many dune-project files in the tree because that is a condition for having opam files in sub-directories. Dune only know about opam packages living next to dune-project
  • We didn't want to have hundred of opam files at the root
  • This forces us to have a dedicated script for pinning, because opam doesn't scan opam files in sub-directories yet.

Dune and opam features - what we can do

  • opam looks for opam files in the root and in an opam directory at the root
  • We can let dune know about packages by declaring them in dune-project files

Changes

  • Move tezos opam files (the ones under the manifest control) into %{root}/opam/*.opam
  • remove dune-project files that are no longer next to opam files (but at the root)
  • remove ocamlformat files that are not longer next to a dune-project file
  • add package to documentation and install dune stanza
  • no longer try to install non-installable opam packages (because they depend on a library present in vendors only) in opam-trigger.
  • The dune semantic of vendors forces us to rm vendors before installing any opam packages from the repo. The consequence is that we can no longer install a bunch of opam packages inside opam:trigger (improvement planed in !5157 (merged))

Issues

  • opam pin might take longer, because we need to sync the entire repo for every packages. Previously, we would only sync the relevent part of the repo for a given package. Fix in a followup MR !5252 (merged)

(depends on !5152 (merged) !5161 (merged) !5164 (merged))

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Hugo Heuzard

Merge request reports