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

Install.hs: No ghc installations found #1646

Open fendor opened 4 years ago

fendor commented 4 years ago
> .\cabal-hie-install help

********************************************************************************
No ghc installations found in $PATH.
The script requires at least one ghc in $PATH to be able to build hie.

********************************************************************************

No ghc installations found in $PATH.
The script requires at least one ghc in $PATH to be able to build hie.

CallStack (from HasCallStack):
  error, called at src\Env.hs:79:3 in hie-install-0.8.0.0-inplace:Env

Happens on windows when using choco install haskell-dev. Then by default, ghc 8.8.1 is installed which we do not support (I dont know why though, was there a big bug in it)? However, this error message is not useful since I compiled and ran the install script but now it is telling me that there is no ghc on the path.

jneira commented 4 years ago

Mmm, you are right, at least it should show a more specific message: No *supported/elegible for build hie/???* ghc installations found in $PATH.

A better ux would be show the list of not supported ghc installations and tell the user why they are not elegible (and keep the actual message when really there is no ghc on path) and which versions are supporteds to help choose another one.

I am afraid that we cant build hie with 8.8.1 and 8.8.2 in windows due to a ghc bug that throws a compilation error building Cabal-3.0.1.0

freeman42x commented 4 years ago

I am getting the same error and I installed GHC (which includes cabal-install) via Chocolatey.

fendor commented 4 years ago

@razvan-flavius-panda then as described by the issue, you are probably using a ghc version that is not supported by hie? which one are you using, what are you trying to install?

freeman42x commented 4 years ago

@fendor as I mentioned I installed GHC (which includes cabal-install) via Chocolatey. What is in Chocolately right now is GHC 8.10.1 and that is probably what I installed. And if I check the .yaml files it seems that version is not really supported so that is probably the issue.