Skip to content

haskell-language-server throws "this operation requires -fexternal-interpreter" #1527

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
maksbotan opened this issue Jun 21, 2022 · 5 comments

Comments

@maksbotan
Copy link
Contributor

I use ghc 8.10.7 from haskell.nix (commit 5a310b0) and haskell-language-server 1.7.0.0 built with haskell-nix.cabalProject from github release tarball.

When running haskell-language-server from CLI or through my editor, I get this error for every file:

Message:  haskell-language-server: this operation requires -fexternal-interpreter

I've reported this to haskell-language-server at haskell/haskell-language-server#2975, but turns out that this is probably compiler-related.

Quoting @wz1000:

In the GHC 8.10.7 source code, this error is only reachable if the HAVE_INTERNAL_INTERPRETER flag is unset when GHC was built: https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-8.10.7-release/compiler/ghci/GHCi.hs#L163

Curiously, with haskell.nix 6d6df80 everything works.

I will try to bisect, if it gives something, I'll update here.

@maksbotan
Copy link
Contributor Author

git bisect points to this commit: 95faec6

@blaxill
Copy link

blaxill commented Jun 21, 2022

I'm also seeing this with latest haskell.nix GHC 9.* (macos)

@hamishmack
Copy link
Collaborator

This should be fixed by #1520.

@blaxill
Copy link

blaxill commented Jun 23, 2022

@hamishmack this is now working for ghc 9.0.2, but oddly not for ghc 9.2.3 (at least for me) perhaps an hls upstream issue though

@kokobd
Copy link
Contributor

kokobd commented Jul 2, 2022

I'm also seeing this on ghc 9.2.3. From hackage, we can see ghc 9.2.2 has a flag internal-interpreter (in ghc, not ghci), while ghc-9.0.2 has a different flag ghci. #1520 only sets ghci to true.

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

No branches or pull requests

4 participants