-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renaming a .res or .resi to another file extension crashes ReScript language server #392
Comments
@cknitt would you give more details on how to repro the crash? |
@cristianoc In the project I am currently working on, just creating an empty A.res and renaming it to A.resx (by selecting it in the VS Code file tree, pressing enter, modifying the name and pressing enter again) reproduces the crash. Is it not reproducible for you this way? Then maybe it has something to do with my project setup (yarn workspaces or whatever). |
It does not seem to be dependent on my project setup. I can even reproduce this as described with a new project created from scratch following https://rescript-lang.org/docs/manual/latest/installation#new-project. |
Turns out vscode calls rescript operations such as |
For what it's worth. Another way to crash the extension: open a non-rescript file, force the editor to consider it ReScript, force an autocomplete. |
This resurfaced after merging the actions branch. |
More robust solution where the file cache is set also for files with extension not `.res` or `.resi`. In case of rename e.g. from `.res` to `.rex` an opened file notification is sent for the `.rex` file and a crash happens when trying to get the current file content. After this change, the file content array is set also for the .rex` file, preventing the crash. Fixes #392
More robust solution where the file cache is set also for files with extension not `.res` or `.resi`. In case of rename e.g. from `.res` to `.rex` an opened file notification is sent for the `.rex` file and a crash happens when trying to get the current file content. After this change, the file content array is set also for the .rex` file, preventing the crash. Fixes #392
I am running one of the latest master builds of the VS Code extension.
When I rename some A.res or A.resi to another file extension, e.g., A.resx, the ReScript language server crashes. This even occurs when A.res/A.resi is empty.
The text was updated successfully, but these errors were encountered: