ocaml / ocaml/dune

interop between dune and merlin since 2.8 does not work with ppx_expect

Open
#4,479 15 comments 0 reactions 1 assignee View on GitHub

@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

Specifications

  • Version of dune (output of dune --version): 2.8.5
  • Version of ocaml (output of ocamlc --version): 4.11.1
  • Operating system (distribution and version): macos 11.2.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.