You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is now the code actions or hints that lsp-haskell reports no longer work. They did work in the past, but during the upheaval it's now broken.
As a simple example
module Test where
fn :: Int -> Int
fn = \x -> x * 2
There are 2 hints reported via flycheck. The flycheck errors buffer shows the hints
Found:
fn = \ x -> x * 2
Why not:
fn x = x * 2
(lsp)
Found:
\ x -> x * 2
Why not:
(* 2)
(lsp)
Clicking on Apply all hints doesn't change the buffer though and a message appears lsp-request: ExitFailure 1.
When I check the hls.log I see errors parsing json responses:
Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Found the following clients for /home/bhrgunatha/docs/scratch/Test.hs: (server-id lsp-haskell, priority 0)
The following clients were selected based on priority: (server-id lsp-haskell, priority 0)
Creating watch for /home/bhrgunatha
haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":1,"result":null}
Error in $.result: parsing () failed, expected Array, but encountered Null
haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":2,"result":null}
Error in $.result: parsing () failed, expected Array, but encountered Null
Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Found the following clients for /home/bhrgunatha/docs/scratch/Test.hs: (server-id lsp-haskell, priority 0)
The following clients were selected based on priority: (server-id lsp-haskell, priority 0)
haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":3,"result":null}
Error in $.result: parsing () failed, expected Array, but encountered Null
haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":4,"result":null}
Error in $.result: parsing () failed, expected Array, but encountered Null
It looks like lsp-haskell is not getting the expected responses from the haskell-language-server. I've see the same error reported hundreds of times in the lsp.log buffer over many restarts of emacs trying to investigate the problem.
I'm not sure if the problem is with lsp-haskell, lsp-mode, or the haskell language server but lsp-haskell is mentioned in the log file so I'm reporting the problem here.
The text was updated successfully, but these errors were encountered:
However, that's apparently benign, so I don't think it can be responsible for the problem you're seeing. Regardless, I think this is almost certainly a HLS issue. Could you open an issue there, ideally including what's in /tmp/hls.log?
I will do that, thanks.
You know, I searched (unsuccessfully) for that message. Even now the only thing I can find is my own post on reddit's emacs sub :).
So thanks for the link too!
emacs --version
GNU Emacs 27.1
I'm using the offical Arch package along with the (unofficial) AUR haskell-language-server-bin which just downloads the linux build from the official github repo
I'm working my way through the haskell fp-course fork that uses stack.
It's been working well but I've recently converted my crufty, but stable and familiar old config to use-package.
Here are the relevant parts of my config
I have the following versions from melpa:
The problem is now the code actions or hints that
lsp-haskell
reports no longer work. They did work in the past, but during the upheaval it's now broken.As a simple example
There are 2 hints reported via flycheck. The flycheck errors buffer shows the hints
Clicking on Apply all hints doesn't change the buffer though and a message appears
lsp-request: ExitFailure 1
.When I check the hls.log I see errors parsing json responses:
It looks like lsp-haskell is not getting the expected responses from the haskell-language-server. I've see the same error reported hundreds of times in the lsp.log buffer over many restarts of emacs trying to investigate the problem.
I see 2 processes on my machine
I'm not sure if the problem is with lsp-haskell, lsp-mode, or the haskell language server but lsp-haskell is mentioned in the log file so I'm reporting the problem here.
The text was updated successfully, but these errors were encountered: