gtache / intellij-lsp

Plugin adding Language Server Protocol support for IntelliJ
Apache License 2.0
397 stars 48 forks source link

LSP Support 1.5.4 exception for dhall-lsp-server 1.0.4 #132

Open fkowal opened 4 years ago

fkowal commented 4 years ago

IntelliJ IDEA 2019.3.2 (Community Edition) Build #IC-193.6015.39, built on January 21, 2020 Runtime version: 11.0.5+10-b520.30 x86_64 macOS 10.15.3

java.lang.Throwable: haskell-lsp:no handler for. Object (fromList [("jsonrpc",String "2.0"),("params",Object (fromList [("changes",Array [Object (fromList [("uri",String "file:///../github/dhall-kubernetes/.idea/workspace.xml"),("type",Number 2.0)])])])),("method",String "workspace/didChangeWatchedFiles")])
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
    at com.github.gtache.lsp.client.LanguageClientImpl.logMessage(LanguageClientImpl.scala:99)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
gtache commented 4 years ago

I see, the error is thrown by the dhall-lsp-server, because it apparently doesn't like the didChangeWatchedFiles notification. I don't really know why though, it could be a problem with the server.
Edit: #94 explains why it happens.