Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hhugo
Copy link
Contributor

@hhugo hhugo commented Jul 18, 2023

Continue the effort started in #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:

  • move sources in sub directories
    • src/ : source of zarith library
    • src/top/ : source of the toplevel printers
    • config/ : dune-configurator executable to compute flags used by the c compiler
  • The meta and opam file is now generated by dune
  • config/discover.ml replaces the configure script

@rgrinberg
Copy link
Member

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

@xavierleroy
Copy link
Contributor

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
Copy link

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...

ejgallego and others added 3 commits September 10, 2024 22:20
TODO:

- configuration
- fix warnings
- run tests
- opam generation?
- CI?
fix opam install, generate META

restore version

continue

WIP

more

WIP

WIP

fix after rebase

fix ci

fix ci

fix ci

fix ci

fix ci

fix ci

fix ci

fix ci

linkall toplevel lib

empty interface of toplevel lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants