Skip to content
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

Fix LSP workers crash on file removal #1237

Closed
wants to merge 1 commit into from

Conversation

tk0miya
Copy link
Contributor

@tk0miya tk0miya commented Sep 28, 2024

When a file is removed, VSCode sends a $/file/reset request where the content field is nil.

For example, the following request is sent from VSCode:

[Steep 1.7.1] [interaction:interaction] [frontend] request={:method=>"$/file/reset", :params=>{:uri=>"file:///Users/tkomiya/work/tmp/tmp/sig/app.rbs", :content=>nil}, :jsonrpc=>"2.0"}

This update adds fallbacks to an empty string when the content is nil.

Closes #1236

When a file is removed, VSCode sends a `$/file/reset` request where the
content field is nil.

For example, the following request is sent from VSCode:

```
[Steep 1.7.1] [interaction:interaction] [frontend] request={:method=>"$/file/reset", :params=>{:uri=>"file:///Users/tkomiya/work/tmp/tmp/sig/app.rbs", :content=>nil}, :jsonrpc=>"2.0"}
```

This update adds fallbacks to an empty string when the content is nil.

Closes soutaro#1236
@soutaro soutaro closed this Nov 14, 2024
@tk0miya tk0miya deleted the lsp/crash_on_file_reset branch November 14, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LSP workers crash on file removal
2 participants