Haskell-ide-engine: 'key "languageServerHaskell" not present' error in WorkspaceDidChangeConfiguration

Created on 25 Nov 2017  Â·  12Comments  Â·  Source: haskell/haskell-ide-engine

Neovim displays the following message on start and HIE keeps working seemingly normally:

[Error] haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _p
arams = DidChangeConfigurationParams {_settings = Object (fromList [])}} "key \"languageServerHaskell\" not present"

From the HIE log I can see that it sends it using window/logMessage in responce to the following:

reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}}

All 12 comments

Are you still seeing this? It was fixed a while back, please check against current master

Yes, it still happens with the current master in nvim. Both in nvim :messages (see above) and in the hie log (below):

2017-12-01 13:50:40.541014 [ThreadId 8] - <--2--{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"mes
sage":"haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = \"2.0\", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} \"key \\\"languageServerHaskell\\\" not present\""}}

Can you post a bigger chunk of the log? From hie startup to that point.

On 1 December 2017 at 19:58, nponeccop notifications@github.com wrote:

Yes, it still happens with the current master in nvim. Both in nvim
:messages (see above) and in the hie log (below):

2017-12-01 13:50:40.541014 [ThreadId 8] - <--2--{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"mes
sage":"haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = \"2.0\", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} \"key \\"languageServerHaskell\\" not present\""}}

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/haskell/haskell-ide-engine/issues/369#issuecomment-348563903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAZAB3_r9vIWGdCj-Zf0tEnclt3bwr-Cks5s8D4pgaJpZM4QqbhQ
.

haskell-lsp:Starting up server ...
2017-12-01 13:50:40.339382 [ThreadId 7] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"trace":"off",
"processId":8315,"rootPath":"/home/andy/github/haskell-ide-engine","initializationOptions":null,"capabilities":{"text
Document":{"completion":{"completionItem":{"snippetSupport":true}}},"workspace":{"applyEdit":true}},"rootUri":"file:/
//home/andy/github/haskell-ide-engine"}}
2017-12-01 13:50:40.396435 [ThreadId 7] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/
home/andy/github/haskell-ide-engine
2017-12-01 13:50:40.39835 [ThreadId 8] - <--2--{"result":{"capabilities":{"textDocumentSync":{"openClose":true,"chang
e":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"hoverProvider":true,"completionProvide
r":{"resolveProvider":true,"triggerCharacters":["."]},"definitionProvider":true,"documentHighlightProvider":true,"doc
umentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvide
r":true,"renameProvider":true,"executeCommandProvider":{"commands":["applyrefact:applyOne","hare:demote"]}}},"jsonrpc
":"2.0","id":0}
2017-12-01 13:50:40.538407 [ThreadId 7] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":
{"settings":{}}}
2017-12-01 13:50:40.53919 [ThreadId 11] - reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc =
 "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromLi
st [])}}
2017-12-01 13:50:40.539759 [ThreadId 11] - reactor:didChangeConfiguration diagsOn:True
2017-12-01 13:50:40.540132 [ThreadId 7] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocume
nt":{"text":"import Distribution.Simple\nmain = defaultMain\n","version":1,"uri":"file:///home/andy/github/haskell-id
e-engine/Setup.hs","languageId":"haskell"}}}
2017-12-01 13:50:40.540885 [ThreadId 11] - ****** reactor: processing NotDidOpenTextDocument
2017-12-01 13:50:40.541014 [ThreadId 8] - <--2--{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"mes
sage":"haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = \"2.0\", _method = WorkspaceDidChang
eConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} \"key \\\"languageServerHa
skell\\\" not present\""}}

Thanks, I will take a look when I can.

It still happens on @wz1000 branch

Works fine with current master fa3a4b12188412bbb86d3273d0c32c13674c2355 after all workarounds (related to neovim) applied.

I experience this on branch hie-0.1.0.0 (commit c68ba8d5cfb9cb89d04efd2bbda575d055a5e10b, ghc-8.0.2)

[Error] haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} "key \"languageServerHaskell\" not present"

I think the problem is on the client side, the code in HIE is expecting something like

-- 2017-10-09 23:22:00.710515298 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"languageServerHaskell":{"maxNumberOfProblems":100,"hlintOn":true}}}}
-- 2017-10-09 23:22:00.710667381 [ThreadId 15] - reactor:got didChangeConfiguration notification:
-- NotificationMessage
--   {_jsonrpc = "2.0"
--   , _method = WorkspaceDidChangeConfiguration
--   , _params = DidChangeConfigurationParams
--                 {_settings = Object (fromList [("languageServerHaskell",Object (fromList [("hlintOn",Bool True)
--                                                                                          ,("maxNumberOfProblems",Number 100.0)]))])}}

I'm having this on current master. @nponeccop what neovim workarounds did you apply?
logfile

same here for vim

This is a notification returned if the config params can't be parsed. It is benign, in that it does not change the config, nor affect any other operation.

Basically, the client shouldn't send the message if it is empty or does not match the expectations.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hansroland picture hansroland  Â·  4Comments

alanz picture alanz  Â·  3Comments

IvanMalison picture IvanMalison  Â·  5Comments

masaeedu picture masaeedu  Â·  4Comments

JorisBlanken picture JorisBlanken  Â·  4Comments