Stream: Dune devs & users

Topic: dune as Makefile replacement


view this post on Zulip Karl Palmskog (Jun 10 2020 at 13:06):

I have some projects where I mix OCaml and other languages such as as Standard ML, LaTeX, etc. Is it recommended to replace Makefiles completely with dune, even for non-OCaml stuff? Any obvious drawbacks/gotchas?

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:08):

I'm sure others can comment more, I think it totally boils down to your preferences. Not problem in having make and dune working together I think

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:08):

For example a more common case is to call npm from dune

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:08):

I guess it depends what's your main driver going to be

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:08):

if that's dune, then it makes sense to dunerize small rules

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:09):

if that's not dune.

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:09):

I dunno

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:09):

A big motivation to have dune as a driver is dune-release

view this post on Zulip Karl Palmskog (Jun 10 2020 at 13:09):

ah, I guess that's a reasonable heuristic then

view this post on Zulip Théo Zimmermann (Jun 10 2020 at 13:20):

Sometimes having Dune as the driver will have limitations though, like directory targets not being properly supported.

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:25):

Thinking a bit more, usually it pays off to dunerize a rule when the rule wants to be run under the _build environment, for example, the rule wants to call some binaries built by dune, etc... Or you have some special envs that refer to dune's output

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:28):

Yup, there are many limitations, that's of course something to keep in mind.

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:29):

I think quite a bit of work towards lifiting them is underway tho, for example instrumentation is still not very well supported, cross compilation, dirs as targets, etc...

view this post on Zulip Emilio Jesús Gallego Arias (Jun 10 2020 at 13:29):

Even editor integration is a bit hacky


Last updated: Oct 16 2021 at 09:07 UTC