mirage / irmin-watcher

Portable implementation of the Irmin Watch API
ISC License
14 stars 15 forks source link

Fix build on Alpine 3.19 for OCaml 5.1 #35

Closed shakthimaan closed 7 months ago

shakthimaan commented 7 months ago

The PR changes have been tested on Docker ocaml/opam:alpine-3.19-ocaml-5.1 that successfully builds irmin-watcher and runs the tests.

The libffi-dev package needs to be installed on Alpine 3.19 for the dependencies to be installed though.

$ sudo docker run -it ocaml/opam:alpine-3.19-ocaml-5.1 bash
$ git clone https://github.com/mirage/irmin-watcher.git
$ cd irmin-watcher
$ sudo apk add libffi-dev
$ opam install . --deps-only --with-test -y
$ dune build
$ dune test
art-w commented 7 months ago

Looks great, thanks a lot!

samoht commented 7 months ago

I'm not sure I understand why the fix is related to Alpine. If you need an extra depext, do you mind adding it in the opam file as well?

art-w commented 7 months ago

Indeed the fix is yet another breakage introduced by mtime 2.0 api change, I guess it was discovered on alpine or by the CI, but I should have renamed the PR before merging.

I don't think we need to add a depext as conf-libffi is already required by the dependency that needs it (fsevents -> cf -> ctypes-foreign), it's just that the opam running by default on this docker has version 2.0 and can't install the depext automatically (opam-2.2 is also in the image and works).

However the github actions for macos reveal a funny cyclic dependency triggered by odoc! :D I'll look into it.