Skip to content

haskell-language-server: this operation requires -fexternal-interpreter #1512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hamishmack opened this issue Jun 9, 2022 · 2 comments · Fixed by #1520
Closed

haskell-language-server: this operation requires -fexternal-interpreter #1512

hamishmack opened this issue Jun 9, 2022 · 2 comments · Fixed by #1520

Comments

@hamishmack
Copy link
Collaborator

This error seems to happen when using reinstallableLibGhc = true with haskell-language-server (which is now the default). We should try to fix the reinstallableLibGhc, but of now anyone seeing this error can add a modules = [{ reinstallableLibGhc = false; }];, for instance changing:

tools = {
  haskell-language-server = {};
};

to

tools = {
  haskell-language-server = { modules = [{ reinstallableLibGhc = false; }]; };
};
@hamishmack
Copy link
Collaborator Author

One way to reproduce this is:

git clone [email protected]:/input-output-hk/cardano-wallet
cd cardano-wallet
git checkout f1c2697b4
direnv allow
haskell-language-server lib/core/src/Cardano/Wallet.hs

@ocharles
Copy link
Contributor

ocharles commented Jun 9, 2022

To others on GHC 9+, the fix is more than just reinstallableLibGhc = false;, you'll also need to set:

  nonReinstallablePkgs = [
    "rts"
    "ghc-heap"
    "ghc-prim"
    "integer-gmp"
    "integer-simple"
    "base"
    "deepseq"
    "array"
    "ghc-boot-th"
    "pretty"
    "template-haskell"
    "ghcjs-prim"
    "ghcjs-th"
    "ghc-bignum"
    "exceptions"
    "stm"
    "ghc-boot"
    "ghc"
    "Cabal"
    "Win32"
    "array"
    "binary"
    "bytestring"
    "containers"
    "directory"
    "filepath"
    "ghc-boot"
    "ghc-compact"
    "ghc-prim"
    "hpc"
    "mtl"
    "parsec"
    "process"
    "text"
    "time"
    "transformers"
    "unix"
    "xhtml"
    "terminfo"
  ];

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

Successfully merging a pull request may close this issue.

2 participants