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

Julia VSCode extension crash: MethodError: no method matching scopehasbinding(...) #391

Open
curtd opened this issue Jun 26, 2024 · 0 comments

Comments

@curtd
Copy link

curtd commented Jun 26, 2024

It seems like the name variable set here could potentially be nothing but that case isn't being handled by the existing definitions of scopehasbinding

ERROR: MethodError: no method matching scopehasbinding(::StaticLint.Scope, ::Nothing)

Closest candidates are:
  scopehasbinding(::StaticLint.Scope, !Matched::String)
   @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/scope.jl:57

Stacktrace:
  [1] add_binding(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document}, scope::StaticLint.Scope)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/bindings.jl:354
  [2] add_binding
    @ ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/bindings.jl:274 [inlined]
  [3] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:75
  [4] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
  [5] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
  [6] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
  [7] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
  [8] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
  [9] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [10] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [11] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [12] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [13] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [14] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [15] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [16] followinclude(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:334
 [17] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:80
 [18] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [19] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [20] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [21] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [22] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [23] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [24] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [25] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [26] followinclude(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:334
 [27] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:80
 [28] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [29] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [30] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [31] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [32] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [33] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [34] traverse(x::CSTParser.EXPR, state::StaticLint.Toplevel{LanguageServer.Document})
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:227
 [35] (::StaticLint.Toplevel{LanguageServer.Document})(x::CSTParser.EXPR)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:94
 [36] semantic_pass(file::LanguageServer.Document, modified_expr::Nothing)
    @ StaticLint ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:176
 [37] semantic_pass
    @ ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/StaticLint/src/StaticLint.jl:172 [inlined]
 [38] relintserver(server::LanguageServerInstance)
    @ LanguageServer ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/LanguageServer/src/languageserverinstance.jl:451
 [39] run(server::LanguageServerInstance; timings::Vector{Any})
    @ LanguageServer ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/LanguageServer/src/languageserverinstance.jl:430
 [40] run(server::LanguageServerInstance)
    @ LanguageServer ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/LanguageServer/src/languageserverinstance.jl:283
 [41] top-level scope
    @ ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/languageserver/main.jl:104
 [42] include(mod::Module, _path::String)
    @ Base ./Base.jl:495
 [43] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:318
 [44] _start()
    @ Base ./client.jl:552
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

No branches or pull requests

1 participant