Open seagreen opened 5 years ago
My understanding is that the GHC version used to build haskell-code-explorer needs to match the GHC version of the project you're indexing
That's correct. It should be mentioned in the README (I will update it).
Currently, haskell-code-indexer
doesn't check if its version of GHC matches the version that was used to build the project you're indexing. As a result of this, GHC version mismatch causes GHC itself to fail with an unhelpful error message (the message "*** is unusable due to missing dependencies" comes from the GHC: https://github.com/ghc/ghc/blob/610ec224a49e092c802a336570fd9613ea15ef3c/compiler/main/Packages.hs#L1164).
I will implement a GHC version check in haskell-code-indexer
. It should be simple because the first line of the setup-config
file from the dist
directory of each Cabal package contains the version of GHC, e.g., "Saved package config for haskell-code-explorer-0.1.0.0 written by Cabal-2.4.0.1 using ghc-8.6".
I agree it makes sense to adopt Haskell IDE Engine's convention for executable naming.
Executables with GHC version appended merged in https://github.com/alexwl/haskell-code-explorer/pull/29
My understanding is that the GHC version used to build
haskell-code-explorer
needs to match the GHC version of the project you're indexing (eg see https://github.com/alexwl/haskell-code-explorer/issues/16#issuecomment-454966542).This wasn't initially clear to me when initially trying to get
haskell-code-indexer
working, and using ahaskell-code-indexer
built with the wrong version of GHC lead to confusing error messages, egBecause of this, would it make sense to adopt Haskell IDE Engine's convention for executable naming? They append each executable with the GHC version used to build it, eg:
As you can see they also build one version of
hie
without the GHC version appended, but I'm not sure we even need that.This would also make it really easy to have lots of different versions of
haskell-code-indexer
on your machine at once.