haskell / haskell-ide-engine

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

HIE can't find project GHC version [stack] [nix] #1675

Closed delirehberi closed 4 years ago

delirehberi commented 4 years ago

Hello,

I created a project with Stack via uses Nix. HIE couldn't find the right GHC version and returned the hie-wrapper couldn't find a HIE binary with a matching GHC version in your all-hies installation message.

stack ghc -- --version = The Glorious Glasgow Haskell Compilation System, version 8.8.2

hie --version = Version 1.1 x86_64 ghc-8.8.2

hie =

2020-02-29 17:57:22.247147653 [ThreadId 4] - run entered for hie-wrapper(hie) Version 1.1 x86_64 ghc-8.8.2
2020-02-29 17:57:22.247359751 [ThreadId 4] - Current directory:/home/delirehberi/www/devcollect
2020-02-29 17:57:22.247400593 [ThreadId 4] - Operating system:linux
2020-02-29 17:57:22.247436852 [ThreadId 4] - args:[]
2020-02-29 17:57:22.248382445 [ThreadId 4] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/delirehberi/www/devcollect/stack.yaml"}
2020-02-29 17:57:26.091702251 [ThreadId 4] - Module "/home/delirehberi/www/devcollect/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/delirehberi/www/devcollect", cradleOptsProg = CradleAction: Other Stack}
2020-02-29 17:57:26.091804595 [ThreadId 4] - Cradle directory:/home/delirehberi/www/devcollect
2020-02-29 17:57:26.091888782 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-02-29 17:57:27.73198867 [ThreadId 4] - Project GHC version:_             _         _         _____  ___   ___ _____
2020-02-29 17:57:27.732074458 [ThreadId 4] - hie exe candidates :["hie-_             _         _         _____  ___   ___ _____","hie","hie"]
2020-02-29 17:57:27.732255405 [ThreadId 4] - found hie exe at:/nix/store/23g7kvn1j2k3igpypj9sv3vycmg6d083-haskell-ide-engine-combined/libexec/bin/hie
2020-02-29 17:57:27.732292727 [ThreadId 4] - args:[]
2020-02-29 17:57:27.732320238 [ThreadId 4] - launching ....

hie-wrapper couldn't find a HIE binary with a matching GHC version in your all-hies installation
hie: callProcess: /nix/store/23g7kvn1j2k3igpypj9sv3vycmg6d083-haskell-ide-engine-combined/libexec/bin/hie (exit 1): failed

The version doesn't exists in Project GHC Version section of the output.

Is there any solution for that?

jneira commented 4 years ago

if you call /nix/store/23g7kvn1j2k3igpypj9sv3vycmg6d083-haskell-ide-engine-combined/libexec/bin/hie directly, you get more info about the error?

delirehberi commented 4 years ago

@jneira The same output appeared. I tried a lot of things to find a solution but I can't succeed. In the end, I changed the Stack config as without nix. I believe its about nix's isolation architecture.

fendor commented 4 years ago

Could be a bug upstream in all-hies. Did you open an issue there? If yes, please link in this issue here so we can close it if it gets fixed.

delirehberi commented 4 years ago

No, i didn't yet. I'll open same issue to there.