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
Jump to incorrect module #1748
Labels
Comments
voodoos
added a commit
to voodoos/merlin
that referenced
this issue
Apr 12, 2024
Thanks for the precise reproduction, I am adding it to the test suite in #1750 |
I also pushed a potential fix for the issue in the reproduction PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I've recently joined the Jane Street compiler team. We've had a user report a bug, which I've included reproduction steps for below. Essentially, there is an
import.ml
file, which includes another module namedImport
. This leads to aImport.Import
module existing in scope. When another file containsopen Import
, Merlin traces the location ofImport
to the correct location when the file is a.ml
file but incorrectly traces toImport.Import
when the file is a.mli file
.Reproduction Steps
cd
into thejump_to_wrong_import
directorydune build
ocamlmerlin single locate -position 1:10 -look-for implementation -filename lib/foo.mli < lib/foo.mli
This gives:
Compare this to
ocamlmerlin single locate -position 1:10 -look-for implementation -filename lib/foo.ml < lib/foo.ml
, which gives the expected:Version info:
ocamlmerlin
built from d5dd40e70eceabe7f9c7c413141430e57e44ded4 (up-to-date master as of the time of posting this)dune
3.14.2ocaml
4.14.2Full opam env:
The text was updated successfully, but these errors were encountered: