hie-wrapper fails with "couldn't find a HIE binary with a matching GHC version"
JonathanReeve opened this issue · 4 comments
After following the instructions in the README here, and using this line in my home.nix: (all-hies.selection { selector = p: { inherit (p) ghc864 ghc843; }; })
and this project default.nix:
let
pkgs = import <nixpkgs> { };
in
pkgs.haskellPackages.developPackage {
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[ cabal-install
ghcid
]);
source-overrides = {
plotlyhs = builtins.fetchTarball "https://github.com/JonathanReeve/plotlyhs/archive/0fcf833.tar.gz";
};
}
Running hie
fails with this error:
2020-04-22 13:59:28.725130235 [ThreadId 4] - run entered for hie-wrapper(hie) Version 1.1
x86_64 ghc-8.8.2
2020-04-22 13:59:28.725320501 [ThreadId 4] - Current directory:/home/jon/Dropbox/Columbia/
Dissertation/04-colors/color-word-analyzer
2020-04-22 13:59:28.72538497 [ThreadId 4] - Operating system:linux
2020-04-22 13:59:28.725416035 [ThreadId 4] - args:[]
2020-04-22 13:59:28.726804233 [ThreadId 4] - Cabal-Helper decided to use: ProjLocV2Dir {pl
ProjectDirV2 = "/home/jon/Dropbox/Columbia/Dissertation/04-colors/color-word-analyzer"}
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
- color-word-analyzer-0.1.0.0 (exe:color-word-analyzer-cli) (configuration changed)
2020-04-22 13:59:28.945826525 [ThreadId 4] - Module "/home/jon/Dropbox/Columbia/Dissertati
on/04-colors/color-word-analyzer/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/h
ome/jon/Dropbox/Columbia/Dissertation/04-colors/color-word-analyzer", cradleOptsProg = Cra
dleAction: Other CabalV2}
2020-04-22 13:59:28.945995476 [ThreadId 4] - Cradle directory:/home/jon/Dropbox/Columbia/D
issertation/04-colors/color-word-analyzer
2020-04-22 13:59:28.946195069 [ThreadId 4] - Executing GHC on path with args: --numeric-ve
rsion
2020-04-22 13:59:28.978551006 [ThreadId 4] - Project GHC version:8.8.3
2020-04-22 13:59:28.978616756 [ThreadId 4] - hie exe candidates :["hie-8.8.3","hie-8.8","h
ie"]
2020-04-22 13:59:28.979065924 [ThreadId 4] - found hie exe at:/nix/store/ih984s8z86ssxyz5n
r64fbkfzy82syyk-haskell-ide-engine-combined/libexec/bin/hie
2020-04-22 13:59:28.979113742 [ThreadId 4] - args:[]
2020-04-22 13:59:28.979136774 [ThreadId 4] - launching ....
hie-wrapper couldn't find a HIE binary with a matching GHC version in your all-hies instal
lation
hie: callProcess: /nix/store/ih984s8z86ssxyz5nr64fbkfzy82syyk-haskell-ide-engine-combined/
libexec/bin/hie (exit 1): failed
I'm guessing this is because of #55, for not supporting 8.8.3? Or is it something else?
If hie-wrapper doesn't support 8.8.3, is there a way I can downgrade my haskellPackages version, using that default.nix, so that I can use 8.8.2 instead?
Indeed, that's because 8.8.3 isn't supported by the HIE version in all-hies. Until that's sorted out, I think the best way to get around this is to downgrade to a nixpkgs whose default GHC version is 8.8.2 (to avoid having to rebuild everything).
From the nixpkgs master build history at https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.ghc.x86_64-linux, it looks like nixpkgs revision 0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778 is a good candidate for this
Ah I see. Do you know where I can find a guide on how to downgrade my nixpkgs version?
I suggest pinning the nixpkgs in your projects like this: https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs
Awesome, thanks! I'll close this as a duplicate.