Closed viluon closed 3 years ago
It seems that this behaviour is due to the old Extended Eval Plugin's comment parser. IIUC, this behaviour should be already fixed in the master branch by #1232.
@viluon Could you test against the HLS built from the current master branch?
@konn the fact that it reports "No such file or directory" and seems to parse the #include
at least to the extent required to construct such an error message makes me think a parser error is very unlikely. I can try the master branch though.
Thanks to much help from @mpickering in #haskell-language-server
on Freenode, I was able to resolve this issue. The problem was that the interface to hie-bios
changed since the 8.10.2 release of GHC, and HLS is incompatible with the old one. To fix it, I had to backport a999ee96
and 014ef4a3
, editing the paths in hadrian/src/Rules/ToolArgs.hs
to reflect the state of lexers and parsers before the refactoring that put Cmm modules in a separate subdirectory.
To clarify, although the 0.9.0 HLS release does have some parser problems, these weren't the cause of the reported #include
issues. I get the {-# UNPACK #-}
problem reported in the log (#1258):
[Error - 6:23:01 PM] Request textDocument/codeLens failed.
Message: Tokens.next failed to parse {-# UNPACK #-} !Int -- length Parser did not consume entire stream, left: "!Int -- length"
but #include
s no longer stop the processing of the whole file:
Your environment
Which lsp-client do you use: VS Code
Describe your project (alternative: link to the project): GHC 8.10.2
Contents of
hie.yaml
:Steps to reproduce
Open any
.hs
file with a CPP#include
, such asghc/GHCi/UI.hs
,compiler/main/InteractiveEval.hs
, orlibraries/containers/containers/src/Data/Map.hs
.Expected behaviour
The HLS processes the file, reporting lints.
Actual behaviour
The HLS reports a single error complaining about the non-existence of the included file and gives up further analysis.
Files without CPP includes do not trigger this kind of faulty behaviour:
The logs also mention a match error (see the attached debug information):
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
The first 512 lines are here: ``` (haskell-language-server)Ghcide setup tester in /home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2. Report bugs at https://github.com/haskell/haskell-language-server/issues Tool versions found on the $PATH cabal: 3.2.0.0 stack: 2.5.1 ghc: 8.6.5 Step 1/4: Finding files to test in /home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2 Found 11421 files Step 2/4: Looking for hie.yaml files that control setup Found 2 cradles Step 3/4: Initializing the IDE Step 4/4: Type checking the files [INFO] Consulting the cradle for "libraries/Cabal/cabal-testsuite/PackageTests/NewBuild/T4375/repo/old-time-1.1.0.3/System/Time.hs" [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main] [INFO] Consulting the cradle for "nofib/imaginary/gen_regexps/Main.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main] [INFO] Consulting the cradle for "testsuite/tests/indexed-types/should_fail/T16110_Fail1.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main] [INFO] Consulting the cradle for "testsuite/tests/rename/should_compile/Rn059_A.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/deriving/should_compile/T7947.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main] [INFO] Consulting the cradle for "nofib/spectral/eliza/Main.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main] [INFO] Consulting the cradle for "nofib/real/reptile/Diff.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/Cabal/cabal-testsuite/PackageTests/AllowOlder/cabal.test.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/rts/T5644/Conf.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/annotations/should_compile/th/annth.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/deSugar/should_compile/ds047.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/typecheck/should_fail/UnliftedNewtypesMismatchedKind.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/Cabal/Cabal/Distribution/Types/Version.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/Cabal/cabal-testsuite/PackageTests/Ambiguity/package-import/A.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/concurrent/should_run/allocLimit3.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/th/T13642.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/ghc-api/annotations/Test10399.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "compiler/stgSyn/StgSubst.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/Cabal/cabal-install/Distribution/Client/SourceFiles.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/deSugar/should_compile/ds053.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/safeHaskell/unsafeLibs/BadImport09.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/Cabal/cabal-testsuite/PackageTests/NewBuild/CmdRun/ExitCodePropagation/cabal.test.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "libraries/text/tests/Tests/SlowFunctions.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/quasiquotation/qq008/Test.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "hadrian/src/Oracles/TestSettings.hs" [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main] [INFO] Consulting the cradle for "testsuite/tests/rename/should_fail/rnfail033.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/typecheck/should_compile/tc132.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Making new HscEnv[main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main,main] [INFO] Consulting the cradle for "testsuite/tests/perf/should_run/T149_A.hs" [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide [INFO] Using interface files cache dir: ghcide ``` The archive [hls-debug.txt.zip](https://github.com/haskell/haskell-language-server/files/5911939/hls-debug.txt.zip) contains the result of running the requested command for half an hour. It seems to scale dreadfully with the number of Haskell sources in the project and doesn't contain useful information, so I'm not willing to let it finish. I can provide logs for a more specific command invocation upon request.Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The following is the VS Code log displayed via the "Developer: Show Logs…" command: ``` [client] run command: "haskell-language-server-wrapper --lsp -d -l hls.log" [client] debug command: "haskell-language-server-wrapper --lsp -d -l hls.log" [client] server cwd: undefined Found "/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2/hie.yaml" for "/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2/a" Module "/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2/a" is loaded by Cradle: Cradle {cradleRootDir = "/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2", cradleOptsProg = CradleAction: Bios} Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 0.9.0.0, Git revision 46d2a3dc7ef49ba57b2706022af1801149ab3f2b (dirty) x86_64 ghc-8.10.1 Current directory: /home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2 Operating system: linux Arguments: ["--lsp","-d","-l","hls.log"] Cradle directory: /home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2 Cradle type: Bios Tool versions found on the $PATH cabal: 3.2.0.0 stack: 2.5.1 ghc: 8.6.5 Consulting the cradle to get project GHC version... Project GHC version: 8.6.5 haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server-8.6","haskell-language-server"] Launching haskell-language-server exe at:/home/viluon/.ghcup/bin/haskell-language-server-8.6.5 haskell-language-server version: 0.9.0.0 (GHC: 8.6.5) (PATH: /home/viluon/.ghcup/bin/haskell-language-server-8.6.5~0.9.0) (GIT hash: 46d2a3dc7ef49ba57b2706022af1801149ab3f2b) Starting (haskell-language-server)LSP server... with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Just "hls.log", argsThreads = 0, argsProjectGhcVersion = False} with plugins: [PluginId "brittany",PluginId "class",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide-code-actions",PluginId "ghcide-completions",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-type-lenses",PluginId "haddockComments",PluginId "hlint",PluginId "importLens",PluginId "moduleName",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "splice",PluginId "stylish-haskell",PluginId "tactic"] in directory: /home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2 If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option! Started LSP server in 0.02s Output from setting up the cradle Cradle {cradleRootDir = "/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2", cradleOptsProg = CradleAction: Bios} > -hide-all-packages -no-user-package-db -package-db .hie-bios/stage0/lib/package.conf.d -this-unit-id ghc-8.10.2 -package-id array-0.5.3.0 -package-id base-4.12.0.0 -package-id binary-0.8.8.0 -package-id bytestring-0.10.8.2 -package-id containers-0.6.0.1 -package-id deepseq-1.4.4.0 -package-id directory-1.3.3.0 -package-id filepath-1.4.2.1 -package-id ghc-boot-8.10.2 -package-id ghc-boot-th-8.10.2 -package-id ghc-heap-8.10.2 -package-id ghci-8.10.2 -package-id hpc-0.6.1.0 -package-id process-1.6.5.0 -package-id template-haskell-2.16.0.0 -package-id terminfo-0.4.1.4 -package-id time-1.8.0.2 -package-id transformers-0.5.6.2 -package-id unix-2.7.2.2 -i -i.hie-bios/stage0/compiler/build -i.hie-bios/stage0/compiler/build/autogen -icompiler/. -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/hieFile -Iincludes -I.hie-bios/stage0/lib -I.hie-bios/stage0/compiler/build -I.hie-bios/stage0/compiler/build/. -I.hie-bios/stage0/compiler/build/parser -I.hie-bios/stage0/compiler/build/utils -Icompiler/. -Icompiler/parser -Icompiler/utils -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/process-1.6.5.0/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/unix-2.7.2.2/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/time-1.8.0.2/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/bytestring-0.10.8.2/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/base-4.12.0.0/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/integer-gmp-1.0.2.0/include -I/home/viluon/.ghcup/ghc/8.6.5/lib/ghc-8.6.5/include -I.hie-bios/stage0/lib -optc-I.hie-bios/stage0/lib -optP-include -optP.hie-bios/stage0/compiler/build/autogen/cabal_macros.h -optP-DCAN_LOAD_DLL -O0 -H64m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -optc-DTHREADED_RTS -fno-warn-deprecated-flags -ighc ghc/Main.hs [Error - 3:48:02 PM] Request textDocument/codeLens failed. Message: user error (Pattern match failure in do expression at src/Ide/Plugin/Eval/CodeLens.hs:254:17-42) Code: -32603 ```And here is the log file saved with the Log File configuration option of the Haskell VS Code extension (Trace: Server = messages). ``` 2021-02-02 15:47:59.530479634 [ThreadId 5] - haskell-lsp:Starting up server ... 2021-02-02 15:47:59.533639394 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":73183,"clientInfo":{"name":"vscode","version":"1.52.1"},"rootPath":"/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2","rootUri":"file:///home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"],"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"]}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2","name":"ghc-8.10.2"}]}} 2021-02-02 15:47:59.536459986 [ThreadId 5] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2 2021-02-02 15:47:59.563711334 [ThreadId 18] - Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 2507145991114103291 "file:///home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2"], clientSettings = hashed Nothing} 2021-02-02 15:47:59.567287227 [ThreadId 7] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"foldingRangeProvider":false,"textDocumentSync":{"openClose":true,"change":2,"save":{}},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"implementationProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["73349:class:addMinimalMethodPlaceholders","73349:eval:evalCommand","73349:ghcide-type-lenses:typesignature.add","73349:hlint:applyOne","73349:hlint:applyAll","73349:importLens:ImportLensCommand","73349:moduleName:edit","73349:retrie:retrieCommand","73349:splice:expandTHSpliceInplace","73349:tactic:tacticsAutoCommand","73349:tactic:tacticsIntrosCommand","73349:tactic:tacticsDestructCommand","73349:tactic:tacticsHomomorphismCommand","73349:tactic:tacticsDestructLambdaCaseCommand","73349:tactic:tacticsHomomorphismLambdaCaseCommand"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":false},"codeLensProvider":{},"documentSymbolProvider":true,"documentFormattingProvider":true}},"jsonrpc":"2.0","id":0} 2021-02-02 15:47:59.571321772 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}} 2021-02-02 15:47:59.58319594 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"haskell":{"hlintOn":true,"maxNumberOfProblems":200,"diagnosticsOnChange":true,"liquidOn":true,"completionSnippetsOn":true,"formatOnImportOn":true,"formattingProvider":"ormolu","trace":{"server":"messages"},"logFile":"hls.log","languageServerVariant":"haskell-language-server","serverExecutablePath":"haskell-language-server-wrapper","updateBehavior":"keep-up-to-date","indentationRules":{"enabled":true}}}}} 2021-02-02 15:47:59.583842544 [ThreadId 18] - Configuration changed: Object (fromList [("haskell",Object (fromList [("logFile",String "hls.log"),("updateBehavior",String "keep-up-to-date"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool True),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String "haskell-language-server-wrapper"),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 200.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "messages")]))]))]) 2021-02-02 15:47:59.583814438 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/viluon/Projects/haskell/lazy-analysis/container/ghc-8.10.2/libraries/containers/containers/src/Data/Map.hs","languageId":"haskell","version":1,"text":"{-# LANGUAGE CPP #-}\n#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)\n{-# LANGUAGE Safe #-}\n#endif\n\n#ifdef __GLASGOW_HASKELL__\n{-# LANGUAGE DataKinds, FlexibleContexts #-}\n#endif\n#if __GLASGOW_HASKELL__ >= 800\n{-# LANGUAGE MonoLocalBinds #-}\n#endif\n\n#include \"containers.h\"\n\n-----------------------------------------------------------------------------\n-- |\n-- Module : Data.Map\n-- Copyright : (c) Daan Leijen 2002\n-- (c) Andriy Palamarchuk 2008\n-- License : BSD-style\n-- Maintainer : libraries@haskell.org\n-- Portability : portable\n--\n-- /Note:/ You should use \"Data.Map.Strict\" instead of this module if:\n--\n-- * You will eventually need all the values stored.\n--\n-- * The stored values don't represent large virtual data structures\n-- to be lazily computed.\n--\n-- An efficient implementation of ordered maps from keys to values\n-- (dictionaries).\n--\n-- These modules are intended to be imported qualified, to avoid name\n-- clashes with Prelude functions, e.g.\n--\n-- > import qualified Data.Map as Map\n--\n-- The implementation of 'Map' is based on /size balanced/ binary trees (or\n-- trees of /bounded balance/) as described by:\n--\n-- * Stephen Adams, \\\"/Efficient sets: a balancing act/\\\",\n-- Journal of Functional Programming 3(4):553-562, October 1993,\n--