Dune no longer generating .merlin files?

I’m currently using Dune 2.8.2 and it seems like it won’t generate .merlin files anymore. My .merlin files for a project are several months old and if I delete them, I can’t seem to get dune to rebuild them. I tried running dune clean followed by dune build as well as dune build @check. Is there a special command I need, or does dune not support this anymore?

Hi @basus,

Merlin 3.4.0 + Dune 2.8.0 now communicate with each other directly, rather than via the file system. You may be interested to read @vdspost announcing the release of 3.4.0, which explains the change itself, and @trefisblog post which gives some of the rationale for why it has been made.

2 Likes

I see. That makes sense, but I think I’m running into some sort of edge case. I have a module named Util in my project, but when I try merlin-locate on it (via Emacs) I can get an error like:

"Several source files in your path have the same name, and merlin doesn't know which is the right one: ~/src/project/lib/util.ml, ~/.opam/4.11.0/lib/ocamlgraph/util.mli, ~/.opam/4.11.0/lib/ocamlgraph/util.ml, ~/src/project/lib/util.ml".

It’s not a big deal, Merlin finds other modules just fine (including modules inside Util) and dune can still build everything fine. But I’m wondering if I’m hitting a bug with Dune/Merlin, or if there’s something I need to tweak something in my configuration.

Is it a wrapped library? If so then I’m not sure how the error could happen :thinking: