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

Problem with hie wrapper #748

Closed xgrommx closed 6 years ago

xgrommx commented 6 years ago

Hello @alanz After update hie (or maybe hie wrapper) I got

Mismatching GHC versions: Project is 8.2.2, HIE is 8.4.3
You may want to use hie-wrapper. Check the README for more information

But I used make build-all and I think it should resolve it automatically.

alanz commented 6 years ago

It seems the wrapper is not built the make-build-all.bat file, so make sure it is installed by doing

stack install haskell-ide-engine:hie-wrapper
xgrommx commented 6 years ago

@alanz I should do it in hie folder?

alanz commented 6 years ago

Actually, it should come in via the normal install.

And you should be running that command in the directory you checkout out the haskell-ide-engine project.

xgrommx commented 6 years ago

@alanz After all, I still get errors. Very strange... I'll try remove all.

xgrommx commented 6 years ago

@alanz I cloned hie. After I run stack install haskell-ide-engine:hie-wrapper After I run make build-all

When I run hie-wrapper in terminal I got

haskell-ide-engine:master λ hie-wrapper
2018-08-10 22:39:09.372285 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.2.2.0, Git revision 59d5d301aa5908346cf1e7391f8a24956c2fab23 (1757 commits) x86_64 ghc-8.4.3
2018-08-10 22:39:09.377405 [ThreadId 4] - Current directory:/Users/dstoyano/tmp/haskell-ide-engine
2018-08-10 22:39:09.836033 [ThreadId 4] - Cradle directory:/Users/dstoyano/tmp/haskell-ide-engine
2018-08-10 22:39:09.836901 [ThreadId 4] - Using stack GHC version
2018-08-10 22:39:10.082929 [ThreadId 4] - Project GHC version:8.4.3
2018-08-10 22:39:10.083613 [ThreadId 4] - hie exe candidates :("hie-8.4.3","hie-8.4")
2018-08-10 22:39:10.085369 [ThreadId 4] - found hie exe at:/Users/dstoyano/.local/bin/hie-8.4.3
2018-08-10 22:39:10.086431 [ThreadId 4] - args:[]
2018-08-10 22:39:10.086879 [ThreadId 4] - launching ....

2018-08-10 22:39:10.14471 [ThreadId 4] - Using stack GHC version
2018-08-10 22:39:10.358367 [ThreadId 4] - Run entered for HIE(hie-8.4.3) Version 0.2.2.0, Git revision 59d5d301aa5908346cf1e7391f8a24956c2fab23 (1757 commits) x86_64 ghc-8.4.3
2018-08-10 22:39:10.361115 [ThreadId 4] - Current directory:/Users/dstoyano/tmp/haskell-ide-engine
^Cuser interrupt
hie-wrapper: callProcess: /Users/dstoyano/.local/bin/hie-8.4.3 (exit 1): failed

and in my application still the same error which I described in first comment.

could u help me?

If we try to run ls we can get all versions (but hie-wrapper use only 8.4.3, 8.4)

haskell-ide-engine:master λ ls /Users/dstoyano/.local/bin | grep hie
__hie
hie
hie-8.2
hie-8.2.1
hie-8.2.2
hie-8.4
hie-8.4.2
hie-8.4.3
hie-wrapper
alanz commented 6 years ago

How do you normally build the project that hie is failing on? with stack? or cabal? or nix?

xgrommx commented 6 years ago

@alanz I use stack build

alanz commented 6 years ago

Please make sure you do not have a stray dist or dist-newstyle directory in your project root, if it exists then hie will think it is a cabal project and use the config from there.

xgrommx commented 6 years ago

@alanz I don't have distin my directory.

xgrommx commented 6 years ago

@alanz I follow https://github.com/haskell/haskell-ide-engine#installation-with-stack

xgrommx commented 6 years ago

@alanz Any news? I cleaned all (my project, all hie, hie-wrapper, removed hie folder) I cloned it again and after make build-all I got successful installation, but when I opened I my project I got the same error which I described earlier.

xgrommx commented 6 years ago

@alanz I tried it on macos

lukel97 commented 6 years ago

@xgrommx what client are you using and how did you set it up?

xgrommx commented 6 years ago

@Bubba I use vscode with hie (as I know we have only one client for it)

lukel97 commented 6 years ago

Have you turned on the use hie wrapper option in your vscode settings?

xgrommx commented 6 years ago

@Bubba I don't have this option in my config (as I remember according with changelog of vscode client it was removed and hie-wrapped should works automatically)

xgrommx commented 6 years ago

@Bubba I have updated my config (I added "languageServerHaskell.useHieWrapper": true) but I still get errors...

xgrommx commented 6 years ago

@Bubba any advices?

nponeccop commented 6 years ago

@xgrommx see the linked issue for a workaround

xgrommx commented 6 years ago

@nponeccop yes! it works thx u. But I think it should be automatically.

nponeccop commented 6 years ago

Sure. I'm closing this issue as a duplicate