ocaml / Zarith

The Zarith library implements arithmetic and logical operations over arbitrary-precision integers and rational numbers. The implementation, based on GMP, is very efficient.
Other
226 stars 69 forks source link

[build] [wip] Support for the dune build system v2 #143

Open hhugo opened 1 year ago

hhugo commented 1 year ago

Continue the effort started in https://github.com/ocaml/Zarith/pull/73.

In particular, it tries to address the following comment

To get a more decisive opinion and be excited about this, it would help to see a complete dune-based build system with the configure phase working on all the platforms currently supported by the Makefile

It's rebased on top of the recently merged new CI jobs.

List of changes:

rgrinberg commented 11 months ago

Is there anything else that needs to be done in this PR? It looks good to me.

xavierleroy commented 10 months ago

Is there anything else that needs to be done in this PR? It looks good to me.

First, the PR should not be marked Draft if you want me to look at it.

Second, I still don't understand what we have to gain by switching to a Dune build. This is a trivial project as far as OCaml sources are concerned, but it has a C side with non-trivial configuration and dependencies. That's precisely the kind of project where Dune does not shine. Why insisting on using Dune here?

ejgallego commented 1 week ago

Second, I still don't understand what we have to gain by switching to a Dune build. This is a trivial project as far as OCaml sources are concerned, but it has a C side with non-trivial configuration and dependencies. That's precisely the kind of project where Dune does not shine. Why insisting on using Dune here?

Hi @xavierleroy , the main reason I wrote #73 was to be able to compose the build of Coq and ZArith.

This was essential in order to have a reasonable setup to track a zarith bug we were seeing in Coq more efficiently, but indeed, it may not be a common developer setup.

I guess the main feature ZArith users could benefit given a Dunerization would be build caching, when that is working for opam packages; some other minor features that are convenient are odoc support, dune-release support, hygienic builds, sound incremental builds, etc...