Closed
Description
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:
Message: haskell-language-server: this operation requires -fexternal-interpreter
And nothing works. Adding -fexternal-interpreter
to library's ghc-options does not help.
Include debug information
$ haskell-language-server --probe-tools
2022-06-20T13:22:48.598322Z | Info | No log file specified; using stderr.
haskell-language-server version: 1.7.0.0 (GHC: 8.10.7) (PATH: /nix/store/hzj3v8zmwxih2g1agjxna045lzlq6ffq-haskell-language-server-exe-haskell-language-server-1.7.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.7.5
ghc: 8.10.7
$ haskell-language-server --print-cradle
2022-06-20T13:23:14.499544Z | Info | No log file specified; using stderr.
Cradle {cradleRootDir = "/Users/maksbotan/biocad/cobot-io", cradleOptsProg = CradleAction: Cabal}
Snippet from haskell-language-server --debug
from console:
2022-06-20 16:14:57.461045 [ThreadId 887] INFO hie-bios: [44 of 44] Compiling Paths_cobot_io ( /Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/build/autogen/Paths_cobot_io.hs, /Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/build/Paths_cobot_io.o, /Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/build/Paths_cobot_io.dyn_o )
2022-06-20 16:14:58.9091 [ThreadId 887] INFO hie-bios: Configuring test suite 'cobot-io-test' for cobot-io-0.1.4.4..
2022-06-20 16:15:00.845501 [ThreadId 887] INFO hie-bios: Preprocessing test suite 'cobot-io-test' for cobot-io-0.1.4.4..
2022-06-20T13:15:01.579573Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-odir","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-hidir","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-stubdir","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-i","-i/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-itest","-i/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/autogen","-i/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/global-autogen","-I/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/autogen","-I/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/global-autogen","-I/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/cobot-io-test-tmp","-optP-include","-optP/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/build/cobot-io-test/autogen/cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/Users/maksbotan/.cabal/store/ghc-8.10.7/package.db","-package-db","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/packagedb/ghc-8.10.7","-package-db","/Users/maksbotan/.cache/hie-bios/dist-cobot-io-ddc2d1a63c5412a5f4d648ff45acce69/build/x86_64-osx/ghc-8.10.7/cobot-io-0.1.4.4/t/cobot-io-test/package.conf.inplace","-package-id","QuickCheck-2.14.2-79fK7Z8oMp1oVMHkhnSsY","-package-id","array-0.5.4.0","-package-id","attoparsec-0.13.2.5-KliAMI6nehCFfuFsYmQIi3","-package-id","base-4.14.3.0","-package-id","binary-0.8.8.0-HpmhsQDJ8BC4iODE4wIoDZ","-package-id","bytestring-0.10.12.0-BvIZHiOJL8O7XxUygqQkmw","-package-id","cobot-0.1.1.7-J7BWV7H2YYt6nEtLfBZsXI","-package-id","cobot-io-0.1.4.4-inplace","-package-id","containers-0.6.5.1-EiES0HFUZ8PBGNrpVjoYRF","-package-id","data-msgpack-0.0.13-5MCMhlwQfkRGmKTrgQxsg2","-package-id","deepseq-1.4.4.0","-package-id","directory-1.3.6.0-CbmCEFbvko1GLIMcuucehj","-package-id","hspec-2.7.10-7p5N6QxR0ylEd5MpFjsyjE","-package-id","http-conduit-2.3.8-7VKPtch8rv8UG2DCNAkED","-package-id","hyraxAbif-0.2.3.27-KEpXODL2miUCi3c7LDNQOn","-package-id","lens-4.19.2-AeXBoopYt7pJO3smpQC1t5","-package-id","linear-1.21.6-JtHSClC3cDbEmBvXQ48N03","-package-id","megaparsec-9.0.1-4kWwBUhqGyzLK7ho3iZo79","-package-id","mtl-2.2.2-Cl2NxTNak818U6bJEGW2JG","-package-id","neat-interpolation-0.5.1.2-LAL1qtR39Az1bLI4Ph4yLU","-package-id","parser-combinators-1.2.1-IbT4qyHauK0Ahn9nXuH97m","-package-id","split-0.2.3.4-IUvATEEGVazHDL4WYDj96v","-package-id","text-1.2.4.1-3ons0v27Yr7GZbokcYUGS","-package-id","vector-0.12.3.1-4FjazO9RBEZ2u7P573uIyU","-XHaskell2010","-XOverloadedStrings","-XTypeFamilies","test/Spec.hs","ABISpec","FastaParserSpec","FASTASpec","FastaWriterSpec","GBParserSpec","GBWriterSpec","MAEParserSpec","MAESpec","MMTFSpec","PDBParserSpec","PDBSpec","PDBWriterSpec","RangeSpec","SequenceSpec","StructureSpec","UniprotSpec","Paths_cobot_io","-rtsopts","-with-rtsopts=-N","-hide-all-packages","-Wall","-Werror"], componentRoot = "/Users/maksbotan/biocad/cobot-io", componentDependencies = ["cobot-io.cabal","cabal.project","cabal.project.local"]},"/nix/store/whmps8src3ca9brshhamylay2nfl82pg-ghc-shell-for-cobot-io-ghc-8.10.7-env/lib/ghc-8.10.7")
2022-06-20T13:15:01.648744Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/test/GBWriterSpec.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.649050Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/src/Bio/MMTF/MessagePack.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.649142Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/src/Bio/Uniprot.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.649251Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/test/StructureSpec.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.649527Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/test/MMTFSpec.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.649740Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/src/Bio/FASTA/Writer.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.650033Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/src/Bio/GB.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.650214Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/src/Bio/MMTF/Decode/MessagePack.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter
2022-06-20T13:15:01.650485Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/maksbotan/biocad/cobot-io/test/ABISpec.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message: haskell-language-server: this operation requires -fexternal-interpreter