You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty jsonnet file, pressing ctrl+enter for suggestions/diagnostic after s crashes the server
{
s
}
debug output:
time="2022-08-23T04:41:32+03:00" level=info msg="Starting the language server"
time="2022-08-23T04:41:32+03:00" level=info msg="Using tanka mode. Will fall back to the following jpaths: []"
time="2022-08-23T04:41:32+03:00" level=info msg="Initializing jsonnet-language-server version 0.7.2"
time="2022-08-23T04:41:32+03:00" level=info msg="Reading stdlib"
panic: runtime error: index out of range [9] with length 0
goroutine 51 [running]:
github.com/grafana/jsonnet-language-server/pkg/server.(*server).getEvalDiags(0xa03ec8?, 0xc00011a000)
/home/runner/work/jsonnet-language-server/jsonnet-language-server/pkg/server/diagnostics.go:153 +0x629
github.com/grafana/jsonnet-language-server/pkg/server.(*server).diagnosticsLoop.func1.1.1()
/home/runner/work/jsonnet-language-server/jsonnet-language-server/pkg/server/diagnostics.go:55 +0x2a
created by github.com/grafana/jsonnet-language-server/pkg/server.(*server).diagnosticsLoop.func1.1
/home/runner/work/jsonnet-language-server/jsonnet-language-server/pkg/server/diagnostics.go:54 +0x238
[Info - 04:41:33] Connection to server got closed. Server will restart.
VSCode 1.70.2
jsonnet-language-server 0.7.2
vscode-jsonnet: 0.2.4
windows
Looking into the sources of diagnostics.go suggests the fail of regexp match: there is match[9] access,
but match is likely to be empty.
Fixes#49
The parsing was all wrong in some cases and was quite unsafe. This should no longer panic and it fixes a few issues with parsing
All tested now, too
Fixes#49
The parsing was all wrong in some cases and was quite unsafe. This should no longer panic and it fixes a few issues with parsing
All tested now, too
Empty jsonnet file, pressing ctrl+enter for suggestions/diagnostic after
s
crashes the serverdebug output:
VSCode 1.70.2
jsonnet-language-server 0.7.2
vscode-jsonnet: 0.2.4
windows
Looking into the sources of diagnostics.go suggests the fail of regexp match: there is match[9] access,
but match is likely to be empty.
The text was updated successfully, but these errors were encountered: