I´m able to compile the entire Coq codebase using dune without problems. However, it seems there are some problems with merlin not finding modules in plugins with "wrong" names. For example, in the firstorder plugin, in file instance.ml
there are many errors related to modules not found. The first error is actually Unbound module Ground_plugin
, which is strange, because that is not what the plugin is called. The same happens in the funind plugin, where merlin is looking for the Recdef_plugin
. Other plugins, like ltac, do not have this problem. Can anyone else reproduce this?
Works for me, ocaml version, merlin version, dune version?
opam list merlin dune ocaml --installed
# Packages matching: installed & (name-match(merlin) | name-match(dune) | name-match(ocaml))
# Name # Installed # Synopsis
dune 2.8.5 Fast, portable, and opinionated build system
merlin 4.2-411 Editor helper, provides completion, typing and source browsing in Vim and Emacs
ocaml 4.11.1 The OCaml compiler (virtual package)
Mhm, I reinstalled everything in a clean switch, and now it is all working again. I guess I screwed something up in my install somewhere. Sorry for the bother.
Ah, I think I know what was going on: I had old .merlin
files in the repo that were never cleaned up. Since these files are still in the .gitignore
, they did not appear in my git status
and git clean
also left them alone
Yes, the transition to the .merlin-less setup is a bit tricky due to dune still accepting them in case users want to override the default setup.
Interesting, should I stop using .merlin
with ocaml lsp for example?
(only if dune is present?)
dune 2.8.5 will indeed not generate merlin files anymore, tho there is a compat flag somewhere
but if merlin files are around they are kept; problem with merlin files was that they are actually an overapproximation
so this is why it was replaced with a small protocol that queries the build system for the particular flags of files, tuareg + merlin mode in emacs provides a command to inspect this, it is quite useful when things don't work
To add to what Emilio said, ocamllsp will stop supporting .merlin files in the next version anyway.
If you're using dune, you will not notice any difference.
Lasse said:
Ah, I think I know what was going on: I had old
.merlin
files in the repo that were never cleaned up. Since these files are still in the.gitignore
, they did not appear in mygit status
andgit clean
also left them alone
Probably you are not using strong enough options with git clean
then. git clean xfd
should have removed them.
some repos have committed merlin files
Last updated: Oct 13 2024 at 01:02 UTC