Skip to content

missing some compiler error locations when using Dune + ppxlib + OCaml 5.4 #618

@gasche

Description

@gasche

There is a regression in the interaction between Dune, ppxlib and OCaml 5.4.0, which results in some compiler errors being reported with missing location information. This is fairly disruptive in practice (as it breaks "jump-to-error" workflows.)

I believe that the issue is the one discussed in ocaml/ocaml#12991, but this compiler-side issue is fairly difficult to find so I thought that opening another issue where users might look for them could be helpful.

Reproduction steps

In an empty temporary directory:

echo > a.mli
echo "let () = NonExistingModule.run ()" > a.ml
echo "(lang dune 3.0)" > dune-project
echo "(library (name test) (preprocess (pps ppx_here)))" > dune
dune build

Observed output:

File "_none_", line 1:              
Error: Unbound module NonExistingModule

Expected output:

File "a.ml", line 1:              
Error: Unbound module NonExistingModule

(This works properly with OCaml 5.3 and older compiler versions.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions