hillingar icon indicating copy to clipboard operation
hillingar copied to clipboard

Use `opam monorepo` solver instead if `opam admin list`

Open RyanGibb opened this issue 3 years ago • 2 comments

E.g. use

$ opam monorepo lock
$ opam monorepo list

(or read the lockfile instead of list)

RyanGibb avatar Sep 23 '22 14:09 RyanGibb

Currently blocked on https://github.com/tarides/opam-monorepo/issues/333

RyanGibb avatar Sep 23 '22 14:09 RyanGibb

The reason for doing this is to filter non-dune dependent packages from opam-repository.

Mirage 4 builds with dune using opam-monorepo to fetch all dependencies locally to build with cross compilation support. The opam-overlays project was create to patch those packages that don't support building with dune. However, after new version of a such a package is release in opam-repository before a patch is created for the version in opam-overlays, the opam solver could resolve the newer version that will subsequently fail to build with dune. For this reason, opam monorepo filters non-dune dependency (as a proxy for package that don't build with dune) from the repo before solving dependency versions. See a longer discussion here.

A secondary benefit is that is that the opam monorepo solver already removes packages that we use filterPkgs for.

RyanGibb avatar Oct 05 '22 10:10 RyanGibb