jaredly / jaredly/reason-language-server

Go to definition and autocompletion do not work when using module rec

Open
#375 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
OCaml
Stars
649
Forks
85
PR merge metrics
No merged PRs in 30d

Description

### Issue
when using `module rec` "go to definition" and autocompletion do not work

### Demo
https://github.com/antonstefanov/delme-reason-ls-repro/blob/master/src/Demo.re

```reason
// A.re
module Child1 = {
let concat = (a, b) => a ++ b;
let concat2 = (a, b) => a ++ b;
};
module rec Child2: {let concat: (string, string) => string;} = {
let concat = (a, b) => a ++ b;
};
```
```reason
// Demo.re
// autocompletion, go to definition work
let a = A.Child1.concat("a", "b");
// Child2 is a rec module
// autocompletion, go to definition do NOT work
let b = A.Child2.concat("a", "b");
```

(possibly related, so I won't open a new issue, but there's also an external library in `External.re` and go to definition does not work either)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Demo.re reproduction and compare the working A.Child1.concat case with the failing A.Child2.concat module rec case. Trace the language-server handling of these definitions and the External.re example; done means go-to-definition and autocompletion work for the recursive module case without regressing the existing case.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.