Haskell-language-server: Install fails: `stack: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)`

Created on 22 Jun 2020  路  3Comments  路  Source: haskell/haskell-language-server

I just cloned this project on my Nix laptop and install fails with a Shake error :thinking:

$ git clone https://github.com/haskell/haskell-language-server --recurse-submodules
$ cd haskell-language-server
$ ./install.hs hls-8.6.5
# stack (for check)
Error when running Shake build system:
  at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shake-0.18.5-44KSA7uQF2VObxzEvLYZx:Development.Shake.Internal.Args
* Depends on: hls-8.6.5
  at apply1, called at src/Development/Shake/Internal/Rules/Rerun.hs:41:5 in shake-0.18.5-44KSA7uQF2VObxzEvLYZx:Development.Shake.Internal.Rules.Rerun
* Depends on: check
* Raised the exception:
stack: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

Note that stack is indeed in my path:

$ stack --version
2.1.3.1 x86_64 hpack-0.33.0

Install failed for 8.6.5, 8.10.1 and 8.8.3 with exactly the same error.

Note that stack ./install.hs help works fine...

build stack can-workaround install nixos bug

All 3 comments

Yeah, I remember this issue. Stack puts us in a pure nix-shell, where the executable stack is not available, which we need to build the project.

I never managed to persuade stack to do what we want.

My work-arounds:

  • Use cabal, which does not do this
  • Compile the script and execute it directly. It should be possible with stack to compile the script, but I cant manage to do it right now.

    • Work-around with nix:

      bash nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [shake directory filepath extra text])" ghc install.hs -i -iinstall/src -XLambdaCase -XRecordWildCards -DRUN_FROM_STACK -o MyInstaller # now run the installer ./MyInstaller help

Shouldn't we at least document this limitation?

Ideally also fix this for Stack users :smile: Though I do realize this may be slightly harder

I thought I did somewhere... But yeah, we should!

Ideally also fix this for Stack users

maybe we can fix the stack.yaml somehow.

Was this page helpful?
0 / 5 - 0 ratings