interop between dune and merlin since 2.8 does not work with ppx_expect
Open
@voodoos is already working on this.
Since Apr 12, 2021.
merlin
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Expected Behavior
With the project in https://github.com/ocaml/dune/pull/4478, building with dune and then querying using ocamlmerlin succeeds:
$ dune build
$ ocamlmerlin single errors -filename lib/sublib/bar.ml < lib/sublib/bar.ml
{"class":"return","value":[],"notifications":[],"timing":{"clock":39,"cpu":34,"query":2,"pp":0,"reader":4,"ppx":22,"typer":7,"error":0}}
Actual Behavior
With dune 2.7.1 and merlin 4.1, the actual behavior is as expected. But with later versions of dune, ocamlmerlin cannot find the source file:
$ dune build
$ ocamlmerlin single errors -filename lib/sublib/bar.ml < lib/sublib/bar.ml
{"class":"return","value":[{"start":{"line":0,"col":-1},"end":{"line":0,"col":-1},"type":"typer","sub":[],"valid":true,"message":"I/O error: bar.ml: No such file or\ndirectory"}],"notifications":[],"timing":{"clock":47,"cpu":29,"query":2,"pp":0,"reader":4,"ppx":21,"typer":2,"error":0}}
Reproduction
- PR with a reproducing test: https://github.com/ocaml/dune/pull/4478
Specifications
- Version of
dune(output ofdune --version): 2.8.5 - Version of
ocaml(output ofocamlc --version): 4.11.1 - Operating system (distribution and version): macos 11.2.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.