Description
I've created a cabal project
mkdir cabal_project && cd cabal_project
cabal init
When I opened the cabal_project in emacs, the lsp server for haskell is starting and it errors out. When I open non cabal project and haskell file in it it, then it is working fine.
Your environment
Output of haskell-language-server --probe-tools
or haskell-language-server-wrapper --probe-tools
:
haskell-language-server-wrapper --probe-tools 00:58:15
haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/rajkumar/.ghcup/bin/haskell-language-server-wrapper-1.0.0) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: Not found
ghc: 8.10.4
Which lsp-client do you use:
emacs
Steps to reproduce
mkdir cabal_project && cd cabal_project
cabal init
open cabal_project in emacs.
Expected behaviour
If I open cabal_project/app/Main.hs
I shouldn't get any error. lsp should work fine.
Actual behaviour
lsp server crashes with error log Failed to get project GHC version:CradleError
Include debug information
See the lsp logs for emacs in gist file here https://gist.github.com/rajcspsg/81bd373d35dba5cf355264d17e275bb8
I've asked this question in SE as well. https://emacs.stackexchange.com/questions/63799/failed-to-get-project-ghc-versioncradleerror-cabal-haskell-project-is-not-wor