rescript-lang / rescript-lang/rescript-vscode
Missing go to module definition in first class modules and functors
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- ReScript
- Stars
- 354
- Forks
- 63
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 1
Description
To reproduce with rescript 9.1.4:
module type Database = {
let query: string => unit
}
module MakeHandler = (Db: Database) => { // Go to definition here fails, when it clearly compiles
let handle = (str1, str2) => {
Db.query("select * from what")
Js.log(str1)
Js.log(str2)
}
}
module Handler = MakeHandler({
let query = str => Js.log(str)
})
let handler = (module(DB: Database)) => { // Also fails
DB.query("asdfasdfads asd fadsf as")
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported failures with ReScript 9.1.4 using the first-class module and functor examples in the issue. Trace the go-to-definition handling for Db.query and DB.query; done means both references navigate to the corresponding Database.query definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100