HIE don't work with Vs Code on Linux
Get
The Haskell HIE server crashed 5 times in the last 3 minutes message.
But in Atom all works fine
Environment:
Settings
"languageServerHaskell.hieExecutablePath": "/home/sasha/.nix-profile/bin/hie"
which hie in vs code terminal
/home/sasha/.nix-profile/bin/hie
md5-856129a900d0ee7cae8baa05c51418fd
2019-07-22 13:03:52.606258776 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.11.0.0 x86_64 ghc-8.6.4
2019-07-22 13:03:52.60648288 [ThreadId 4] - Current directory:/home/sasha/Code/somePath
2019-07-22 13:03:52.610858189 [ThreadId 4] - Cradle directory:/home/sasha/Code/somePath
2019-07-22 13:03:52.611026253 [ThreadId 4] - Using plain GHC version
2019-07-22 13:03:52.611110393 [ThreadId 4] - Project GHC version:No System GHC found
2019-07-22 13:03:52.611143733 [ThreadId 4] - hie exe candidates :["hie-No System GHC found","hie","hie"]
2019-07-22 13:03:52.611353759 [ThreadId 4] - found hie exe at:/nix/store/gabld13fzhqix3mcv3f0bl0vk3y6kq64-haskell-ide-engine-combined/libexec/bin/hie
2019-07-22 13:03:52.611399166 [ThreadId 4] - args:["--lsp","-d","-l","/tmp/hie.log","--vomit"]
2019-07-22 13:03:52.611427452 [ThreadId 4] - launching ....
Can you post the content of /tmp/hie.log?
Also: No System GHC found
Do you have a ghc installed? Can you post the project somewhere?
Can you post the content of
/tmp/hie.log?
Already in description
Do you have a ghc installed? Can you post the project somewhere?
Yes, I added paths to .bash_profile using export
Any project, stack new my-project for example
So, no message haskell-lsp:Starting up server ... in /tmp/hie.log?
What happens, if you manually execute the path /nix/store/gabld13fzhqix3mcv3f0bl0vk3y6kq64-haskell-ide-engine-combined/libexec/bin/hie?
no message
no
manually execute the path
hie-wrapper couldn't find a HIE binary with a matching GHC version in your all-hies installation
But in atom I also have this message
That sounds weird, hie is not hie-wrapper? Afaik, this message is only emitted by hie-wrapper. On my system, ${haskell-ide-engine}/libexec/bin/hie is not executable...
I had similar issue, i think ghc 8.6.4 is not available on your machine. what is the output for ghc --version, you can install ghc using nix nix-env -i ghc or ghcup
output for ghc --version
8.6.4
I tried other ghc versions and also in Atom all works fine
the message is emitted at here, what is the output if you run hie-8.6.4 directly?
It starts
@fendor all-hies has a special custom setup for how the binaries are organized. The hie binary that throws this
hie-wrapper couldn't find a HIE binary with a matching GHC version in your all-hies installation
message exists to prevent infinite loops in case people have hie (=hie-wrapper) in their PATH, so hie-wrapper would call itself because it can find itself as a hie binary.
@sashasashasasha151 It seems that vscode doesn't have GHC on its PATH, can you verify that in vscode's shell?
If it helps, I just encountered the same issue (WSL, using VSCode with the WSL plugins, hie/ghc installed with nix). What happened in my case was that I launched code . from the bash shell, but in VSCode it picked up zsh I had installed and set as the default shell. It did not have ghc in path. I uninstalled zsh and now everything works great!
Closing since this is using an old mechanism and could be closed already. Feel free to open again with fresh information!
Most helpful comment
@fendor all-hies has a special custom setup for how the binaries are organized. The
hiebinary that throws thismessage exists to prevent infinite loops in case people have
hie(=hie-wrapper) in theirPATH, sohie-wrapperwould call itself because it can find itself as ahiebinary.@sashasashasasha151 It seems that vscode doesn't have GHC on its
PATH, can you verify that in vscode's shell?