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?
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
For example a more common case is to call npm from dune
I guess it depends what's your main driver going to be
if that's dune, then it makes sense to dunerize small rules
if that's not dune.
A big motivation to have dune as a driver is dune-release
ah, I guess that's a reasonable heuristic then
Sometimes having Dune as the driver will have limitations though, like directory targets not being properly supported.
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
Yup, there are many limitations, that's of course something to keep in mind.
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...
Even editor integration is a bit hacky
Last updated: Oct 16 2021 at 09:07 UTC