haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Using plain GHC version /bin/sh: ghc: command not found #823

Closed cideM closed 6 years ago

cideM commented 6 years ago

I just installed the HIE as per the instructions on MacOS High Sierra.

git clone https://github.com/haskell/haskell-ide-engine --recursive
make build-all

Also made sure to add

"languageServerHaskell.useCustomHieWrapper": true,
"languageServerHaskell.useCustomHieWrapperPath": "hie-wrapper",

to the VSC settings. I then created a new project with stack new foo. Upon opening the project in VSC (latest insider build), the Haskell LSP crashes repeatedly. Here's the output from, well, output.

2018-09-12 17:41:55.03582 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.2.2.0, Git revision 5083c9416d871288cabc6e8834689144d50a0be4 (1940 commits) x86_64 ghc-8.2.1
2018-09-12 17:41:55.037395 [ThreadId 4] - Current directory:/Users/yuuki/private/haskell/dotparser
2018-09-12 17:41:55.267122 [ThreadId 4] - Cradle directory:/Users/yuuki/private/haskell/dotparser
2018-09-12 17:41:55.267942 [ThreadId 4] - Using plain GHC version
/bin/sh: ghc: command not found
hie-wrapper: readCreateProcess: ghc --version (exit 127): failed
[Info  - 5:41:55 PM] Connection to server got closed. Server will restart.

I assume it's trying to determine the version by simply calling ghc rather than stack ghc --...or something?

cideM commented 6 years ago

Okay a simple stack upgrade fixed it. https://github.com/commercialhaskell/lts-haskell/issues/164

shrin18 commented 5 years ago

issue Could you please have a look into. Was this the same patch you got. Not able to run 'make'.

-Shrinish Donde KTH, Stockholm

Anrock commented 5 years ago

@shrin18 you're able to run make, you just don't have a ghc in your PATH. Stack doesn't put GHC in PATH and it's in no way related to HIE. Try asking in some haskell chat like #haskell on freenode, stack overflow or haskell subreddit.

shrin18 commented 5 years ago

Thanks. Fixed it !

isabellachen commented 5 years ago

@shrin18 What was the solution?