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

incorrect .merlin but no warning when using per_module #2596

Closed
Khady opened this issue Aug 30, 2019 · 5 comments · Fixed by ocaml/opam-repository#17967
Closed

incorrect .merlin but no warning when using per_module #2596

Khady opened this issue Aug 30, 2019 · 5 comments · Fixed by ocaml/opam-repository#17967

Comments

@Khady
Copy link
Contributor

Khady commented Aug 30, 2019

We have a library using per_module in the preprocess part. It seems that dune generates an incorrect .merlin file as soon as per_module is used. It doesn't include the FLG -ppx ... line.

An easy way to reproduce (with dune 1.10 at least) is to create a library with a single file and this dune file:

(library
 (name demo)
 (preprocess (per_module ((pps lwt_ppx ppx_expect) demo))))
@ghost
Copy link

ghost commented Sep 2, 2019

Yh, it's because the merlin ppx config is global to a directory. We have a plan with @trefis to change the way dune communicates the config to merlin and in particular make it per-file rather than per-directory.

@Khady
Copy link
Contributor Author

Khady commented Sep 2, 2019

I understand that there is a plan like this. I think it was mentioned in the issue which led to the introduction of the warning when dune can't generate a full .merlin file. Here we were surprised because there is no such warning, dune is silent about the problem.

@ghost
Copy link

ghost commented Sep 2, 2019

Ah indeed. That seems wrong. I suppose we wanted to fix the problem where one has several library stanzas in the same directory but didn't consider this case. We should emit a warning in this case as well.

@voodoos
Copy link
Collaborator

voodoos commented Jan 14, 2021

@Khady this should be fixed with dune 2.8.0 : config is per-module now so it is no more approximated

@rgrinberg
Copy link
Member

Why was this re-opened?

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