I’m just getting started with OCaml development, using VSCode as a primary editor. I’m using the
ocamllabs.ocaml-platform extension and it’s working quite well so far, but I have a few questions.
I’m aware that Merlin provides all of the nice IDE-like features, but I think I’m missing some sort of link between my Dune and Merlin configurations. Specifically, I don’t know of a way to make Merlin aware of any changes in my project’s modules until I build them with something like:
and Merlin sees the changes in my
_build directory. So if I change the type of some function in one module and update a function to accept that new type in a different module, Merlin will display an error in the editor indicating that it’s not aware of that new type until I build the other module. And even when Merlin complains like that, I can
dune build just fine.
I know that this is how Merlin works and I don’t think anything is wrong with it, but it seems like the
cmi files that Merlin gets its information from should have some way to be automatically generated/updated? Am I missing some piece of a more common, better workflow? I’ve looked for sources online describing a better workflow with this but haven’t had any luck.
Would very much appreciate any pointers or ideas that might help me smooth this out!