jaredly / reason-language-server

A language server for reason, in reason
MIT License
659 stars 84 forks source link

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

Open antonstefanov opened 4 years ago

antonstefanov commented 4 years ago

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

// 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;
};
// 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)

antonstefanov commented 4 years ago

hey @jaredly if I don't know anything about rls, what is a good place to start in order to trace this issue?

antonstefanov commented 4 years ago

possibly related issue https://github.com/BuckleScript/bucklescript/issues/3931