jaredly / jaredly/reason-language-server

bug when file of record module is moved to another folder

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

Description

i'm using WSL
bs-platform: 5.0.6

steps to reproduce:

1. create react reason app
bsb -init my-react-app -theme react-hooks

2. run the app
yarn start or npm run start

3. create new file for /src/School.re and fill with this
`type person = {
age: int,
name: string
}`

4 insert new code into /src/Demo.re
`let me: School.person = {
name: "my name",
age: 25
}`

5. create new folder for /src/folder

6. move School.re to /src/folder

7. now you will get an error from terminal like this one
![image](https://user-images.githubusercontent.com/3635850/66843670-4ea44780-ef97-11e9-8d23-de0a2b50d654.png)

8. make an some edit to /src/Demo.re file and saved
just insert some whitespace

9. then you will get an error
![image](https://user-images.githubusercontent.com/3635850/66843812-7d222280-ef97-11e9-9fdf-8d1cb8bb77f2.png)

alternative solution is to "Reload the VSCode"
![image](https://user-images.githubusercontent.com/3635850/66843878-91feb600-ef97-11e9-8121-8f5c686d3dee.png)

and re-start the app, and error will gone

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue in WSL with the bs-platform 5.0.6 React Reason app described: define School.person, reference it from Demo.re, move School.re into a folder, then edit Demo.re. Compare the language-server and restart behavior before and after the move; done means the moved module remains recognized without reloading VSCode or restarting the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml, vscode
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.