Hi Everyone,
I’m trying to create a plugin that has dependencies on external OCaml packages. I am aware of the linking issues with this, but using dune
I can compile my plugin with relative ease.
The problem occurs when I actually try to use my plugin. If I try to load the master .vo
file of my plugin, I encounter ML loadpath errors. Coq cannot find the libraries I am referencing using Declare ML Module
. This is not surprising, because during the build dune
was managing the load path, but after compilation Coq’s load path is not updated. So I will have to do this myself in my opam package.
What I came up with is to use Opams subst feature, to automatically substitute the path of opams lib
directory. I can then update the loadpath in a .v
file using Add ML Path "%{lib}%/the-library-dir
. Opam will automatically substitute %{lib}%
with the correct directory.
However, unfortunately this does not work due to this bug. I’d like to know if other people have solved this problem before, and how.
Thanks!