Closed benmandrew closed 10 months ago
This PR contributes towards https://github.com/ocurrent/ocaml-ci/issues/682.
Side-note: distro.ml
is mostly copied from dockerfile-opam
as it felt wrong for an OBuilder spec library to depend on the Dockerfile library! This file accounts for well over half of the new LOC, so it may be useful to extract this redundancy out at some point in the future.
While I understand the reason behind the duplication, it is already cumbersome to keep the distro list in sync with the real-world. Unless we extract it from dockerfile-opam
, I'm afraid duplication will introduce more problems that it's trying to solve.
The difficulty is that dockerfile-opam
does not have any consideration for MacOS. Adding support was attempted but there was some reasonable pushback here — https://github.com/ocurrent/ocaml-dockerfile/pull/118#issuecomment-1280839961.
@tmcgilchrist do you think this warrants extraction of the shared distro information, with MacOS added, into some 'opam-distro
' project? It no longer seems only relevant to Docker; increasingly many projects now are using the Distro
module alone.
This is no longer planned for the time being.
OCaml-CI and opam-repo-ci share a lot of platform-specific code for generating OBuilder spec files. This PR is a work-in-progress to extract some of that shared opam-related code out, in a similar manner to
ocaml-dockerfile-opam
in ocurrent/ocaml-dockerfile.