mpickering / haskell-ide-engine

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

HIE crashes if there is no "ghc" on the path with explicit stack config #60

Closed fendor closed 4 years ago

fendor commented 5 years ago

Reproduce:

stack new test 
cd test/ 
stack build
echo "cradle: { stack: {}}" > hie.yaml
code .

where code . is an arbitrary lsp-client.

Log contains following error message if there is no "ghc" on the path:

hie: ghc: readCreateProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

Expected behaviour: A stack cradle should work even if there is no ghc on the path, since stack is supposed to manage the ghc installations.

Possible solutions: in HieWrapper, if project is a stack project, execute hie with stack exec hie.

cc @mpickering

fendor commented 4 years ago

Closed by https://github.com/haskell/haskell-ide-engine/pull/1496