-
-
Notifications
You must be signed in to change notification settings - Fork 391
Error from any file: this operation requires -fexternal-interpreter #2975
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
Comments
Curiously enough, autocompletion works, but hover, go-to-definition, etc do not. Happens with and without cradle:
cabal:
- path: "."
component: "lib:cobot-io"
- path: "test"
component: "test:cobot-io-test" |
It seems like your GHC installation is missing an internal interpreter.
|
$ ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts","")
,("C compiler command","clang")
,("C compiler flags","")
,("C++ compiler flags","")
,("C compiler link flags","")
,("C compiler supports -no-pie","NO")
,("Haskell CPP command","clang")
,("Haskell CPP flags","-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs")
,("ld command","ld")
,("ld flags","")
,("ld supports compact unwind","YES")
,("ld supports build-id","NO")
,("ld supports filelist","YES")
,("ld is GNU ld","NO")
,("Merge objects command","ld")
,("Merge objects flags","-r")
,("ar command","ar")
,("ar flags","qcls")
,("ar supports at file","NO")
,("ranlib command","ranlib")
,("otool command","otool")
,("install_name_tool command","install_name_tool")
,("touch command","touch")
,("dllwrap command","/bin/false")
,("windres command","/bin/false")
,("libtool command","libtool")
,("unlit command","/nix/store/whmps8src3ca9brshhamylay2nfl82pg-ghc-shell-for-cobot-io-ghc-8.10.7-env/lib/ghc-8.10.7/bin/unlit")
,("cross compiling","NO")
,("target platform string","x86_64-apple-darwin")
,("target os","OSDarwin")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","NO")
,("target has .ident directive","YES")
,("target has subsections via symbols","YES")
,("target has RTS linker","YES")
,("Unregisterised","NO")
,("LLVM target","x86_64-apple-darwin")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("LLVM clang command","clang")
,("integer library","integer-gmp")
,("Use interpreter","YES")
,("Use native code generator","YES")
,("Support SMP","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn thr_debug_p debug_p")
,("Tables next to code","YES")
,("Leading underscore","YES")
,("Use LibFFI","NO")
,("Use Threads","YES")
,("Use Debugging","NO")
,("RTS expects libdw","NO")
,("Project version","8.10.7")
,("Project Git commit id","1f02b7430b2fbab403d7ffdde9cfd006e884678e")
,("Booter version","8.6.5")
,("Stage","2")
,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")
,("Have interpreter","YES")
,("Object splitting supported","NO")
,("Have native code generator","YES")
,("Support dynamic-too","YES")
,("Support parallel --make","YES")
,("Support reexported-modules","YES")
,("Support thinning and renaming package flags","YES")
,("Support Backpack","YES")
,("Requires unified installed package IDs","YES")
,("Uses package keys","YES")
,("Uses unit IDs","YES")
,("Dynamic by default","NO")
,("GHC Dynamic","YES")
,("GHC Profiled","NO")
,("Debug on","NO")
,("LibDir","/nix/store/whmps8src3ca9brshhamylay2nfl82pg-ghc-shell-for-cobot-io-ghc-8.10.7-env/lib/ghc-8.10.7")
,("Global Package DB","/nix/store/whmps8src3ca9brshhamylay2nfl82pg-ghc-shell-for-cobot-io-ghc-8.10.7-env/lib/ghc-8.10.7/package.conf.d")
] $ ghc --info | grep -i interp
,("Use interpreter","YES")
,("Have interpreter","YES") |
@wz1000 hi, do you have some ideas? I don't even know what additional info should I provide |
I'm not sure, this might be caused by the haskell.nix patches to GHC. I would report this upstream to haskell.nix. In the GHC 8.10.7 source code, this error is only reachable if the |
Thanks! I will raise that issue there. |
Your environment
Which OS do you use:
macOS 11.6 Bug Sur
Which LSP client (editor/plugin) do you use:
neovim + coc.nvim, vs code
Describe your project (alternative: link to the project):
cabal.project + hie.yaml, https://github.com/biocad/cobot-io
Steps to reproduce
I have GHC 8.10.7 from haskell.nix and haskell-language-server 1.7.0.0 built from Hackage with cabal with this patch applied to ghcide: https://github.com/input-output-hk/haskell.nix/blob/master/patches/ghcide-1.7-unboxed-tuple-fix-issue-1455.patch
Expected behaviour
Should work
Actual behaviour
Each file gets this diagnostics:
And nothing works. Adding
-fexternal-interpreter
to library's ghc-options does not help.Include debug information
Snippet from
haskell-language-server --debug
from console:The text was updated successfully, but these errors were encountered: