-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
Migration to dune #8801
Migration to dune #8801
Conversation
because ocamlcommon.cmxa is no longer linked in
This reverts commit 38e016a.
We should be good here. Some remarks:
Before merging I would like @Aurel300 and @RealyUniqueName to confirm that |
Note that when checking out this branch you'll probably need a |
Works flawlessly here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ 🚀
I realized that the dune commands would scan all subdirectories, which caused the delay I was experiencing. I've added a toplevel I had to add a workaround |
@@ -324,4 +208,4 @@ FORCE: | |||
.ml.cmo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the suffix rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not.
I was thinking that we could absorb most of the makefile into the prebuild program anyway. That should be more fun to maintain. We would then just use the makefile targets to pass information to prebuild.
This mess tries to get Haxe working with the dune build system. At the moment, nothing works.
Prebuild
We can manually run this sequence:
Ultimately, we want to handle this like grammar.ml is handled. There's a
dune
file in src/syntax with this content:In the case of prebuild, I couldn't figure out who is supposed to make sure the .exe is built, and how to reference is from the action.
For now I have added both defineList.ml and metaList.ml to the source so we can get other errors.
Update: Solved by edf1bdc
version.ml
This currently uses a dummy rule:
We'll have to look into how to migrate this whole
ADD_REVISION
business.Update: Solved (not very prettily) by 212c506
Meta naming conflict
I couldn't find a solution for this yet. There's a stackoverflow question where the answer at the bottom suggests that module files can be wrapped, but I couldn't get that to work.
This has to be solved before we can do anything really... I would like to avoid renaming our
Meta
module because it's the most referenced module in our codebase (of couse it is).Update: Solved by adding
(wrapped_executables true)
todune-project
.Update: Solved again by not linking sedlex.ppx, which avoids pulling ocamlcommon.cmxa. We no longer wrap executables.
Native C
I didn't get to the part where we deal with native C bindings for extc and pcre yet. There's an example in the dune quickstart guide that should be easy to adapt:
Update: Kind of solved, but there's a stupid hack for
objsize
to find its dependencies.Release vs. dev env
Right now, we can only build anything with
--profile=release
. Building in the default dev mode just generates a video of OCaml developers laughing at our codebase, by which I mean that there are lots of warnings-turned-errors that we have to fix.Explicit library opening
I think we way this works is that we're supposed to explicitly
open Extlib_leftovers
in places where we use its types. This is slightly annoying, but should be a one-time change. The only issue is that the current makefile-based building no longer works because libraries are implicitly opened there.Update: "Solved" by using
(wrapped false)
, but ultimately we should fix this in our codebase I think.