Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Merlin's PPX phase cache #1095

Open
pitag-ha opened this issue May 15, 2023 · 0 comments
Open

Handle Merlin's PPX phase cache #1095

pitag-ha opened this issue May 15, 2023 · 0 comments

Comments

@pitag-ha
Copy link
Member

Hello @rgrinberg,

As you know, I've recently implemented a simple cache for Merlin's PPX phase. That cache needs to be explicitly enabled via the configuration.

Desired Behavior

It would be great if ocaml-lsp could enable the PPX phase cache iff the project doesn't use PPX dependencies (i.e. no preprocessor_deps field). So, iiuc, we need to distinguish two cases:

  1. If the project doesn't have a .merlin-file, then ocaml-lsp needs to find out via a dune-rpc call whether the project uses PPX dependencies. If it doesn't, then ocaml-lsp should set the new use_ppx_cache field of config.merlin to true.

  2. If the project has a .merlin-file, then the user (e.g. the user's build system, such as jenga) will take care of Merlin's config and ocaml-lsp doesn't need to do anything in particular (apart from updating the vendored Merlin).

Is that right? Does it sound good to you if we implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant