rescript-lang / rescript-lang/rescript-vscode

LSP needs to handle non existing files

Open
#1,159 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

Not sure what we should do but I had the following:

  • I opened a new .res file on a specific branch.
  • I switched to the main branch (where the new file doesn't exist)
  • My editor still holds the removed file.

This now leads to a crash in the LSP server.

We probably need to clean up the internal state and not try to do provide any lsp responses for that file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LSP server path handling an editor-held file after switching branches. Trace how its internal state handles a file that no longer exists; done means the server no longer crashes and provides no LSP responses for that file. No file or test is named, so locating the relevant code and adding coverage requires repository research.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.