Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

Set everything to use specific ghc version #34

Closed
freeman42x opened this issue Nov 18, 2018 · 13 comments
Closed

Set everything to use specific ghc version #34

freeman42x opened this issue Nov 18, 2018 · 13 comments

Comments

@freeman42x
Copy link

Following the issues encountered in: haskell/haskell-ide-engine#947 Which resulted in having to downgrade everything to ghc822.

How can someone set everything to work with a specific ghc version? In the example above even though I had installed both hies it used the 822 version instead of the 843 version.

@freeman42x
Copy link
Author

The fix was to tick under the atom ide haskell plugin settings: use the hie wrapper and use a custom hie wrapper and then specify the path to where hie-wrapper is installed eg. /home/neo/.nix-profile/bin/hie-wrapper

@freeman42x
Copy link
Author

Nope. I was wrong, that didn't fix it. That just stopped HIE from starting up. Spinner at the bottom.

@freeman42x freeman42x reopened this Nov 19, 2018
@develop7
Copy link

Affects me too, throws the following in the project based on LTS-12.10:

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

@domenkozar
Copy link
Owner

Yes, that's unfortunate consequence how HIE works. The easiest fixes are:

a) upgrade your project to LTS-12.18
b) downgrade hie-nix to older version

@develop7
Copy link

develop7 commented Nov 21, 2018

@domenkozar are you saying hies matching HIE's stack*.yamls cannot be built with nix?

@domenkozar
Copy link
Owner

It can be, as long as GHC versions match exactly.

@develop7
Copy link

Could you maybe try doing that, as the, um, repository owner? Like, fix derivations to populate and build same hie-x.x.xs as built by upstream's Makefile. My today's attempt to do so ended up at running into input-output-hk/stack2nix#134, let alone this is actually my first attempt to fix nix derivations.

@domenkozar
Copy link
Owner

@develop7 I'm telling you need to upgrade from LTS-12.10 to LTS-12.18, did you try that?

@develop7
Copy link

@domenkozar thank you for the advice, but no, I did not: because it's a bit less than trivial for the target project and the said project is migrating to nix anyway.

@domenkozar
Copy link
Owner

In that case you can use 96af698 which supported GHC 8.4.3

@freeman42x
Copy link
Author

freeman42x commented Nov 21, 2018

@domenkozar I set:

build-depends:       base == 4.11.1.0

which is the base package for ghc 8.4.4

Then I made sure that ghc 8.4.4 was on path. Did a cabal clean, cabal configure just in case.
And I am still getting the previous error:

Got error while processing diagnostics: Bad interface file: /nix/store/8dm2vfkhwps5kp9vr9y3f1ppijz5w5bb-ghc-8.4.4/lib/ghc-8.4.4/ghc-prim-0.5.2.0/GHC/Types.hi mismatched interface file versions (wanted "8022", got "8044")
Haskell (hie) /home/neo/Projects/CodeWars/

I do have the latest hie installed so I thought it might work following your instructions above for @develop7

@freeman42x
Copy link
Author

In the end what worked for me in addition to above steps was to go to ide-haskell-hie settings and set absolute path to hie executable to be: hie-8.4

But ghc-mod is very flaky, types on hover die after the first repl reload.

@freeman42x
Copy link
Author

I downgraded to ghc 822 and it works fine. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants