OK, I think I’ve seen enough to understand most of what’s going on now. Here’s pstree
during the latest occurrence:
|-screen(1428354)---emacs(1428356)-+-aspell(1526625)
| |-haskell-languag(1913455)-+-{haskell-languag}(1913785)
| | |-{haskell-languag}(1913786)
...
| |-stack(1965609)-+-sh(1965614)---ghcup(1965616)-+-{ghcup}(1965624)
| | | |-{ghcup}(1965625)
...
| | |-{stack}(1965610)
...
| |-{emacs}(1428408)
...
So ghcup
is being called by stack
which itself is being called by emacs
.I would have expected to see it called by haskell-language-server
, but maybe there’s some parent misattribution there. ghcup
is trying to install ghc-9.4.7
% ps aux | grep '[^.]ghcu[p]'
tom 1965616 32.3 0.2 1073760360 23280 ? Sl 19:17 0:15 ghcup run --ghc 9.4.7 --install
emacs
's *Messages*
gives a clue why 9.4.7
specifically:
/home/tom/.ghcup/ghc/9.4.7/bin/ghc: getFileStatus: does not exist (No such file or directory)
Error: [S-6362]
No compiler found, expected minor version match with ghc-9.4.7 (x86_64-tinfo6-libc6-pre232) (based on resolver setting in /home/tom/.stack/global-project/stack.yaml).
To install the correct GHC into /home/tom/.stack/programs/x86_64-linux/, try running 'stack setup' or use the '--install-ghc' flag. To use your system GHC installation, run 'stack config set system-ghc --global true', or use the '--system-ghc' flag.
Try installing a more recent version of haskell-stack-ghc, and please open a bug report if the issue persists in the latest release. Thanks!
and indeed:
% cat .stack/global-project/stack.yaml
...
packages: []
resolver: lts-21.18
LTS 21.18 is ghc-9.4.7
. I don’t, however, understand why stack
run through HLS is using stack/global-project/stack.yaml
when there’s a stack.yaml
in stan
's top-level directory.
Anyway, the main mystery is resolved. I guess I should just use hie.yaml
and ask for cabal
. Thanks again for your help, @michaelpj.