Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Wrong module for "go to definition" #280

Open
fotonmoton opened this issue Jul 23, 2019 · 3 comments
Open

Wrong module for "go to definition" #280

fotonmoton opened this issue Jul 23, 2019 · 3 comments

Comments

@fotonmoton
Copy link

fotonmoton commented Jul 23, 2019

Go to definition sends to the wrong line in module.

To reproduce:

  1. Open .ml file with external modules in use
  2. Ctrl + click on functor/function/etc

Expected behavior: Editor opens right module with highlighted definition that was previously selected

Actual behavior: Editor opens wrong module and points to wrong line

image
image

Env:
OCaml: The OCaml toplevel, version 4.08.0
Dune: 1.10.0
Merlin: 3.3.1

Repo for reproduction.

@fotonmoton
Copy link
Author

Can reproduce only for definitions in first part of code in test repo, before open Base.

@fotonmoton
Copy link
Author

Actually "go to definition" on functions from Base.Map sends editor to standard Stdlib.Map functions.

image
image

@fotonmoton
Copy link
Author

Sorry, I saw Xavier Leroy, project Cristal and think it was map.ml from standard library. When I try to "go to definition" editor always jumps to map.ml from Base package, that's why when I select definitions above open Base in test repo I get wrong lines and definitions after works fine.

So, I think, open Base somehow confuses Merlin/VScode plugin and definitions with same names but from different modules point to same place.

image

@fotonmoton fotonmoton changed the title Wrong line for "go to definition" Wrong module for "go to definition" Jul 24, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@fotonmoton and others