julia-vscode / LanguageServer.jl

An implementation of the Microsoft Language Server Protocol for the Julia language.
Other
362 stars 79 forks source link

EOFError #501

Open davidanthoff opened 4 years ago

davidanthoff commented 4 years ago

From crash reporting here.

EOFError:
   at read (iobuffer.jl212)
   at read (io.jl697)
   at get_offset(::LanguageServer.Document, ::Int64, ::Int64) (./scripts/languageserver/packages/LanguageServer/src/document.jl68)
   at get_offset (./scripts/languageserver/packages/LanguageServer/src/document.jl84)
   at process(::LanguageServer.JSONRPC.Request{Val{Symbol("textDocument/codeAction")},LanguageServer.CodeActionParams}, ::LanguageServerInstance) (./scripts/languageserver/packages/LanguageServer/src/requests/actions.jl5)
   at run(::LanguageServerInstance) (./scripts/languageserver/packages/LanguageServer/src/languageserverinstance.jl185)
   at top-level scope (./scripts/languageserver/main.jl28)
   at include (boot.jl328)
   at include_relative(::Module, ::String) (loading.jl1105)
   at include(::Module, ::String) (Base.jl31)
   at exec_options(::Base.JLOptions) (client.jl287)
   at _start() (client.jl460)
davidanthoff commented 4 years ago

There are various explanations for this one, if we exclude incorrect client behaviour, right? Either we are not properly processing some text update from the client and end up with an incorrect document content, or maybe we are missing a line offset computation somewhere?

ZacLN commented 4 years ago

I think we should add an incredibly verbose error message to get_offset, one that stays just this side of telling us what text was called (i.e. offset position and that searches for the location/frequency of unicode characters). For the beta at least...

ZacLN commented 4 years ago

Nothing for us to do before we get some results from this, moving to Next