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
┌ Warning: Some Julia code in the VS Code extension crashed with
│ e =
│ MethodError: no method matching parentof(::Nothing)
│ Closest candidates are:
│ parentof(!Matched::StaticLint.Scope) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/StaticLint/src/scope.jl:92
│ parentof(!Matched::CSTParser.EXPR) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/CSTParser/src/spec.jl:294
└ @ Main ~/Documents/Git/julia-vscode/scripts/error_handler.jl:5
ERROR: MethodError: no method matching parentof(::Nothing)
Closest candidates are:
parentof(!Matched::StaticLint.Scope) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/StaticLint/src/scope.jl:92
parentof(!Matched::CSTParser.EXPR) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/CSTParser/src/spec.jl:294
Stacktrace:
[1] retrieve_scope(::Nothing) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/StaticLint/src/utils.jl:138
[2] process(::LanguageServer.JSONRPC.Request{Val{Symbol("julia/getModuleAt")},LanguageServer.TextDocumentPositionParams}, ::LanguageServerInstance) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/LanguageServer/src/requests/features.jl:314
[3] run(::LanguageServerInstance) at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/packages/LanguageServer/src/languageserverinstance.jl:251
[4] top-level scope at /home/pfitzseb/Documents/Git/julia-vscode/scripts/languageserver/main.jl:59
[5] include(::Module, ::String) at ./Base.jl:377
[6] exec_options(::Base.JLOptions) at ./client.jl:288
[7] _start() at ./client.jl:484
Not 100% what triggers this though.
The text was updated successfully, but these errors were encountered:
Ok, so when the current position is in whitespace then get_expr1 returns nothing. The best solution here would be to call something like next_expr, but I'm not sure if we have that already. Could presumably just increment the offset until we find an expr?
There's a version of get_expr that always returns an EXPR, I'll have a look and work out which one. The getModule handler should also probably be adjusted to handle a nothing response as well though (to return Main?) - e.g. in the case of an empty document.
Not 100% what triggers this though.
The text was updated successfully, but these errors were encountered: