I’m building a library and have an examples directory where some of the code is dependent on libraries that the user may not want to install. So, I created a dune file with a default stanza:
(executables (names example_async) (libraries async core)) (alias (name default) (deps)) (alias (name examples_async) (deps example_async.exe))
This works fine when I am in the directory containing the dune file. I can run
dune build and nothing happens. When I run
dune build @examples_async the exe is built (or fails if the libraries are missing).
However, when I build from the top level of the project with
dune build --debug-dependency-path, I get:
File "examples/async/dune", line 3, characters 25-29: 3 | (libraries async core)) ^^^^ Error: Library "core" not found. -> required by examples/async/example_async.exe -> required by alias examples/async/all -> required by alias examples/default Hint: try: dune external-lib-deps --missing --debug-dependency-path @@default
Is it possible to disable the default action this way or am I missing something?