julia-vscode / LanguageServer.jl

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

MethodNotFound: Unhandled method workspace/configuration #600

Open davidanthoff opened 4 years ago

davidanthoff commented 4 years ago

From crash reporting.

Stack trace:

LanguageServer.JSONRPCEndpoints.JSONRPCError:
   at send_request(::LanguageServer.JSONRPCEndpoints.JSONRPCEndpoint, ::String, ::LanguageServer.ConfigurationParams) (.\scripts\languageserver\packages\LanguageServer\src\jsonrpcendpoint.jl161)
   at request_julia_config(::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\requests\workspace.jl77)
   at process(::LanguageServer.JSONRPC.Request{Val{:initialized},Dict{String,Any}}, ::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\requests\init.jl159)
   at run(::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\languageserverinstance.jl233)
   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)

I think we need to rework how we load configuration in general and follow the examples from the docs.

non-Jedi commented 4 years ago

Do you not get an event log in crash reports showing client and server requests leading up to the crash? Very difficult to debug otherwise. Looking at the code, this looks like a client-side problem rather than server-side since the response has an error key with empty code and message.

davidanthoff commented 4 years ago

Unfortunately we don't... I'll look into sending more log info in crash reports, but not sure we can easily do that...

ZacLN commented 4 years ago

Is this likely to have been fixed by the change to how we handle configurations?

davidanthoff commented 4 years ago

I had hoped so, but we are still getting crash reports from this... So, no.

ZacLN commented 4 years ago

Erg. I'm still feeling really lost on this. Do we need to check and store this before sending requests to the client?

non-Jedi commented 4 years ago

The only thing I see in the workspace/configuration request that's out of spec is that it sends "scopeUri": nil when scopeUri is required to be a DocumentUri which is an alias for string. Instead, scopeUri can simply be omitted.

Could be worth fixing that just in case its the problem?

davidanthoff commented 4 years ago

So maybe we wait and see whether #665 fixes this, and whether #662 gives us more info, right?

davidanthoff commented 4 years ago

We're STILL seeing this in the latest version of the extension that I published today :( This is honestly driving me nuts, I have no more ideas what might be going wrong here...

ZacLN commented 4 years ago

As per my comment above: https://github.com/julia-vscode/LanguageServer.jl/pull/693 seems worth a try