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

lsp-julia crashes with "Possible infinite loop" when typing in Julia document #50

Closed
kwokhao opened this issue Apr 8, 2021 · 1 comment

Comments

@kwokhao
Copy link

kwokhao commented Apr 8, 2021

I set up lsp-julia in emacs to automatically initialize the LanguageServer once I navigate to a Julia file. However, when I try to type the letter d anywhere in the body of the file, I obtain an error (reproduced below) in julia-ls::stderr.

Is there a way to disable the relevant functionality in get_func_hover or collect_completions so that I can use lsp-julia without it constantly crashing? company-dabbrev is sufficient for my purposes, so I do not need completions from lsp.

ERROR: Possible infinite loop.
Stacktrace:
  [1] get_func_hover(b::StaticLint.Binding, documentation::String, server::LanguageServerInstance, visited::Base.IdSet{StaticLint.Binding})
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/hover.jl:101
  [2] get_func_hover(b::StaticLint.Binding, documentation::String, server::LanguageServerInstance, visited::Base.IdSet{StaticLint.Binding})
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/hover.jl:123
  [3] get_func_hover(b::StaticLint.Binding, documentation::String, server::LanguageServerInstance)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/hover.jl:100
  [4] get_hover(b::StaticLint.Binding, documentation::String, server::LanguageServerInstance)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/hover.jl:32
  [5] collect_completions(x::StaticLint.Scope, spartial::String, rng::LanguageServer.Range, CIs::Vector{LanguageServer.CompletionItem}, server::LanguageServerInstance, inclexported::Bool, dotcomps::Bool)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/completions.jl:152
  [6] collect_completions(x::CSTParser.EXPR, spartial::String, rng::LanguageServer.Range, CIs::Vector{LanguageServer.CompletionItem}, server::LanguageServerInstance, inclexported::Bool, dotcomps::Bool)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/completions.jl:132
  [7] collect_completions(x::CSTParser.EXPR, spartial::String, rng::LanguageServer.Range, CIs::Vector{LanguageServer.CompletionItem}, server::LanguageServerInstance, inclexported::Bool, dotcomps::Bool)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/completions.jl:140
  [8] collect_completions
    @ ~/.julia/packages/LanguageServer/y1ebo/src/requests/completions.jl:131 [inlined]
  [9] textDocument_completion_request(params::LanguageServer.CompletionParams, server::LanguageServerInstance, conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint})
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/requests/completions.jl:39
 [10] (::LanguageServer.var"#101#133"{LanguageServerInstance})(conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::LanguageServer.CompletionParams)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/languageserverinstance.jl:273
 [11] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})
    @ JSONRPC ~/.julia/packages/JSONRPC/xbAlZ/src/typed.jl:66
 [12] run(server::LanguageServerInstance)
    @ LanguageServer ~/.julia/packages/LanguageServer/y1ebo/src/languageserverinstance.jl:308
 [13] top-level scope
    @ none:1

Process julia-ls stderr finished
@gdkrmr
Copy link
Owner

gdkrmr commented Dec 29, 2021

Is it fixed with the new release? Please reopen if the issue persists.

@gdkrmr gdkrmr closed this as completed Dec 29, 2021
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

2 participants