Incorrect GHC Version Used
Hello,
Thanks very much for all your efforts to make this plugin work.
I can't seem to get hie-wrapper to work properly with neovim. I apologise if I have raised an issue which is a duplicate of another, but I have sincerely tried to find a solution in the similar issues on here to no avail.
I have freshly cloned and made hie, and set up neovim as per the README to use hie-wrapper.
If I open a haskell file in neovim I get the following output:
[LC] Project root: /Users/jameshamilton/sites/marketing-planner
[LC] [Warning] Mismatching GHC versions: Project is 8.6.3, HIE is 8.6.4^@You may want to use hie-wrapper. Check the README for more information
[LC] [Warning] Mismatching GHC versions: Project is 8.6.3, HIE is 8.6.4^@You may want to use hie-wrapper. Check the README for more information
[LC] [Error] Got error while processing diagnostics: <command line>: cannot satisfy -package-id aeson-1.4.2.0-JRlZKD1FkrO2eJjy3cMEtP: ^@ aeson-1.4.2.0-JRlZKD1FkrO2eJjy3cMEtP is unusable due to missing dependencies:^@ attopa
rsec-0.13.2.2-7cR7so94jW75HlSyRFdGuR primitive-0.6.4.0-1mvPxVOk6Q6KOkWCZxqESf scientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC tagged-0.8.6-FABECvKnqYbBCttH1EeJvB vector-0.12.0.2-H1Eu1OCXL0L9y980iV8EwU^@ (use -v for more information)
Similarly, if I run hie-wrapper in the project root, I get the following output:
2019-03-12 14:24:00.693215 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.7.0.0 (2482 commits) x86_64 ghc-8.6.4
2019-03-12 14:24:00.694762 [ThreadId 4] - Current directory:/Users/jameshamilton/sites/marketing-planner
2019-03-12 14:24:00.89905 [ThreadId 4] - Cradle directory:/Users/jameshamilton/sites/marketing-planner
2019-03-12 14:24:00.899868 [ThreadId 4] - Using stack GHC version
2019-03-12 14:24:01.113853 [ThreadId 4] - Project GHC version:8.6.3
2019-03-12 14:24:01.114487 [ThreadId 4] - hie exe candidates :["hie-8.6.3","hie-8.6","hie"]
2019-03-12 14:24:01.115829 [ThreadId 4] - found hie exe at://Users/jameshamilton/.local/bin/hie-8.6.3
2019-03-12 14:24:01.116453 [ThreadId 4] - args:[]
2019-03-12 14:24:01.116765 [ThreadId 4] - launching ....
2019-03-12 14:24:01.133128 [ThreadId 4] - Using stack GHC version
2019-03-12 14:24:01.344724 [ThreadId 4] - Mismatching GHC versions: Project is 8.6.3, HIE is 8.6.4
2019-03-12 14:24:01.345456 [ThreadId 4] - Run entered for HIE(hie-8.6.3) Version 0.7.0.0, Git revision 65225fe9c4314b44fd2f9f3c0a4067961ee872cc (2482 commits) x86_64 ghc-8.6.4
2019-03-12 14:24:01.346619 [ThreadId 4] - Current directory:/Users/jameshamilton/sites/marketing-planner
I have tried changing the hie-wrapper value in the below setting to hie and hie-8.6.3 and it has no effect on the result, which is a bit strange.
let g:LanguageClient_serverCommands = {
\ 'haskell': ['hie-wrapper'],
\ 'javascript': ['javascript-typescript-stdio']
\ }
Sorry, but I really have no idea what to try next.
I'm running MacOS 10.14.13
You have compiled hie with GHC-8.6.4 but are trying to use it with a project which uses GHC-8.6.3. You should either update your project to use GHC-8.6.4 or compile a version of hie which uses GHC-8.6.3.
Understood, but shouldn't the hie-8.6.3 binary work?
It might do but it also might not. I am sure you could compile the wrapper with 8.6.3 and 8.6.4 support if you wanted to use both versions for different projects.
Thanks for your help!
I found the issue here. There's a mismatch between the Stackage documentation for lts-13.11 and what's actually checked in.
Documentation suggests that lts-13.11 corresponds to GHC 8.6.3 but when you look at the source, it actually corresponds to GHC 8.6.4 https://github.com/commercialhaskell/lts-haskell/blob/master/lts-13.11.yaml
This is causing hie-8.6.3 to be built with GHC 8.6.4. Will submit a PR to fix.