You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been wondering for some time how difficult it would be to have Merlin perform whole-project typechecking instead of doing it one file at a time, as today. This is in my view the main difference between Dune watch mode and Merlin, but if Merlin could do whole-project analysis, there would be less of a need to use Dune watch mode (which is much, much slower than typechecking via Merlin in large projects). This is the way Rust analyzer https://rust-analyzer.github.io/ works and it is pretty great.
I don't know how much sense it makes in Merlin's present architecture, but, naïvely, I see Merlin maintaining a mapping from .cmi files to signatures. Whenever Merlin typechecks a file it would update the mapping with the new signature. And whenever it needs to load a persistent signature it would use the one present in the mapping, if any, rather than the one on disk.
Anyway, I thought I would bring up the question in case it triggers any interesting discussion. Thank you for your work on Merlin!
The text was updated successfully, but these errors were encountered:
Hello,
I have been wondering for some time how difficult it would be to have Merlin perform whole-project typechecking instead of doing it one file at a time, as today. This is in my view the main difference between Dune watch mode and Merlin, but if Merlin could do whole-project analysis, there would be less of a need to use Dune watch mode (which is much, much slower than typechecking via Merlin in large projects). This is the way Rust analyzer https://rust-analyzer.github.io/ works and it is pretty great.
I don't know how much sense it makes in Merlin's present architecture, but, naïvely, I see Merlin maintaining a mapping from
.cmi
files to signatures. Whenever Merlin typechecks a file it would update the mapping with the new signature. And whenever it needs to load a persistent signature it would use the one present in the mapping, if any, rather than the one on disk.Anyway, I thought I would bring up the question in case it triggers any interesting discussion. Thank you for your work on Merlin!
The text was updated successfully, but these errors were encountered: