hie-wrapper (via coc.nvim) continually crashes
gfarrell opened this issue · 3 comments
I'm using coc.nvim
as my LSP client (within neovim) -- it works with other languages. I have removed Setup.hs
, installed hspec-discover
globally to fix problems with HIE, but now I'm at the stage where the server just continually dies and gets restarted.
I have tried a basic hie.yaml
in the project root (the project is gfarrell/random-puzzles-hs):
cradle:
stack:
But this also doesn't work.
> stack ide packages --cabal-files --stdout
/Users/gideon/projects/challenges/random-puzzles/random-puzzles.cabal
When I look at the output of hie-wrapper
(via CocList > output > languageserver.haskell
) I get the following (repeated ad nauseam, so I just took a selection):
I can't work out why it's continually restarted. I tried hie-wrapper --debug
in the project root and got the following output which seems to imply that nothing is wrong with the project:
Thank you for your bug report!
I think you may be missing the --lsp
flag for hie.
Ah finally, thank you. That worked!
Some commentary about this:
- I was previously using the config in the Coc Wiki but this wasn't working for me because of the following other issues:
a.stack new
createsSetup.hs
which seems to breakhie
.
b. I'm usinghspec
for tests, andhspec-discover
has to be globally installed, but this error wasn't showing for me. I found it after solving some other issues.
c. I kept seeingcabal-install
is not installed, even though I'm usingstack
notcabal
(although this is no-longer happening to me even if I removehie.yaml
).
d. Maybe other issues? - I found this error super hard to debug.
stack new creates Setup.hs which seems to break hie
No, it just cant be loaded, HIE should continue to work.
I'm using hspec for tests, and hspec-discover has to be globally installed,
Yeah, for now it gotta be like that. Until we have abstracted build-tools and have a way to query the path for each tool.
I found this error super hard to debug.
Reasonable, we should add a message to the beginning of the output in HieMain.hs