It’s a very convenient feature for dune
to generate .merlin
files. However merlin does not seem to do a good job with recognizing symbols and locations in project dependencies (though it does a good job for the main project itself)
The B
and S
in the .merlin
file mostly point to the _opam/lib
folder for project dependencies. A lot of symbols have problems in being recognized there.
One possible idea is to do opam install -b ...
to preserve the build files and then the build is available in _opam/.opam-switch/build/
and there merlin seems to do a stellar job. Unfortunately the way .merlin
is setup, symbols refer to the _opam/lib
folder and not the build
folder.
My question is how to I get merlin to reliably work with with source code of project dependencies? Ideally they should point to the build
folder.
merlin
should work out of the box because dune knows how to build the project but sadly it does not. Perhaps I’m doing some thing wrong?