Closed XVilka closed 5 years ago
The usual way to handle this is to make a library
with the common parts (eg Some_file1
and Some_file2
) and use the library from both executables.
This is a duplicate of another issue and diml mentioned that we're not planning to change this.
For example I have some set of .ml and .mli files, which can form either a distributed node, or a standalone tool (mostly for testing). Lets say I have
I want to build two executables - one is "tool_node + some_file1 + some_file2 + some_file3", and another "tool_standalone + some_file1 + some_file2" (without "some_file3").
But if I use
let somevar = Some_file2.some_func
(from "some_file2.ml" file) in the text of "tool_standalone.ml" - it complains about unbound module. Would be nice to allow dune handle this case.