[BUG] Running `ocamlmerlin-server.exe` does not allow moving directory under Windows
After one starts using merlin to edit a file on Emacs under Windows it is not possible to move the containing directory around, which is quite inconvenient. Closing emacs does not solve the problem because the merlin process continues to run in the background. The only solution is to kill the merlin process running in the background.

- Why not shut down the
merlinbackground process when closing Emacs? - Typically this problems happens because a program (Merlin in this case) keeps open handles to the directory or some file within it; if this is indeed the case, perhaps this situation can be avoided? For example even if one is editing a file in a directory with Emacs, that does not keep the containing directory from being renamed.
To reproduce
-
mkdir foo -
emacs foo/foo.ml - Perform some operation that invokes
merlinon thefoo.mlbuffer -
mv foo foo2in the terminal (fails)
Also, am not sure if the problem is the merlin server process or the Dune process that is started in the background (or both).
I did some more digging: it seems the problem is the ocamlmerlin-server.exe process which keeps an open handle to the directory where the file being edited is found.
@let-def ?
This will be fixed in #1569