Open raxod502 opened 4 years ago
- HIE must be built using the same version of GHC as is installed on the system. (Is this actually true? Or is it possible to tell HIE to locally install and use the version of GHC that it itself was built with, via Stack?)
I think in theory it would be possible to do it via stack build
but since this package is neither on hackage nor stackage, it doesnt work. We will never bring this package to hackage or stackage either. For this workflow, you can give ghcide a try which I think can be used that way.
- As a result, whenever a new version of GHC is released, the user of Manjaro Linux must refrain from performing a system upgrade until HIE is updated, which may take a long time. Furthermore, if the user already has GHC installed and wishes to set up HIE, this may be impossible without performing some dangerous and unsupported package-management operations.
Agreed, not ideal, but not much we can do about it.
The consequence of the above points is that there is no obvious way (that I know of) to use HIE on Manjaro Linux if a new release of GHC has recently come out. This is unfortunate for users of Manjaro Linux. Is there any way that using HIE on Manjaro Linux could be made easier?
The easiest work-around is to manage dependencies yourself, use ghcup to install GHC, and then using our installation script to install hie for the GHC version you need. Or use stack to install HIE, but dont use any system dependencies, so no pacman installed GHC.
I have successfully installed HIE on Manjaro Linux by following this procedure:
pacman -Q | grep haskell
.pacman -Rsc
, including ghc, stack, and cabal. Make a note of which packages were explicitly installed (tracing dependencies and install reasons using pacman -Qi
), because we still need to use some Haskell binaries.~/.local/bin
. Make it executable.stack upgrade --force-download
because for some reason the official download says it's "unsupported". This downgrades Stack and solves the warning. Maybe this step could be bypassed by using the installer script?stack install
on all the packages that I need binaries from, like pandoc, shellcheck, etc. Note that some packages have different names than you would expect, e.g. ShellCheck must be capitalized when installing via Stack.stack exec ghc -- --version
shows me that I'm using a version of GHC that is older than the latest release, so it's supported by HIE.stack ./install.hs hie-8.6.5
(or equivalent for whatever GHC version) and then stack ./install.hs data
.~/.local/bin
and my autocompletions work.I propose that this information (or equivalent) be put in the README under Installation on Arch Linux. It would be a great improvement since the instructions that are currently there do not actually work (as per this issue report).
Just for my own edification, why is it that adding support for a new GHC release to HIE takes so much developer effort, even when the release is only a patch version?
See #1697. Test-suite fails and no one figured out why, yet.
It is often rather difficult to get HIE working on Manjaro Linux, for the following reason:
The consequence of the above points is that there is no obvious way (that I know of) to use HIE on Manjaro Linux if a new release of GHC has recently come out. This is unfortunate for users of Manjaro Linux. Is there any way that using HIE on Manjaro Linux could be made easier?