I am not sure how to exactly formulate the problem, so I will start by describing a scenario:
I have a project with the following structure:
I have the following directory structure:
ml/
dune
test.ml
extracted/
dune
_(lot of .ml files)_
The ml/dune:
(executables_
(names test)_
(libraries extracted))
ml/extracted/dune:
(library
(name extracted)
(wrapped false)
(synopsis "ML code extracted from Coq"))
Doing dune build test.ext under ml complains:
Error: Library “extracted” not found.
I've spent a lot of time to figure out why this is happening. It turns out the problem was in presence of extracted/dune-project file! If this file present, build fails with a cryptic error message. Removing this file fixes the problem.
Some thoughts:
- It is unclear why the presence of this file changes the behavior of the build. It looks harmless as contains only the version number.
- The error message is not helpful.
- I did not create this file. It was auto-created when I tried to run
dune in extracted directory.
It looks like the file auto-creation is a dangerous operation as it could break your build. Also, error reporting could be improved.
I am not sure how to exactly formulate the problem, so I will start by describing a scenario:
I have a project with the following structure:
I have the following directory structure:
The ml/dune:
ml/extracted/dune:
Doing
dune build test.extunder ml complains:Error: Library “extracted” not found.
I've spent a lot of time to figure out why this is happening. It turns out the problem was in presence of
extracted/dune-projectfile! If this file present, build fails with a cryptic error message. Removing this file fixes the problem.Some thoughts:
duneinextracteddirectory.It looks like the file auto-creation is a dangerous operation as it could break your build. Also, error reporting could be improved.