Closed
Description
Steps to reproduce:
- Install vscode-syntax-tree & make sure it's in working order on existing source files
- Use
code foo.rb
to open a buffer with a name, on a file that doesn't yet exist on disk - Type some Ruby code into the buffer to trigger a
textDocument/inlayHints
request
Outcome: the stree
process crashes with ENOENT
Desired: the process recovers from file-not-exist (either by failing the jsonrpc request, or perhaps by grabbing fresh content from the request and putting it into the store).
Full backtrace here:
<snip>/syntax_tree-2.8.0/lib/syntax_tree/language_server.rb:26:in `binread': No such file or directory @ rb_sysopen - /tmp/bar.rb (Errno::ENOENT)
from <snip>/syntax_tree-2.8.0/lib/syntax_tree/language_server.rb:26:in `block in run'
from <snip>/syntax_tree-2.8.0/lib/syntax_tree/language_server.rb:68:in `run'
from <snip>/syntax_tree-2.8.0/lib/syntax_tree/cli.rb:262:in `run'
from <snip>/syntax_tree-2.8.0/exe/stree:9:in `<top (required)>'
Metadata
Metadata
Assignees
Labels
No labels