setup-ocaml icon indicating copy to clipboard operation
setup-ocaml copied to clipboard

OPAM CI and setup-ocaml differ in treatment of depexts on macOS?

Open mgree opened this issue 3 years ago • 3 comments

Right now libdash-0.3 builds in OPAM CI but not in GitHub CI. There are a number of issues, but one of them seems to be how external dependencies are treated on macOS, namely that conf-aclocal isn't installing automake.

When running in the OPAM CI, depexts are installed at the beginning of the procedure, like you'd expect (CI run).

When running in the GitHub CI, virtual packages for depexts are run inline and fail their tests without invoking the host package manager (CI run on macOS 11; CI run on macOS 12; grep for automake).

Am I invoking things wrong, or is there a real discrepancy in the environment?

(I originally filed an issue on opam-repository, but it seems likely that this is an issue with setup-ocaml's treatment of depexts.)

mgree avatar Aug 01 '22 14:08 mgree

I think it's probably due to our use of opam 2.0 mode with opam 2.1. There aren't many clear solutions right now and we're just waiting for the 2.2 release with native Windows support. CC: @dra27

smorimoto avatar Aug 01 '22 15:08 smorimoto

opam-ci is using opam 2.1, which has integrated support for invoking the package manager. setup-ocaml uses opam 2.0 at the moment - you just need to add a call to opam depext libdash before opam install in the workflow file (or call the package manager directly to install automake).

dra27 avatar Aug 01 '22 15:08 dra27

Thank you! This exact workaround was suggested over on the original issue, and it solves that problem. (It doesn't solve my other problems, but that's on me. 😅)

It may not be worth it if this is a temporary difference, but it might be good to mention this difference in docs. Or, stronger still, to automatically do it unless disabled by a flag in the workflow.

mgree avatar Aug 01 '22 18:08 mgree