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

Case splitting fails with an error #1004

Open maxrothman opened 5 years ago

maxrothman commented 5 years ago

Given the following code:

data Foo = Foo1 | Foo2
    deriving (Eq, Show, Read, Generic)

doFoo :: Foo -> String
doFoo f = undefined

If I put my cursor on the first argument of the definition of doFoo, I see a code action for "Case split on f". If I click it, I see the following error in the output:

cabal-helper-wrapper: dieVerbatim: user error (cabal-helper-wrapper: The program 'ghc' version >=6.11 is required but it
could not be found.
)
EXCEPTION: splits':
               readCreateProcess: /path/to/haskell-ide-engine/.stack-work/install/x86_64-osx/lts-11.18/8.2.2/bin/cabal-helper-wrapper "print-build-platform" (exit 1): failed

Other HIE features like "view type", "insert type", and "go to definition" work, but others like "duplicate definition", "delete definition" and "prefix with _", fail with the same error. Once the error occurs, HIE must be reloaded before any features will work.

drewboardman commented 5 years ago

I'm seeing a similar error to this.

Got error while processing diagnostics: readCreateProcess:
 /home/drew/code/lib/haskell-ide-engine/.stack-work/install/
x86_64-linux/nightly-2019-01-30/8.6.3/bin/
cabal-helper-wrapper "print-build-platform" (exit 1): failed

Whenever I attempt this command in the terminal, I see a success:

drew@hansolo ~ $ /home/drew/code/lib/haskell-ide-engine/.stack-work/install/x86_64-linux/nightly/2019-01-30/8.6.3/bin/cabal-helper-wrapper "print-build-platform" 
x86_64-linux

Happens in both cabal and stack projects. I've attempted to fix this in cabal projects with cabal sandbox init, but the error persists.

These are my hie settings inside vscode

    "languageServerHaskell.hieExecutablePath": "/home/drew/.local/bin/hie",
    "languageServerHaskell.useCustomHieWrapperPath": "/home/drew/.local/hie-wrapper"
alanz commented 5 years ago

How did you install hie? Di you use the makefile or install.hs script?

maxrothman commented 5 years ago

I used the makefile

On Mon, Mar 4, 2019 at 8:58 AM Alan Zimmerman notifications@github.com wrote:

How did you install hie? Di you use the makefile or install.hs script?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell/haskell-ide-engine/issues/1004#issuecomment-469261752, or mute the thread https://github.com/notifications/unsubscribe-auth/ACfH7hDcvxHS6N0M8r2CzT5wLDsOJ9TOks5vTSZngaJpZM4Zct7g .