Skip to content
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

Use hie-bios implicit cradle with a fallback to the cabal-helper one #110

Closed
wants to merge 7 commits into from

Conversation

jneira
Copy link
Member

@jneira jneira commented May 14, 2020

  • Alternative to Use cabal-helper cradle instead hie-bios implicit one #68: that one uses exclusively the cabal-helper cradle
  • We have to take in account that, with no hie.yaml present, we already are starting the cabal-helper machinery in the wrapper, to query the ghc version used in the project (in a more effective way that the actual check in ghcide to validate the ghc used is incorrect)
    • Including the compiling at runtime, linking the appropiate Cabal version (not sure about that, maybe @fendor can confirm it)
  • As we dont have right now a reliable way to load a project without an explicit hie.yaml i think that we can chain the existing ones until we get the right one.

@jneira jneira requested review from fendor and Avi-D-coder May 14, 2020 19:56
@@ -58,6 +58,28 @@ findLocalCradle fp = do
logm $ "Module \"" ++ fp ++ "\" is loaded by Cradle: " ++ show crdl
return crdl

implicitCradle :: FilePath -> IO (Cradle CabalHelper)
implicitCradle fp = do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fendor i dont fully like this code, sure there will be a better one alternative. In my tests it seems to work though

@Avi-D-coder
Copy link
Collaborator

Avi-D-coder commented May 14, 2020

I'm not sure using first cabal-helper makes sense.
Cabal-helper startup times are much longer then hie-bios, and it's more fragile.
What is the expected result of loading a basic stack project's src/Lib.hs and then test/Spec.hs, this worked after a stack build once, but did not work when cabal-helper chose to use stack, despite there being no .stack-work and having just run cabal build. On top of choosing the wrong cradle cabal-helper does not invoke stack build in a way that hie-bios can then use the stack cradle (first log).

I continue to think that cabal-helper has too many moving parts, and is very difficult to make reliable or even transparent (a new user has no idea what either of these error logs means).

Basic stack project log

## Output channel: languageserver.haskell

ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: /home/host/.cabal/store/gh
c-8.8.3/haskell-language-server-0.1.0.0-5ee0eb20ba93b84644c34c4a3cfc97
bd0e8581eb6ba74c3d07fb7f314227b2ad/bin/haskell-language-server)
Starting (haskel
l-language-server)LSP server...
  with arguments: Arguments {argLSP = True
, argsCwd = Nothing, argFiles = [], argsVersion = 
False, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False,
 argsDebugOn = False, argsLogFile = Nothing, argsThreads = 1}
  with plugins: 
[PluginId "brittany",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",
PluginId "pragmas"]
If you are seeing this in a terminal, you probably sh
ould have run ghcide WITHOUT the --lsp option!
 
Started LSP server in 0.00s
2020-05-14 16:47:46.088889434 [ThreadId 9] - Opened text document: file:///home/host/basic-project/src/Lib.hs
Consulting the cradle for "/home/host/basic-project/src/Lib.hs"
2020-05-14 16:47:46.090882844 [ThreadId 26] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/host/basic-project/stack.yaml"}
Building all executables for `basic-project' once. After a successful build of all of them, only specified executables will be rebuilt.
basic-project> configure (lib + exe)
2020-05-14 16:47:48.094712433 [ThreadId 41] - Plugin.makeCodeLens (ideLogger)
Configuring basic-project-0.1.0.0...
Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O","-outputdir",".stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-odir",".stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-hidir",".stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-stubdir",".stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-i","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-i/home/host/basic-project/src","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/autogen","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/global-autogen","-I.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/autogen","-I.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/global-autogen","-I.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-optP-include","-optP.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/autogen/cabal_macros.h","-this-unit-id","basic-project-0.1.0.0-8wc5A23pExf2m4lYyd5rgH","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/host/.stack/snapshots/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb","-package-db","/home/host/basic-project/.stack-work/install/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb","-package-id","base-4.13.0.0","-XHaskell2010","Lib","Paths_basic_project"], componentRoot = "/home/host/basic-project", componentDependencies = []})
"Making new HscEnv[basic-project-0.1.0.0-8wc5A23pExf2m4lYyd5rgH]"
(([],Just HscEnvEq 3),fromList [])
2020-05-14 16:47:48.416138408 [ThreadId 139] - finish: InitialLoad (took 0.00s)
2020-05-14 16:48:02.151
060585 [ThreadId 141] - Plugin.makeCodeLens (ideLogg
er)
2020-0
5-14 16:48:02.445832407 [ThreadId 172] - D
ocumentHighlight req
uest at position 
1:1 in file: /h
ome/host/basi
c-project/src
/Lib.hs
2020-0
5-14 16:48:05.403771885 [ThreadId 209] - DocumentHighlight request 
at position 5:1 in file: /home/host/basic-proj
ect/src/Lib.hs
202
0-05-14 16:48:06.286101559 [Thread
Id 244] - GhcIde.hover enter
ed (ideLogger)
202
0-05-14 16:48:06.286600716 [Threa
dId 244] - Hover request
 at position 5:1 in fil
e: /home/host/basic-pr
oject/src/Lib.hs
2020-
05-14 16:48:06.617712809 [ThreadId 283] - Do
cumentHighlight request at 
position 5:1 in file: /ho
me/host/basic-project/src/
Lib.hs
2020
-05-14 16:48:07.749709245 [ThreadId 318] - GhcIde.hover 
entered (ideLogger)
2020
-05-14 16:48:07.750059295 [ThreadId 318
] - Hover request at position 5:1 
in file: /home/host/basic-project/
src/Lib.hs
2020-05-
14 16:48:08.192985438 [ThreadId 
354] - DocumentHi
ghlight reque
st at position 5
:1 in file: 
/home/host/ba
sic-project/s
rc/Lib.hs
2020-05-14 16
:48:15.190898297 [ThreadId 389] - Plugin.mak
eCodeLens (ideLogger)
2020-
05-14 16:48:15.445431006 [
ThreadId 420] - D
ocumentHighlight 
request at po
sition 5:1 in
 file: /home/
host/basic-
project/src/L
ib.hs
2020-05-14 16:48:22.34974551 [ThreadId 9] - Opened text document: file:///home/host/basic-project/test/Spec.hs
Consulting the cradle for "/home/host/basic-project/test/Spec.hs"
2020-05-14 16:48:22.352200051 [ThreadId 471] - Cabal-Helper decided to use: ProjLocStackYaml {plStackYaml = "/home/host/basic-project/stack.yaml"}
2020-05-14 16:48:22.417549031 [ThreadId 493] - Plugin.makeCodeLens (ideLogger)
Building all executables for `basic-project' once. After a successful build of all of them, only specified executables will be rebuilt.
basic-project> configure (lib + exe)
Configuring basic-project-0.1.0.0...
2020-05-14 16:48:24.595019274 [ThreadId 471] - Error loading Stack projectusing cabal-helper: Could not obtain flags for: "test/Spec.hs".

This module was not part of any component we are aware of.

Component: ChLibName ChMainLibName with source directory: ["src"]
Component: ChExeName "basic-project-exe" with source directory: ["app"]


To expose a module, refer to:
https://docs.haskellstack.org/en/stable/GUIDE/
If you are using `package.yaml` then you don't have to manually expose modules.
Maybe you didn't set the source directories for your project correctly.

2020-05-14 16:48:24.595220862 [ThreadId 471] - Fallback to hie-bios implicit cradle
> Using main module: 1. Package `basic-project' component basic-project:test:basic-project-test with main-is file: /home/host/basic-project/test/Spec.hs
> Building all executables for `basic-project' once. After a successful build of all of them, only specified executables will be rebuilt.
> basic-project> configure (lib + exe)
> Configuring basic-project-0.1.0.0...
> basic-project> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: basic-project
> 
> Warning: Didn't find expected autogen file:
>          /home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/basic-project-test/autogen/cabal_macros.h
> /home/host/basic-project/.stack-work/install/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb:/home/host/.stack/snapshots/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb:/home/host/.ghcup/ghc/8.8.3/lib/ghc-8.8.3/package.conf.d
Right (ComponentOptions {componentOptions = ["-i","-odir=/home/host/basic-project/.stack-work/odir","-hidir=/home/host/basic-project/.stack-work/odir","-hide-all-packages","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/basic-project-test","-i/home/host/basic-project/test","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/basic-project-test/autogen","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/global-autogen","-i/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/basic-project-test/basic-project-test-tmp","-stubdir=/home/host/basic-project/.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build","-package-id=base-4.13.0.0","-package=basic-project-0.1.0.0","-rtsopts","-with-rtsopts=-N","-ghci-script=/tmp/haskell-stack-ghci/f47303a1/ghci-script","-package-db","/home/host/basic-project/.stack-work/install/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb","-package-db","/home/host/.stack/snapshots/x86_64-linux/5ea668a9a9096152d2ddba569da34371c56a12623d9d9e1f1e94178639b7f7c3/8.8.3/pkgdb","-package-db","/home/host/.ghcup/ghc/8.8.3/lib/ghc-8.8.3/package.conf.d"], componentRoot = "/home/host/basic-project", componentDependencies = ["basic-project.cabal","package.yaml","stack.yaml"]})
haskell-language-server: <command line>: cannot satisfy -package basic-project-0.1.0.0
    (use -v for more information)
2020-05-14 16:48:47.924659387 [ThreadId 518] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:49:06.507633585 [ThreadId 521] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:50:37.332052576 [ThreadId 525] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:50:38.644994741 [ThreadId 528] - GhcIde.hover entered (ideLogger)
2020-05-14 16:50:38.645340035 [ThreadId 528] - Hover request at position 2:3 in file: /home/host/basic-project/test/Spec.hs
2020-05-14 16:50:39.044466813 [ThreadId 531] - GhcIde.hover entered (ideLogger)
2020-05-14 16:50:39.044945057 [ThreadId 531] - Hover request at position 2:3 in file: /home/host/basic-project/test/Spec.hs
2020-05-14 16:50:39.29946409 [ThreadId 534] - GhcIde.hover entered (ideLogger)
2020-05-14 16:50:39.299880225 [ThreadId 534] - Hover request at position 2:3 in file: /home/host/basic-project/test/Spec.hs
2020-05-14 16:54:43.950945097 [ThreadId 537] - Plugin.makeCodeLens (ideLogger)

Building Cabal-helper panicked preventing the fallback from being attempted at all with the hls repo

## Output channel: languageserver.haskell

ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: /home/host/.cabal/store/gh
c-8.8.3/haskell-language-server-0.1.0.0-5ee0eb20ba93b84644c34c4a3cfc97bd0e8581eb6ba74c3
d07fb7f314227b2ad/bin/haskell-language-server)
Starting (haskell-language-server)LSP
 server...
  with arguments: Arguments {argLSP = True, argsCwd = No
thing, argFiles = [], argsVersion = False, argsShakePro
filing = Nothing, argsTesting = False, argsExamplePl
ugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 
1}
  with plugins: [PluginId "brittany",PluginId "floskell",PluginId "ghci
de",PluginId "ormolu",PluginId "pragmas"]
If you are seeing this in a ter
minal, you probably should have run ghcide WITHOUT the --lsp opt
ion!
 
Started LSP server in 0.01s
2020-05-14 16:36:51.511121141 [ThreadId 9] - Opened text document: file:///home/host/Public/haskell-language-server/src/Ide/Cradle.hs
Consulting the cradle for "/home/host/Public/haskell-language-server/src/Ide/Cradle.hs"
2020-05-14 16:36:51.514444346 [ThreadId 26] - Cabal-Helper decided to use: ProjLocV2File {plCabalProjectFile = "/home/host/Public/haskell-language-server/cabal.project", plProjectDirV2 = "/home/host/Public/haskell-language-server"}
HEAD is now at 78f888f Relax upper bounds of base and ghc-prim
HEAD is now at 894b76c relax constraints on base and optics-core to support ghc-8.10.1
2020-05-14 16:36:53.519546777 [ThreadId 38] - Plugin.makeCodeLens (ideLogger)
Warning: Requested index-state2020-05-13T21:21:45Z is newer than
'hackage.haskell.org'! Falling back to older state (2020-05-12T23:00:18Z).
Resolving dependencies...
2020-05-14 16:37:09.074809012 [ThreadId 41] - Plugin.makeCodeLens (ideLogger)
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
 - assoc-1.0.1 (lib) (requires download & build)
 - cabal-plan-0.6.2.0 (lib) (first run)
 - dec-0.0.3 (lib) (requires download & build)
 - floskell-0.10.2 (lib) (first run)
 - ghcide-0.1.0 (exe:ghcide-test-preprocessor) (configuration changed)
 - implicit-hie-0.1.0.0 (lib) (configuration changed)
 - indexed-profunctors-0.1 (lib) (requires download & build)
 - shake-0.19 (lib) (configuration changed)
 - shake-0.19 (exe:shake) (first run)
 - shake-0.19 (test:shake-test) (first run)
 - tasty-1.3 (lib) (requires download & build)
 - topograph-1.0.0.1 (lib) (requires download & build)
 - these-1.0.1 (lib) (requires download & build)
 - cabal-helper-1.1.0.0 (lib) (requires build)
 - singleton-bool-0.1.5 (lib) (requires download & build)
 - floskell-0.10.2 (test:floskell-test) (first run)
 - floskell-0.10.2 (exe:floskell) (first run)
 - implicit-hie-0.1.0.0 (test:implicit-hie-test) (first run)
 - implicit-hie-0.1.0.0 (exe:gen-hie) (first run)
 - hie-bios-0.5.0 (lib) (configuration changed)
 - optics-core-0.3 (lib) (requires download & build)
 - ghcide-0.1.0 (lib) (configuration changed)
 - tasty-rerun-1.1.17 (lib) (requires build)
 - tasty-quickcheck-0.10.1.1 (lib) (requires build)
 - tasty-hunit-0.10.0.2 (lib) (requires build)
 - tasty-expected-failure-0.11.1.2 (lib) (requires build)
 - semialign-1.1 (lib) (requires download & build)
 - hie-bios-0.5.0 (exe:hie-bios) (first run)
 - haskell-language-server-0.1.0.0 (lib) (configuration changed)
 - ghcide-0.1.0 (exe:ghcide) (first run)
 - hie-bios-0.5.0 (test:parser-tests) (first run)
 - hie-bios-0.5.0 (test:bios-tests) (first run)
 - cabal-plan-0.6.2.0 (exe:cabal-plan) (first run)
 - haskell-language-server-0.1.0.0 (lib:hls-test-utils) (configuration changed)
 - haskell-language-server-0.1.0.0 (exe:haskell-language-server-wrapper) (configuration changed)
 - haskell-language-server-0.1.0.0 (exe:haskell-language-server) (configuration changed)
 - ghcide-0.1.0 (test:ghcide-tests) (first run)
 - haskell-language-server-0.1.0.0 (test:func-test) (configuration changed)
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-plan-0.6.2.0 (lib) (first run)
 - floskell-0.10.2 (lib) (first run)
 - implicit-hie-0.1.0.0 (lib) (configuration changed)
 - shake-0.19 (lib) (configuration changed)
 - cabal-helper-1.1.0.0 (lib) (requires build)
 - hie-bios-0.5.0 (lib) (configuration changed)
 - ghcide-0.1.0 (lib) (configuration changed)
 - haskell-language-server-0.1.0.0 (lib) (configuration changed)
 - haskell-language-server-0.1.0.0 (lib:hls-test-utils) (configuration changed)
Configuring library for cabal-plan-0.6.2.0..
Configuring library for implicit-hie-0.1.0.0..
Configuring library for shake-0.19..
Configuring library for floskell-0.10.2..
Preprocessing library for floskell-0.10.2..
Building library for floskell-0.10.2..
Preprocessing library for implicit-hie-0.1.0.0..
Building library for implicit-hie-0.1.0.0..
Preprocessing library for shake-0.19..
Preprocessing library for cabal-plan-0.6.2.0..
Building library for cabal-plan-0.6.2.0..
Building library for shake-0.19..
[ 1 of 12] Compiling Floskell.Attoparsec ( src/Floskell/Attoparsec.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Attoparsec.o )
[1 of 1] Compiling Cabal.Plan       ( src/Cabal/Plan.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-plan-0.6.2.0/build/Cabal/Plan.o )
[ 2 of 12] Compiling Floskell.Buffer  ( src/Floskell/Buffer.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Buffer.o )
[ 3 of 12] Compiling Floskell.Config  ( src/Floskell/Config.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Config.o )
Preprocessing library for implicit-hie-0.1.0.0..
Running Haddock on library for implicit-hie-0.1.0.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: aeson-1.4.7.1, attoparsec-0.13.2.4,
base-compat-0.11.1, base-compat-batteries-0.11.1, base-orphans-0.8.2,
clock-0.7.2, conduit-1.3.2, dlist-0.8.0.8, exceptions-0.10.4, extra-1.7.1,
filepattern-0.1.2, hashable-1.3.0.0, integer-logarithms-1.0.3, libyaml-0.1.2,
mono-traversable-1.0.15.1, primitive-0.7.0.1, random-1.1, resourcet-1.2.4,
scientific-0.3.6.2, semigroups-0.18.5, split-0.2.3.4, tagged-0.8.6,
th-abstraction-0.3.2.0, time-compat-1.9.3, unliftio-core-0.2.0.1,
unordered-containers-0.2.10.0, uuid-types-1.0.3, vector-0.12.1.2,
vector-algorithms-0.8.0.3, yaml-0.11.4.0
Preprocessing library for shake-0.19..
Running Haddock on library for shake-0.19..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: clock-0.7.2, extra-1.7.1,
filepattern-0.1.2, hashable-1.3.0.0, heaps-0.3.6.1, js-dgtable-0.5.2,
js-flot-0.8.3, js-jquery-3.3.1, primitive-0.7.0.1, random-1.1,
semigroups-0.18.5, unordered-containers-0.2.10.0, utf8-string-1.0.1.1
Haddock coverage:
   3% (  1 / 33) in 'Hie.Cabal.Parser'
  Missing documentation for:
    Module header
    Name (src/Hie/Cabal/Parser.hs:13)
    Path (src/Hie/Cabal/Parser.hs:15)
    Indent (src/Hie/Cabal/Parser.hs:17)
    Package (src/Hie/Cabal/Parser.hs:19)
    CompType (src/Hie/Cabal/Parser.hs:22)
    Component (src/Hie/Cabal/Parser.hs:25)
    parsePackage' (src/Hie/Cabal/Parser.hs:29)
    parsePackage (src/Hie/Cabal/Parser.hs:32)
    componentHeader (src/Hie/Cabal/Parser.hs:47)
    parseComponent (src/Hie/Cabal/Parser.hs:56)
    parseLib (src/Hie/Cabal/Parser.hs:63)
    parseTestSuite (src/Hie/Cabal/Parser.hs:66)
    parseExe (src/Hie/Cabal/Parser.hs:69)
    parseBench (src/Hie/Cabal/Parser.hs:72)
    parseSecMain (src/Hie/Cabal/Parser.hs:75)
    parseQuoted (src/Hie/Cabal/Parser.hs:81)
    parseString (src/Hie/Cabal/Parser.hs:88)
    unqualName (src/Hie/Cabal/Parser.hs:91)
    parseList (src/Hie/Cabal/Parser.hs:94)
    pathMain (src/Hie/Cabal/Parser.hs:108)
    parseSec (src/Hie/Cabal/Parser.hs:115)
    skipToNextLine (src/Hie/Cabal/Parser.hs:122)
    skipBlock (src/Hie/Cabal/Parser.hs:125)
    comment (src/Hie/Cabal/Parser.hs:128)
    skipBlockLine (src/Hie/Cabal/Parser.hs:131)
    emptyOrComLine (src/Hie/Cabal/Parser.hs:134)
    tabOrSpace (src/Hie/Cabal/Parser.hs:137)
    hsSourceDir (src/Hie/Cabal/Parser.hs:140)
    field (src/Hie/Cabal/Parser.hs:144)
    extractPath (src/Hie/Cabal/Parser.hs:160)
    extractPkgs (src/Hie/Cabal/Parser.hs:173)
   0% (  0 /  6) in 'Hie.Yaml'
  Missing documentation for:
    Module header
    hieYaml (src/Hie/Yaml.hs:15)
    fmtComponent (src/Hie/Yaml.hs:45)
    fmtPkgs (src/Hie/Yaml.hs:56)
    cabalComponent (src/Hie/Yaml.hs:31)
    stackComponent (src/Hie/Yaml.hs:38)
   0% (  0 /  4) in 'Hie.Locate'
  Missing documentation for:
    Module header
    nestedPkg (src/Hie/Locate.hs:68)
    stackYamlPkgs (src/Hie/Locate.hs:37)
    cabalPkgs (src/Hie/Locate.hs:46)
Warning: Hie.Cabal.Parser: could not find link destinations for:
    Parser
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/implicit-hie-0.1.0.0/doc/html/implicit-hie/index.html
Configuring library for hie-bios-0.5.0..
Preprocessing library for hie-bios-0.5.0..
Building library for hie-bios-0.5.0..
Preprocessing library for hie-bios-0.5.0..
Running Haddock on library for hie-bios-0.5.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: aeson-1.4.7.1, async-2.2.2,
attoparsec-0.13.2.4, base-compat-0.11.1, base-compat-batteries-0.11.1,
base-orphans-0.8.2, base16-bytestring-0.1.1.6, clock-0.7.2, conduit-1.3.2,
conduit-extra-1.3.5, cryptohash-sha1-0.11.100.1, dlist-0.8.0.8,
exceptions-0.10.4, extra-1.7.1, file-embed-0.0.12.0, filepattern-0.1.2,
hashable-1.3.0.0, hslogger-1.3.1.0, integer-logarithms-1.0.3, libyaml-0.1.2,
mono-traversable-1.0.15.1, network-3.1.1.1, network-bsd-2.8.1.0,
old-locale-1.0.0.7, primitive-0.7.0.1, random-1.1, resourcet-1.2.4,
scientific-0.3.6.2, semigroups-0.18.5, split-0.2.3.4,
streaming-commons-0.2.1.2, tagged-0.8.6, temporary-1.2.1.1,
th-abstraction-0.3.2.0, time-compat-1.9.3, typed-process-0.2.6.0,
unix-compat-0.5.2, unliftio-core-0.2.0.1, unordered-containers-0.2.10.0,
uuid-types-1.0.3, vector-0.12.1.2, vector-algorithms-0.8.0.3, yaml-0.11.4.0,
zlib-0.6.2.1
Haddock coverage:
Warning: 'ShakeValue' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: Couldn't find .haddock for export Hashable
  86% (  6 /  7) in 'Development.Shake.Classes'
  Missing documentation for:
    Hashable
 100% ( 62 / 62) in 'Development.Shake.FilePath'
Warning: 'command' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'cmd' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'ByteString' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'traced' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'interruptProcessGroupOf' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'terminateProcess' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Stdout' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Stderr' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'shakeLintInside' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: Couldn't find .haddock for export Partial
Warning: 'normaliseEx' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'needed' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'progressDisplay' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'getShakeOptions' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'stdout' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'stderr' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'progressSimple' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addShakeExtra' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'getShakeExtra' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Fence' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'writeChunks' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addPoolException' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addPoolResume' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addPoolStart' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addPoolBatch' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Fence' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'addUserRule' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'action' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Rules' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'priority' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'alternatives' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'versioned' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'lintTrackRead' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'lintTrackWrite' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'writeFile'' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'need' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'produces' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'orderOnly' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'withResource' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'cmd' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'command' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: '-<.>' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: '%>' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'need' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'produces' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'need' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'ByteString' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
 100% ( 38 / 38) in 'Development.Shake.Rule'
Warning: 'newCache' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'getDirectoryFiles' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'getEnv' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'cmd_' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'neededMakefileDependencies' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'needMakefileDependencies' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'shakeArgs' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'dropExtension' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'ByteString' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: Couldn't find .haddock for export unit
  96% ( 23 / 24) in 'Development.Shake.Command'
  Missing documentation for:
    unit
Warning: 'lookupEnv' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'cmd' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'phony' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'shakeFiles' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
 100% ( 10 / 10) in 'Development.Shake.Database'
Warning: 'cmd' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Binary' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Hashable' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'NFData' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: Couldn't find .haddock for export unit
  99% (178 /179) in 'Development.Shake'
  Missing documentation for:
    unit
 100% (  7 /  7) in 'Development.Shake.Util'
 100% (  8 /  8) in 'Development.Shake.Forward'
Warning: '-<.>' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
 100% (  7 /  7) in 'Development.Shake.Config'
Warning: Development.Shake.Classes: could not find link destinations for:
    Color Timeout StdGen Clock TimeSpec StepNext Path Pattern Flot Pat Hashed Array RB Array HashSet Heap Forest Tree HashMap Entry typeRep# Leaf MutableArray Hashable1
Warning: Development.Shake.Rule: could not find link destinations for:
    Partial
Warning: Development.Shake.Command: could not find link destinations
 for:
    Partial Unit cmdResult Result cmdString Str
Warning: Development.Shake: could not find link destinations for:
    Partial Seconds HashMap Hidden Unit cmdResult Result cmdString Str Located
Warning: Development.Shake.Config: could not find link destinations for:
    HashMap
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/shake-0.19/doc/html/shake/index.html
Configuring library for ghcide-0.1.0..

src/HIE/Bios/Environment.hs:5:1: warning: [-
Wunused-imports]

    The 
import of ‘DynFlags, GhcLink, HscTarget’
    from module ‘GHC’ is redundant
  |
5 | import GHC (DynFlag
s(..), GhcLink(..), HscTarget(..), GhcMonad)
  
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^

src/HIE/Bios/Ghc/Logger.hs:13:1: warning: [-Wunused-imports]
    The import of ‘SevError, S
everity’ from module ‘GHC’ is redundant
   |
13 | import GHC (DynFlags(..),
 SrcSpan(..), Severity(SevError), GhcMonad)
   | ^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/HIE/Bios/Cradle.hs:53:1: warning: [-
Wunused-imports]
    The 
qualified import of ‘Data.Text.IO’ is redundant
   
   except perhaps to import instances from ‘Data.Text.IO’
  
  To import instances alone, use: import Data.Text.IO()

   |
53 | import qu
alified Data.Text.IO 
as T
   | ^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^

src
/HIE/Bios/Cradle.hs:701:25: warning:
 [-Wname-shadowing]

    This binding for ‘env’ shadows the existing binding

      imported from ‘Data.Co
nduit.Process’ at src/H
IE/Bios/Cradle.hs:48:1
-27
      
(and originally defined in ‘process-1.6.8.0:S
ystem.Process.Common’
)
    |
701 |       withHie
BiosOutput env action
 = do
 
   |                         ^^^
Preprocessing library for cabal-plan-0.6.2.0..
Running Haddock on library for cabal-plan-0.6.2.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: aeson-1.4.7.1, attoparsec-0.13.2.4,
base-compat-0.11.1, base-compat-batteries-0.11.1, base-orphans-0.8.2,
base16-bytestring-0.1.1.6, dlist-0.8.0.8, hashable-1.3.0.0,
integer-logarithms-1.0.3, primitive-0.7.0.1, random-1.1, scientific-0.3.6.2,
tagged-0.8.6, th-abstraction-0.3.2.0, time-compat-1.9.3,
unordered-containers-0.2.10.0, uuid-types-1.0.3, vector-0.12.1.2
Haddock coverage:
Warning: 'Cradle' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'a' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  60% (  3 /  5) in 'HIE.Bios.Config'
  Missing documentation for:
    CradleConfig (src/HIE/Bios/Config.hs:30)
    CradleType (src/HIE/Bios/Config.hs:42)
  11% (  2 / 19) in 'HIE.Bios.Ghc.Gap'
  Missing documentation for:
    WarnFlags (src/HIE/Bios/Ghc/Gap.hs:82)
    emptyWarnFlags (src/HIE/Bios/Ghc/Gap.hs:83)
    makeUserStyle (src/HIE/Bios/Ghc/Gap.hs:69)
    getModuleName (src/HIE/Bios/Ghc/Gap.hs:75)
    getTyThing (src/HIE/Bios/Ghc/Gap.hs:91)
    fixInfo (src/HIE/Bios/Ghc/Gap.hs:94)
    getModSummaries (src/HIE/Bios/Ghc/Gap.hs:88)
    mapOverIncludePaths (src/HIE/Bios/Ghc/Gap.hs:100)
    LExpression (src/HIE/Bios/Ghc/Gap.hs:115)
    LBinding (src/HIE/Bios/Ghc/Gap.hs:116)
    LPattern (src/HIE/Bios/Ghc/Gap.hs:117)
    inTypes (src/HIE/Bios/Ghc/Gap.hs:119)
    outType (src/HIE/Bios/Ghc/Gap.hs:121)
    mgModSummaries
    numLoadedPlugins (src/HIE/Bios/Ghc/Gap.hs:134)
    initializePlugins (src/HIE/Bios/Ghc/Gap.hs:142)
    unsetLogAction (src/HIE/Bios/Ghc/Gap.hs:150)
  17% (  1 /  6) in 'HIE.Bios.Ghc.Doc'
  Missing documentation for:
    showPage (src/HIE/Bios/Ghc/Doc.hs:10)
    showOneLine (src/HIE/Bios/Ghc/Doc.hs:13)
    getStyle (src/HIE/Bios/Ghc/Doc.hs:16)
    styleUnqualified (src/HIE/Bios/Ghc/Doc.hs:19)
    showDocWith (src/HIE/Bios/Ghc/Doc.hs:22)
   0% (  0 /  5) in 'HIE.Bios.Internal.Log'
  Missing documentation for:
    Module header
    logm (src/HIE/Bios/Internal/Log.hs:6)
    debugm (src/HIE/Bios/Internal/Log.hs:9)
    warningm (src/HIE/Bios/Internal/Log.hs:12)
    errorm (src/HIE/Bios/Internal/Log.hs:15)
 100% (  5 /  5) in 'HIE.Bios.Ghc.Load'
  27% (  3 / 11) in 'HIE.Bios.Types'
  Missing documentation for:
    Module header
    BIOSVerbosity (src/HIE/Bios/Types.hs:12)
    CradleOpts (src/HIE/Bios/Types.hs:14)
    defaultCradleOpts (src/HIE/Bios/Types.hs:20)
    LoggingFunction (src/HIE/Bios/Types.hs:42)
    ActionName (src/HIE/Bios/Types.hs:44)
    CradleAction (src/HIE/Bios/Types.hs:55)
    CradleError (src/HIE/Bios/Types.hs:76)
Warning: 'DynFlags' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  25% (  1 /  4) in 'HIE.Bios.Flags'
  Missing documentation for:
    Module header
    getCompilerOptionsWithLogger (src/HIE/Bios/Flags.hs:16)
    LoggingFunction (src/HIE/Bios/Types.hs:42)
  83% (  5 /  6) in 'HIE.Bios.Environment'
  Missing documentation for:
    Module header
  70% (  7 / 10) in 'HIE.Bios.Ghc.Api'
  Missing documentation for:
    SuccessFlag
    withGhcT (src/HIE/Bios/Ghc/Api.hs:54)
    withDynFlags (src/HIE/Bios/Ghc/Api.hs:97)
  50% (  1 /  2) in 'HIE.Bios.Ghc.Logger'
  Missing documentation for:
    Module header
  67% (  2 /  3) in 'HIE.Bios.Ghc.Check'
  Missing documentation for:
    Module header
   0% (  0 /  3) in 'HIE.Bios.Wrappers'
  Missing documentation for:
    Module header
    cabalWrapper (src/HIE/Bios/Wrappers.hs:7)
    cabalWrapperHs (src/HIE/Bios/Wrappers.hs:10)
  29% (  4 / 14) in 'HIE.Bios.Cradle'
  Missing documentation for:
    Module header
    loadCustomCradle (src/HIE/Bios/Cradle.hs:71)
    isCabalCradle (src/HIE/Bios/Cradle.hs:172)
    isStackCradle (src/HIE/Bios/Cradle.hs:177)
    isDirectCradle (src/HIE/Bios/Cradle.hs:182)
    isBiosCradle (src/HIE/Bios/Cradle.hs:187)
    isNoneCradle (src/HIE/Bios/Cradle.hs:197)
    isMultiCradle (src/HIE/Bios/Cradle.hs:192)
    isDefaultCradle (src/HIE/Bios/Cradle.hs:202)
    isOtherCradle (src/HIE/Bios/Cradle.hs:207)
  40% (  2 /  5) in 'HIE.Bios.Internal.Debug'
  Missing documentation for:
    Module header
    configInfo (src/HIE/Bios/Internal/Debug.hs:70)
    cradleInfo (src/HIE/Bios/Internal/Debug.hs:84)
  94% ( 15 / 16) in 'HIE.Bios'
  Missing documentation for:
    CradleError (src/HIE/Bios/Types.hs:76)
Warning: HIE.Bios.Config: could not find link destinations for:
    FromJSON parseJSON Value Parser parseJSONList
Warning: HIE.Bios.Cradle: could not find link destinations for:
    FromJSON
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/hie-bios-0.5.0/doc/html/hie-bios/index.html
Preprocessing library for ghcide-0.1.0..
Building library for ghcide-0.1.0..
Haddock coverage:
 100% ( 37 / 37) in 'Cabal.Plan'
Warning: Cabal.Plan: could not find link destinations for:
    FromJSON parseJSON Value Parser parseJSONList FromJSONKey fromJSONKey FromJSONKeyFunction fromJSONKeyList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList ToJSONKey toJSONKey ToJSONKeyFunction toJSONKeyList
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-plan-0.6.2.0/doc/html/cabal-plan/index.html
Configuring library for cabal-helper-1.1.0.0..
Preprocessing library for cabal-helper-1.1.0.0..
Building library for cabal-helper-1.1.0.0..
Preprocessing library for ghcide-0.1.0..
Running Haddock on library for ghcide-0.1.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: StateVar-1.2, adjunctions-4.4,
aeson-1.4.7.1, ansi-terminal-0.10.3, async-2.2.2, attoparsec-0.13.2.4,
base-compat-0.11.1, base-compat-batteries-0.11.1, base-orphans-0.8.2,
bifunctors-5.5.7, call-stack-0.2.0, clock-0.7.2, colour-2.3.5, comonad-5.0.6,
contravariant-1.5.2, data-default-0.7.1.1, data-default-class-0.1.2.0,
data-default-instances-containers-0.0.1, data-default-instances-dlist-0.0.1,
data-default-instances-old-locale-0.0.1, distributive-0.6.2, dlist-0.8.0.8,
exceptions-0.10.4, extra-1.7.1, filepattern-0.1.2, free-5.1.3, fuzzy-0.1.0.0,
haddock-library-1.9.0, hashable-1.3.0.0, haskell-lsp-0.22.0.0,
haskell-lsp-types-0.22.0.0, heaps-0.3.6.1, hslogger-1.3.1.0,
integer-logarithms-1.0.3, invariant-0.5.3, js-dgtable-0.5.2, js-flot-0.8.3,
js-jquery-3.3.1, kan-extensions-5.2, lens-4.19.2, monoid-subclasses-1.0.1,
network-3.1.1.1, network-bsd-2.8.1.0, network-uri-2.6.3.0, old-locale-1.0.0.7,
opentelemetry-0.4.0, parallel-3.2.2.0, prettyprinter-1.6.1,
prettyprinter-ansi-terminal-1.1.1.2, primes-0.2.1.0, primitive-0.7.0.1,
profunctors-5.5.2, psqueues-0.2.7.2, random-1.1, reflection-2.1.5,
regex-base-0.94.0.0, regex-tdfa-1.3.1.0, rope-utf16-splay-0.3.1.0,
safe-exceptions-0.1.7.0, scientific-0.3.6.2, semigroupoids-5.3.4,
semigroups-0.18.5, sorted-list-0.2.1.0, syb-0.7.1, tagged-0.8.6,
temporary-1.2.1.1, th-abstraction-0.3.2.0, time-compat-1.9.3,
transformers-base-0.4.5.2, transformers-compat-0.6.5,
unordered-containers-0.2.10.0, utf8-string-1.0.1.1, uuid-types-1.0.3,
vector-0.12.1.2, void-0.7.3
[ 1 of 24] Compiling CabalHelper.Compiletime.Compat.Environment ( src/CabalHelper/Compiletime/Compat/Environment.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Compat/Environment.o )
[ 2 of 24] Compiling CabalHelper.Compiletime.Compat.Parsec ( src/CabalHelper/Compiletime/Compat/Parsec.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Compat/Parsec.o )
[ 3 of 24] Compiling CabalHelper.Compiletime.Compat.Version ( src/CabalHelper/Compiletime/Compat/Version.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Compat/Version.o )
[ 4 of 24] Compiling CabalHelper.Compiletime.Data ( src/CabalHelper/Compiletime/Data.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Data.o )
[ 5 of 24] Compiling CabalHelper.Compiletime.Types.Cabal ( src/CabalHelper/Compiletime/Types/Cabal.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Types/Cabal.o )
[ 6 of 24] Compiling CabalHelper.Compiletime.Types.RelativePath ( src/CabalHelper/Compiletime/Types/RelativePath.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Types/RelativePath.o )
[ 7 of 24] Compiling CabalHelper.Shared.Common ( src/CabalHelper/Shared/Common.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Shared/Common.o )
[ 8 of 24] Compiling CabalHelper.Shared.InterfaceTypes ( src/CabalHelper/Shared/InterfaceTypes.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Shared/InterfaceTypes.o )

src/Development/IDE/GHC/
Compat.hs:74:1: warning: [-Wunused-im
ports]
    The import of ‘Dev
elopment.IDE.GHC
.HieBin’ is redundant
      except perhaps to import instances from ‘Development.IDE.GHC.HieBin’
    To import instances alone, use: import Development.IDE
.GHC.HieBin()
   |
74 | import Development.IDE.GHC.HieBin (readHieFi
le,writeHieFile,NameCacheUpdat
er(..),HieFileResult(..
))
   | ^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
^^^^^^^^^^^

src/Develo
pment/IDE/GHC/Compat.hs:84:1: warning: [-Wunused-imports]
    The import of ‘HscTypes’ is redundant
      except perhaps to import instances from ‘HscTypes’
    To import instances alone, use: import HscTypes()
   |
84 | import HscTypes (srcErrorMessages)
   | ^^^^^^^^^^^^^^^^^^^^
^^
^^^^^^^^^^^^

src/Development/IDE/GHC/Compat
.hs:86:1: warning: [-Wunused-i
mports]
    The import of ‘Dev
elopment.IDE.GHC.HieAst
’ is redundant
      except perhaps to import instances from ‘Devel
opment.IDE.GHC.HieA
st’
    To import instances alone, use: import Develo
pment.IDE.GHC.HieAst
()
   |
86 | impor
t Development.IDE.G
HC.HieAst (mkHieFile
)
   | ^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^

src/
Development/IDE/GHC/Compat.h
s:90:1: warning: [-Wunused
-imports]
    The import of
 ‘IfaceEnv’ is redundant
     
 except perhaps to import instances from ‘IfaceEnv’
    
To import instances alone, use: import IfaceEnv()
 
  |
90 | import Ifac
eEnv
   | ^^^^^^^^^^
^^^^^

src/
Development/IDE/GHC/Compat.
hs:93:1: warning: [-Wunuse
d-imports]
    The 
import of ‘HieUtils’ is redundant
  
    except perhaps to import instances from ‘HieUtil
s’
    
To import instances alone, use: import HieUtils()
   |
93 | import HieUtils
   |
 ^^^^^^^^^^^^^^^
[ 9 of 24] Compiling CabalHelper.Runtime.Compat ( src/CabalHelper/Runtime/Compat.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Runtime/Compat.o )
[10 of 24] Compiling CabalHelper.Runtime.HelperMain ( src/CabalHelper/Runtime/HelperMain.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Runtime/HelperMain.o )
[11 of 24] Compiling CabalHelper.Compiletime.Types ( src/CabalHelper/Compiletime/Types.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Types.o )
Haddock coverage:
   0% (  0 /  2) in 'Development.IDE.Compat'
  Missing documentation for:
    Module header
    getProcessID (src/Development/IDE/Compat.hs:16)
  60% (  3 /  5) in 'Development.IDE.Core.Debouncer'
  Missing documentation for:
    Module header
    registerEvent (src/Development/IDE/Core/Debouncer.hs:29)
  15% (  2 / 13) in 'Development.IDE.Core.PositionMapping'
  Missing documentation for:
    Module header
    PositionMapping (src/Development/IDE/Core/PositionMapping.hs:38)
    fromCurrentPosition (src/Development/IDE/Core/PositionMapping.hs:30)
    toCurrentPosition (src/Development/IDE/Core/PositionMapping.hs:33)
    PositionDelta (src/Development/IDE/Core/PositionMapping.hs:25)
    toCurrentRange (src/Development/IDE/Core/PositionMapping.hs:41)
    fromCurrentRange (src/Development/IDE/Core/PositionMapping.hs:45)
    applyChange (src/Development/IDE/Core/PositionMapping.hs:72)
    zeroMapping (src/Development/IDE/Core/PositionMapping.hs:49)
    toCurrent (src/Development/IDE/Core/PositionMapping.hs:79)
    fromCurrent (src/Development/IDE/Core/PositionMapping.hs:101)
Warning: 'CoreExpr' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
   0% (  0 / 10) in 'Development.IDE.Spans.Common'
  Missing documentation for:
    Module header
    showGhc (src/Development/IDE/Spans/Common.hs:36)
    safeTyThingId (src/Development/IDE/Spans/Common.hs:48)
    safeTyThingType (src/Development/IDE/Spans/Common.hs:41)
    SpanDoc (src/Development/IDE/Spans/Common.hs:54)
    emptySpanDoc (src/Development/IDE/Spans/Common.hs:59)
    spanDocToMarkdown (src/Development/IDE/Spans/Common.hs:62)
    spanDocToMarkdownForTest (src/Development/IDE/Spans/Common.hs:73)
    DocMap (src/Development/IDE/Spans/Common.hs:34)
    trimExcessLineBreaks (src/Development/IDE/Spans/Common.hs:77)
Warning: Couldn't find .haddock for export Location
Warning: Couldn't find .haddock for export Position
Warning: Couldn't find .haddock for export Range
Warning: Couldn't find .haddock for export Uri
Warning: Couldn't find .haddock for export NormalizedUri
Warning: Couldn't find .haddock for export toNormalizedUri
Warning: Couldn't find .haddock for export fromNormalizedUri
Warning: Couldn't find .haddock for export NormalizedFilePath
Warning: Couldn't find .haddock for export fromNormalizedFilePath
  15% (  3 / 20) in 'Development.IDE.Types.Location'
  Missing documentation for:
    Location
    noFilePath (src/Development/IDE/Types/Location.hs:67)
    noRange (src/Development/IDE/Types/Location.hs:71)
    Position
    showPosition (src/Development/IDE/Types/Location.hs:74)
    Range
    Uri
    NormalizedUri
    toNormalizedUri
    fromNormalizedUri
    NormalizedFilePath
    fromUri (src/Development/IDE/Types/Location.hs:64)
    emptyFilePath (src/Development/IDE/Types/Location.hs:44)
    emptyPathUri (src/Development/IDE/Types/Location.hs:56)
    toNormalizedFilePath' (src/Development/IDE/Types/Location.hs:39)
    fromNormalizedFilePath
    filePathToUri' (src/Development/IDE/Types/Location.hs:61)
Warning: 'Document' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: Couldn't find .haddock for export Diagnostic
Warning: Couldn't find .haddock for export DiagnosticSeverity
Warning: Couldn't find .haddock for export DiagnosticStore
Warning: Couldn't find .haddock for export List
  17% (  2 / 12) in 'Development.IDE.Types.Diagnostics'
  Missing documentation for:
    Module header
    Diagnostic
    IdeResult (src/Development/IDE/Types/Diagnostics.hs:37)
    DiagnosticSeverity
    DiagnosticStore
    List
    ideErrorText (src/Development/IDE/Types/Diagnostics.hs:39)
    ideErrorWithSource (src/Development/IDE/Types/Diagnostics.hs:42)
    showDiagnostics (src/Development/IDE/Types/Diagnostics.hs:88)
    showDiagnosticsColored (src/Development/IDE/Types/Diagnostics.hs:91)
  50% (  1 /  2) in 'Development.IDE.LSP.Protocol'
  Missing documentation for:
    Module header
Warning: 'HsEnvEq' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'hDuplicateTo' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  78% ( 21 / 27) in 'Development.IDE.GHC.Util'
  Missing documentation for:
    deps (src/Development/IDE/GHC/Util.hs:193)
    ParseResult
    runParser (src/Development/IDE/GHC/Util.hs:105)
    stringBufferToByteString (src/Development/IDE/GHC/Util.hs:113)
    setDefaultHieDir (src/Development/IDE/GHC/Compat.hs:208)
    dontWriteHieFiles (src/Development/IDE/GHC/Compat.hs:216)
  59% ( 13 / 22) in 'Development.IDE.GHC.Error'
  Missing documentation for:
    Module header
    diagFromErrMsgs (src/Development/IDE/GHC/Error.hs:66)
    diagFromGhcException (src/Development/IDE/GHC/Error.hs:174)
    srcSpanToLocation (src/Development/IDE/GHC/Error.hs:109)
    srcSpanToLocationMaybe (src/Development/IDE/GHC/Error.hs:114)
    srcSpanToRangeMaybe (src/Development/IDE/GHC/Error.hs:94)
    realSrcSpanToRange (src/Development/IDE/GHC/Error.hs:98)
    realSpan (src/Development/IDE/GHC/Error.hs:154)
    isInsideSrcSpan (src/Development/IDE/GHC/Error.hs:118)
  23% (  5 / 22) in 'Development.IDE.Import.DependencyInformation'
  Missing documentation for:
    Module header
    DependencyInformation (src/Development/IDE/Import/DependencyInformation.hs:138)
    TransitiveDependencies (src/Development/IDE/Import/DependencyInformation.hs:366)
    NamedModuleDep (src/Development/IDE/Import/DependencyInformation.hs:379)
    PathIdMap (src/Development/IDE/Import/DependencyInformation.hs:80)
    emptyPathIdMap (src/Development/IDE/Import/DependencyInformation.hs:88)
    getPathId (src/Development/IDE/Import/DependencyInformation.hs:91)
    lookupPathToId (src/Development/IDE/Import/DependencyInformation.hs:109)
    insertImport (src/Development/IDE/Import/DependencyInformation.hs:103)
    pathToId (src/Development/IDE/Import/DependencyInformation.hs:106)
    idToPath (src/Development/IDE/Import/DependencyInformation.hs:112)
    reachableModules (src/Development/IDE/Import/DependencyInformation.hs:162)
    processDependencyInformation (src/Development/IDE/Import/DependencyInformation.hs:224)
    transitiveDeps (src/Development/IDE/Import/DependencyInformation.hs:332)
    reverseDependencies (src/Development/IDE/Import/DependencyInformation.hs:320)
    BootIdMap (src/Development/IDE/Import/DependencyInformation.hs:118)
    insertBootId (src/Development/IDE/Import/DependencyInformation.hs:120)
   9% (  2 / 23) in 'Development.IDE.Core.RuleTypes'
  Missing documentation for:
    GetModSummary (src/Development/IDE/Core/RuleTypes.hs:232)
    IsFileOfInterest (src/Development/IDE/Core/RuleTypes.hs:226)
    GetModIface (src/Development/IDE/Core/RuleTypes.hs:220)
    GetHiFile (src/Development/IDE/Core/RuleTypes.hs:214)
    GhcSession (src/Development/IDE/Core/RuleTypes.hs:208)
    GenerateByteCode (src/Development/IDE/Core/RuleTypes.hs:202)
    GenerateCore (src/Development/IDE/Core/RuleTypes.hs:196)
    GetDocMap (src/Development/IDE/Core/RuleTypes.hs:189)
    GetRefMap (src/Development/IDE/Core/RuleTypes.hs:183)
    GetHieFile (src/Development/IDE/Core/RuleTypes.hs:177)
    TypeCheck (src/Development/IDE/Core/RuleTypes.hs:171)
    GetDependencies (src/Development/IDE/Core/RuleTypes.hs:165)
    ReportImportCycles (src/Development/IDE/Core/RuleTypes.hs:159)
    GetModuleGraph (src/Development/IDE/Core/RuleTypes.hs:153)
    GetDependencyInformation (src/Development/IDE/Core/RuleTypes.hs:147)
    GetLocatedImports (src/Development/IDE/Core/RuleTypes.hs:141)
    GetParsedModule (src/Development/IDE/Core/RuleTypes.hs:135)
    PDocMap (src/Development/IDE/Core/RuleTypes.hs:97)
    PRefMap (src/Development/IDE/Core/RuleTypes.hs:88)
    HiFileResult (src/Development/IDE/Core/RuleTypes.hs:69)
    tmrModSummary (src/Development/IDE/Core/RuleTypes.hs:66)
Warning: 'phase' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  22% (  2 /  9) in 'Development.IDE.Types.Logger'
  Missing documentation for:
    Priority (src/Development/IDE/Types/Logger.hs:18)
    logError (src/Development/IDE/Types/Logger.hs:37)
    log

src/Development/IDE/Core/Compile.hs:64:1: 
warning: [-Wunused-imports]
    The import of ‘NameCache’ is redundant
  
    except perhaps to import instances from ‘NameCache’
    To import instances alone, use: import NameCac
he()
   |
64 | import  
         NameCache
  
 | ^^^^^^^^^^^^^^^^^
^^^^^^^^^

src/Development/IDE/Core/Rules.hs:3
5:1: warning: [-Wunused-imports]

    The import of ‘Data.Bifunc
tor’ is redundant
      except perhaps to import instances from ‘Data.Bi
functor’
    To import instances alone, use: import Data.Bifunctor()
   |
35
 | import Data.Bifunctor (second)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Development/IDE/Core/Rules.hs:37:
1: warning: [-Wunused-impor
ts]
    The import of ‘C
ontrol.Applicative’
 is redundant
      except perhaps to import instances from ‘Contr
ol.Applicative’
    To import instances alone, use: import Control.
Applicative()
  
 |
37 | import 
Control.Applicati
ve
   | ^^^^^^
^^^^^^^^^^^^^^^^^
^^^

sr
c/Development/IDE/Core/
Rules.hs:54:1: warning:
 [-Wunused-imports
]
    The qualified import of
 ‘Development.IDE
.Types.Logger’ is redundant

      except perhaps to import instances from ‘Devel
opment.IDE.Ty
pes.Logger’
    To import instances alone, use:
 import Development.I
DE.Types.Logger()

   |
54 | impor
t qualified Develop
ment.IDE.Types.Log
ger as L
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning (src/Development/IDE/Types/Logger.hs:40)
    logInfo (src/Development/IDE/Types/Logger.hs:43)
    logDebug (src/Development/IDE/Types/Logger.hs:46)
    logTelemetry (src/Development/IDE/Types/Logger.hs:49)
    noLogging (src/Development/IDE/Types/Logger.hs:53)
Warning: 'ComponentOptions' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  22% (  2 /  9) in 'Development.IDE.Types.Options'
  Missing documentation for:
    IdeOptions (src/Development/IDE/Types/Options.hs:26)
    IdePreprocessedSource (src/Development/IDE/Types/Options.hs:67)
    IdeReportProgress (src/Development/IDE/Types/Options.hs:76)
    IdeDefer (src/Development/IDE/Types/Options.hs:77)
    clientSupportsProgress (src/Development/IDE/Types/Options.hs:79)
    defaultIdeOptions (src/Development/IDE/Types/Options.hs:83)
    IdeResult (src/Development/IDE/Types/Diagnostics.hs:37)
Warning: 'v' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  25% ( 16 / 64) in 'Development.IDE.Core.Shake'
  Missing documentation for:
    shakeExtras (src/Development/IDE/Core/Shake.hs:255)
    ShakeExtras (src/Development/IDE/Core/Shake.hs:109)
    getShakeExtras (src/Development/IDE/Core/Shake.hs:131)
    getShakeExtrasRules (src/Development/IDE/Core/Shake.hs:136)
    IdeRule (src/Development/IDE/Core/Shake.hs:240)
    IdeResult (src/Development/IDE/Types/Diagnostics.hs:37)
    GetModificationTime (src/Development/IDE/Core/Shake.hs:1081)
    shakeShut (src/Development/IDE/Core/Shake.hs:605)
    shakeProfile (src/Development/IDE/Core/Shake.hs:602)
    use (src/Development/IDE/Core/Shake.hs:729)
    useWithStale (src/Development/IDE/Core/Shake.hs:733)
    useNoFile (src/Development/IDE/Core/Shake.hs:798)
    useWithStaleFast (src/Development/IDE/Core/Shake.hs:783)
    useWithStaleFast' (src/Development/IDE/Core/Shake.hs:757)
    FastResult (src/Development/IDE/Core/Shake.hs:755)
    use_ (src/Development/IDE/Core/Shake.hs:801)
    useNoFile_ (src/Development/IDE/Core/Shake.hs:804)
    uses_ (src/Development/IDE/Core/Shake.hs:807)
    define (src/Development/IDE/Core/Shake.hs:724)
    defineEarlyCutoff (src/Development/IDE/Core/Shake.hs:866)
    defineOnDisk (src/Development/IDE/Core/Shake.hs:946)
    needOnDisk (src/Development/IDE/Core/Shake.hs:979)
    needOnDisks (src/Development/IDE/Core/Shake.hs:984)
    getDiagnostics (src/Development/IDE/Core/Shake.hs:693)
    getHiddenDiagnostics (src/Development/IDE/Core/Shake.hs:698)
    IsIdeGlobal (src/Development/IDE/Core/Shake.hs:141)
    addIdeGlobal (src/Development/IDE/Core/Shake.hs:143)
    addIdeGlobalExtras (src/Development/IDE/Core/Shake.hs:148)
    getIdeGlobalState (src/Development/IDE/Core/Shake.hs:163)
    getIdeGlobalAction (src/Development/IDE/Core/Shake.hs:160)
    knownFiles (src/Development/IDE/Core/Shake.hs:500)
    setPriority (src/Development/IDE/Core/Shake.hs:1064)
    sendEvent (src/Development/IDE/Core/Shake.hs:1067)
    ideLogger (src/Development/IDE/Core/Shake.hs:1072)
    actionLogger (src/Development/IDE/Core/Shake.hs:1075)
    FileVersion (src/Development/IDE/Core/Shake.hs:1090)
    modificationTime (src/Development/IDE/Core/Shake.hs:1109)
    Priority (src/Development/IDE/Core/Shake.hs:1062)
    updatePositionMapping (src/Development/IDE/Core/Shake.hs:1160)
    runAction (src/Development/IDE/Core/Shake.hs:792)
    runActionSync (src/Development/IDE/Core/Shake.hs:795)
    OnDiskRule (src/Development/IDE/Core/Shake.hs:930)
    DelayedAction (src/Development/IDE/Core/Shake.hs:303)
    mkDelayedAction (src/Development/IDE/Core/Shake.hs:317)
    IdeAction (src/Development/IDE/Core/Shake.hs:737)
    runIdeAction (src/Development/IDE/Core/Shake.hs:740)
    askShake (src/Development/IDE/Core/Shake.hs:746)
    mkUpdater (src/Development/IDE/Core/Shake.hs:749)
 100% (  5 /  5) in 'Development.IDE.Core.OfInterest'
  14% (  1 /  7) in 'Development.IDE.Core.IdeConfiguration'
  Missing documentation for:
    Module header
    registerIdeConfiguration (src/Development/IDE/Core/IdeConfiguration.hs:32)
    parseConfiguration (src/Development/IDE/Core/IdeConfiguration.hs:40)
    parseWorkspaceFolder (src/Development/IDE/Core/IdeConfiguration.hs:50)
    isWorkspaceFile (src/Development/IDE/Core/IdeConfiguration.hs:61)
    modifyWorkspaceFolders (src/Development/IDE/Core/IdeConfiguration.hs:54)
  50% (  5 / 10) in 'Development.IDE.Core.FileStore'
  Missing documentation for:
    Module header
    getFileContents (src/Development/IDE/Core/FileStore.hs:164)
    fileStoreRules (src/Development/IDE/Core/FileStore.hs:167)
    makeVFSHandle (src/Development/IDE/Core/FileStore.hs:68)
    makeLSPVFSHandle (src/Development/IDE/Core/FileStore.hs:83)
  38% (  5 / 13) in 'Development.IDE.Core.Service'
  Missing documentation for:
    getIdeOptions (src/Development/IDE/Core/Service.hs:85)
    getIdeOptionsIO (src/Development/IDE/Core/Service.hs:90)
    runAction (src/Development/IDE/Core/Shake.hs:792)
    runActionSync (src/Development/IDE/Core/Shake.hs:795)
    writeProfile (src/Development/IDE/Core/Service.hs:77)
    getDiagnostics (src/Development/IDE/Core/Shake.hs:693)
    ideLogger (src/Development/IDE/Core/Shake.hs:1072)
    updatePositionMapping (src/Development/IDE/Core/Shake.hs:1160)
   0% (  0 /  3) in 'Development.IDE.LSP.Server'
  Missing documentation for:
    Module header
    WithMessage (src/Development/IDE/LSP/Server.hs:19)
    PartialHandlers (src/Development/IDE/LSP/Server.hs:38)
  36% (  9 / 25) in 'Development.IDE.Core.Rules'
  Missing documentation for:
    GetDependencies (src/Development/IDE/Core/RuleTypes.hs:165)
    GetParsedModule (src/Development/IDE/Core/RuleTypes.hs:135)
    TransitiveDependencies (src/Development/IDE/Import/DependencyInformation.hs:366)
    Priority (src/Development/IDE/Core/Shake.hs:1062)
    GhcSessionIO (src/Development/IDE/Core/Rules.hs:565)
    GhcSessionFun (src/Development/IDE/Core/Rules.hs:570)
    priorityTypeCheck (src/Development/IDE/Core/Rules.hs:230)
    priorityGenerateCore (src/Development/IDE/Core/Rules.hs:233)
    priorityFilesOfInterest (src/Development/IDE/Core/Rules.hs:236)
    runAction (src/Development/IDE/Core/Shake.hs:792)
    useNoFileE (src/Development/IDE/Core/Rules.hs:100)
    usesE (src/Development/IDE/Core/Rules.hs:103)
    defineNoFile (src/Development/IDE/Core/Rules.hs:106)
    getTypeDefinition (src/Development/IDE/Core/Rules.hs:140)
    highlightAtPoint (src/Development/IDE/Core/Rules.hs:147)
    generateCore (src/Development/IDE/Core/Rules.hs:539)
  33% (  2 /  6) in 'Development.IDE.Plugin'
  Missing documentation for:
    Module header
    Plugin (src/Development/IDE/Plugin.hs:16)
    codeActionPlugin (src/Development/IDE/Plugin.hs:31)
    codeActionPluginWithRules (src/Development/IDE/Plugin.hs:34)
  33% (  1 /  3) in 'Development.IDE.Plugin.Completions'
  Missing documentation for:
    Module header
    plugin (src/Development/IDE/Plugin/Completions.hs:37)
  71% (  5 /  7) in 'Development.IDE.Plugin.CodeAction'
  Missing documentation for:
    plugin (src/Development/IDE/Plugin/CodeAction.hs:57)
    rulePackageExports (src/Development/IDE/Plugin/CodeAction/Rules.hs:34)
  25% (  1 /  4) in 'Development.IDE.LSP.Outline'
  Missing documentation for:
    Module header
    setHandlersOutline (src/Development/IDE/LSP/Outline.hs:33)
    moduleOutline (src/Development/IDE/LSP/Outline.hs:38)
  22% (  2 /  9) in 'Development.IDE.LSP.HoverDefinition'
  Missing documentation for:
    setHandlersHover (src/Development/IDE/LSP/HoverDefinition.hs:44)
    setHandlersDefinition (src/Development/IDE/LSP/HoverDefinition.hs:44)
    setHandlersTypeDefinition (src/Development/IDE/LSP/HoverDefinition.hs:44)
    setHandlersDocHighlight (src/Development/IDE/LSP/HoverDefinition.hs:44)
    hover (src/Development/IDE/LSP/HoverDefinition.hs:29)
    gotoDefinition (src/Development/IDE/LSP/HoverDefinition.hs:28)
    gotoTypeDefinition (src/Development/IDE/LSP/HoverDefinition.hs:30)
Warning: 'executeCommand' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'applyWorkspaceEdit' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
   0
% (  0 /  2) in 'Development.IDE.LSP.LanguageServer'
  Missing documentation for:
    Module header
    runLanguageServer (src/Development/IDE/LSP/LanguageServer.hs:41)
Warning: Development.IDE.Core.Debouncer: could not find link destinations for:
    Seconds
Warning: Development.IDE.Core.PositionMapping: could not find link destinations for:
    TextDocumentContentChangeEvent
Warning: Development.IDE.Types.Location: could not find link destinations for:
    FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList FromJSONKey fromJSONKey FromJSONKeyFunction fromJSONKeyList ToJSONKey toJSONKey ToJSONKeyFunction toJSONKeyList
Warning: Development.IDE.Types.Diagnostics: could not find link destinations for:
    NumberOrString DiagnosticSource DiagnosticTag DiagnosticRelatedInformation FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList HashMap StoreItem
Warning: Development.IDE.LSP.Protocol: could not find link destinations for:
    FromServerMessage
Warning: Development.IDE.Import.DependencyInformation: could not find link destinations for:
    FilePathIdMap ShowableModuleName FilePathIdSet ArtifactsLocation ErrorNode SuccessNode
Warning: Development.IDE.Core.RuleTypes: could not find link destinations for:
    RefMap
Warning: Development.IDE.Types.Options: could not find link destinations for:
    ClientCapabilities
Warning: Development.IDE.Core.Shake: could not find link destinations for:
    FromServerMessage Var HashMap Values TextDocumentVersion ShakeQueue LspId Barrier HashSet VersionedTextDocumentIdentifier TextDocumentContentChangeEvent DelayedActionX Failed Succeeded shakeDb Q A
Warning: Development.IDE.Core.OfInterest: could not find link destinations for:
    HashSet
Warning: Development.IDE.Core.IdeConfiguration: could not find link destinations for:
    HashSet InitializeParams WorkspaceFolder
Warning: Development.IDE.Core.FileStore: could not find link destinations for:
    VirtualFile LspFuncs
Warning: Development.IDE.Core.Service: could not find link destinations for:
    ClientCapabilities LspId FromServerMessage Async VersionedTextDocumentIdentifier TextDocumentContentChangeEvent
Warning: Development.IDE.LSP.Server: could not find link destinations for:
    ResponseMessage FromServerMessage LspFuncs ResponseError Handler RequestMessage NotificationMessage InitializeParams InitializeRequest Handlers Default def
Warning: Development.IDE.Core.Rules: could not find link destinations for:
    DocumentHighlight RunSimplifier
Warning: Development.IDE.Plugin: could not find link destinations for:
    Default def LspFuncs TextDocumentIdentifier CodeActionContext ResponseError CAResult
Warning: Development.IDE.Plugin.Completions: could not find link destinations for:
    LspFuncs CompletionParams ResponseError CompletionResponseResult
Warning: Development.IDE.Plugin.CodeAction: could not find link destinations for:
    LspFuncs TextDocumentIdentifier CodeActionContext ResponseError CAResult CodeLensParams CodeLens ExecuteCommandParams Value ServerMethod ApplyWorkspaceEditParams
Warning: Development.IDE.LSP.Outline: could not find link destinations for:
    LspFuncs DocumentSymbolParams ResponseError DSResult
Warning: Development.IDE.LSP.HoverDefinition: could not find link destinations for:
    TextDocumentPositionParams ResponseError Hover LocationResponseParams
Warning: Development.IDE.LSP.LanguageServer: could not find link destinations for:
    Options InitializeRequest DidChangeConfigurationNotification LspId FromServerMessage ClientCapabilities
[12 of 24] Compiling CabalHelper.Compiletime.Program.Stack ( src/CabalHelper/Compiletime/Program/Stack.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Program/Stack.o )
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/ghcide-0.1.0/doc/html/ghcide/index.html
[13 of 24] Compiling CabalHelper.Compiletime.Log ( src/CabalHelper/Compiletime/Log.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Log.o )
[14 of 24] Compiling CabalHelper.Compiletime.Process ( src/CabalHelper/Compiletime/Process.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Process.o )
[15 of 24] Compiling CabalHelper.Compiletime.Program.GHC ( src/CabalHelper/Compiletime/Program/GHC.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Program/GHC.o )
[16 of 24] Compiling CabalHelper.Compiletime.Sandbox ( src/CabalHelper/Compiletime/Sandbox.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Sandbox.o )
[17 of 24] Compiling CabalHelper.Compiletime.Cabal ( src/CabalHelper/Compiletime/Cabal.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Cabal.o )
[18 of 24] Compiling CabalHelper.Compiletime.Program.CabalInstall ( src/CabalHelper/Compiletime/Program/CabalInstall.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Program/CabalInstall.o )
[19 of 24] Compiling Distribution.Helper.Discover ( lib/Distribution/Helper/Discover.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/Distribution/Helper/Discover.o )
[20 of 24] Compiling Paths_cabal_helper ( /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/autogen/Paths_cabal_helper.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/Paths_cabal_helper.o )
[21 of 24] Compiling CabalHelper.Compiletime.Compile ( src/CabalHelper/Compiletime/Compile.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/Compile.o )
[22 of 24] Compiling Symlink          ( os/posix/Symlink.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/Symlink.o )
[23 of 24] Compiling CabalHelper.Compiletime.CompPrograms ( src/CabalHelper/Compiletime/CompPrograms.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/CabalHelper/Compiletime/CompPrograms.o )
[24 of 24] Compiling Distribution.Helper ( lib/Distribution/Helper.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/Distribution/Helper.o )
2020-05-14 16:38:07.894971997 [ThreadId 44] - Plugin.makeCodeLens (ideLogger)
[ 4 of 12] Compiling Floskell.Fixities ( src/Floskell/Fixities.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Fixities.o )
[ 5 of 12] Compiling Floskell.Imports ( src/Floskell/Imports.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Imports.o )
[ 6 of 12] Compiling Floskell.Styles  ( src/Floskell/Styles.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Styles.o )
[ 7 of 12] Compiling Floskell.ConfigFile ( src/Floskell/ConfigFile.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/ConfigFile.o )

src/Floskell/ConfigFile.hs:30:1: warning: [-Wunused-imports]
    The qualified import of ‘Data.Aeson.Parser’ is redundant

      except perhaps to import instances from ‘Data.Aeson.Parser’
    To import instances alone, use: import Data.Aeson.Parser()
   |
30 | import qualified Data.Aeson.Parser          as JSON ( json' )
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 8 of 12] Compiling Floskell.Types   ( src/Floskell/Types.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Types.o )
[ 9 of 12] Compiling Floskell.Printers ( src/Floskell/Printers.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Printers.o )

src/Floskell/Printers.hs:72:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
72 | import           Data.Monoid                ( (<>) )
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[10 of 12] Compiling Floskell.Pretty  ( src/Floskell/Pretty.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Pretty.o )
[11 of 12] Compiling Floskell.Comments ( src/Floskell/Comments.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell/Comments.o )
[12 of 12] Compiling Floskell         ( src/Floskell.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/build/Floskell.o )
Preprocessing library for floskell-0.10.2..
Running Haddock on library for floskell-0.10.2..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: StateVar-1.2, aeson-1.4.7.1,
attoparsec-0.13.2.4, base-compat-0.11.1, base-compat-batteries-0.11.1,
base-orphans-0.8.2, bifunctors-5.5.7, comonad-5.0.6, contravariant-1.5.2,
data-default-0.7.1.1, data-default-class-0.1.2.0,
data-default-instances-containers-0.0.1, data-default-instances-dlist-0.0.1,
data-default-instances-old-locale-0.0.1, distributive-0.6.2, dlist-0.8.0.8,
exceptions-0.10.4, free-5.1.3, hashable-1.3.0.0, haskell-src-exts-1.23.0,
integer-logarithms-1.0.3, monad-dijkstra-0.1.1.2, old-locale-1.0.0.7,
primitive-0.7.0.1, profunctors-5.5.2, psqueues-0.2.7.2, random-1.1,
scientific-0.3.6.2, semigroupoids-5.3.4, tagged-0.8.6, th-abstraction-0.3.2.0,
time-compat-1.9.3, transformers-base-0.4.5.2, transformers-compat-0.6.5,
unordered-containers-0.2.10.0, utf8-string-1.0.1.1, uuid-types-1.0.3,
vector-0.12.1.2

src/Floskell/ConfigFile.hs:
30:1: warning: [-Wunused
-imports]
    The qualified import of ‘Data.Aeso
n.Parser’ is redundant
      except perhaps to import instances from
 ‘Data.Aeson.Par
ser’
    To import instances alone, use: import Da
ta.Aeson.Parser
()
   |
30 | im
port qualified
 Data.Aeson.Pa
rser          
as JSON ( json
' )
   | ^^^^
^^^^^^^^^^^^^^
^^^^^^^^^^^^^^
^^^^^^^^^^^^^^
^^^^^^^^^^^^^
^^

src/Floskell/Printers.hs:72
:1: warning: [-Wunused-imports]

    The import of ‘Data.M
onoid’ is redundant
      except perhaps to import instances from 
‘Data.Monoid’
   
 To import instances alone, use: import Data.Monoid(
)
   |
72 | impo
rt           Dat
a.Monoid          
      ( (<>) )
   | ^^^^^^^^^
^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^^^^^
Haddock coverage:
   0% (  0 /  3) in 'Floskell.Attoparsec'
  Missing documentation for:
    Module header
    Position (src/Floskell/Attoparsec.hs:10)
    parseOnly (src/Floskell/Attoparsec.hs:34)
  88% (  7 /  8) in 'Floskell.Buffer'
  Missing documentation for:
    Buffer (src/Floskell/Buffer.hs:18)
   0% (  0 / 29) in 'Floskell.Config'
  Missing documentation for:
    Module header
    Indent (src/Floskell/Config.hs:53)
    LayoutContext (src/Floskell/Config.hs:56)
    Location (src/Floskell/Config.hs:59)
    WsLoc (src/Floskell/Config.hs:62)
    Whitespace (src/Floskell/Config.hs:65)
    Layout (src/Floskell/Config.hs:71)
    ConfigMapKey (src/Floskell/Config.hs:74)
    ConfigMap (src/Floskell/Config.hs:77)
    PenaltyConfig (src/Floskell/Config.hs:81)
    AlignConfig (src/Floskell/Config.hs:97)
    IndentConfig (src/Floskell/Config.hs:122)
    LayoutConfig (src/Floskell/Config.hs:161)
    OpConfig (src/Floskell/Config.hs:190)
    GroupConfig (src/Floskell/Config.hs:199)
    ImportsGroupOrder (src/Floskell/Config.hs:208)
    ImportsGroup (src/Floskell/Config.hs:212)
    SortImportsRule (src/Floskell/Config.hs:217)
    DeclarationConstruct (src/Floskell/Config.hs:220)
    OptionConfig (src/Floskell/Config.hs:223)
    Config (src/Floskell/Config.hs:246)
    defaultConfig (src/Floskell/Config.hs:266)
    safeConfig (src/Floskell/Config.hs:283)
    cfgMapFind (src/Floskell/Config.hs:303)
    cfgOpWs (src/Floskell/Config.hs:318)
    cfgGroupWs (src/Floskell/Config.hs:321)
    inWs (src/Floskell/Config.hs:324)
    wsSpace (src/Floskell/Config.hs:330)
    wsLinebreak (src/Floskell/Config.hs:333)
   0% (  0 /  3) in 'Floskell.Fixities'
  Missing documentation for:
    Module header
    builtinFixities (src/Floskell/Fixities.hs:8)
    packageFixities (src/Floskell/Fixities.hs:11)
   0% (  0 /  4) in 'Floskell.Imports'
  Missing documentation for:
    Module header
    sortImports (src/Floskell/Imports.hs:44)
    groupImports (src/Floskell/Imports.hs:47)
    splitImports (src/Floskell/Imports.hs:64)
  67% (  2 /  3) in 'Floskell.Styles'
  Missing documentation for:
    Module header
  61% ( 11 / 18) in 'Floskell.ConfigFile'
  Missing documentation for:
    Module header
    AppConfig (src/Floskell/ConfigFile.hs:56)
    findAppConfigIn (src/Floskell/ConfigFile.hs:172)
    setStyle (src/Floskell/ConfigFile.hs:195)
    setLanguage (src/Floskell/ConfigFile.hs:199)
    setExtensions (src/Floskell/ConfigFile.hs:203)
    setFixities (src/Floskell/ConfigFile.hs:207)
Warning: Couldn't find .haddock for export SrcSpan
  24% (  5 / 21) in 'Floskell.Types'
  Missing documentation for:
    OutputRestriction (src/Floskell/Types.hs:45)
    TypeLayout (src/Floskell/Types.hs:48)
    Penalty (src/Floskell/Types.hs:51)
    TabStop (src/Floskell/Types.hs:54)
    execPrinter (src/Floskell/Types.hs:73)
    runPrinter (src/Floskell/Types.hs:76)
    psLine (src/Floskell/Types.hs:91)
    psColumn (src/Floskell/Types.hs:94)
    psNewline (src/Floskell/Types.hs:97)
    initialPrintState (src/Floskell/Types.hs:100)
    Config (src/Floskell/Config.hs:246)
    SrcSpan
    CommentType (src/Floskell/Types.hs:104)
    Comment (src/Floskell/Types.hs:107)
    nodeSpan (src/Floskell/Types.hs:125)
    Location (src/Floskell/Config.hs:59)
  36% ( 20 / 56) in 'Floskell.Printers'
  Missing documentation for:
    Module header
    oneline (src/Floskell/Printers.hs:121)
    ignoreOneline (src/Floskell/Printers.hs:126)
    blankline (src/Floskell/Printers.hs:177)
    spaceOrNewline (src/Floskell/Printers.hs:180)
    withTabStops (src/Floskell/Printers.hs:183)
    atTabStop (src/Floskell/Printers.hs:197)
    mayM_ (src/Floskell/Printers.hs:205)
    withPrefix (src/Floskell/Printers.hs:209)
    withPostfix (src/Floskell/Printers.hs:212)
    withIndentConfig (src/Floskell/Printers.hs:215)
    withIndent (src/Floskell/Printers.hs:224)
    withIndentFlex (src/Floskell/Printers.hs:235)
    withIndentAfter (src/Floskell/Printers.hs:246)
    withIndentBy (src/Floskell/Printers.hs:258)
    withLayout (src/Floskell/Printers.hs:261)
    inter (src/Floskell/Printers.hs:269)
    aligned (src/Floskell/Printers.hs:295)
    indented (src/Floskell/Printers.hs:300)
    depend (src/Floskell/Printers.hs:319)
    depend' (src/Floskell/Printers.hs:322)
    group (src/Floskell/Printers.hs:344)
    groupH (src/Floskell/Printers.hs:353)
    groupV (src/Floskell/Printers.hs:362)
    operator (src/Floskell/Printers.hs:371)
    operatorH (src/Floskell/Printers.hs:374)
    operatorV (src/Floskell/Printers.hs:377)
    alignOnOperator (src/Floskell/Printers.hs:380)
    alignOnOperatorH (src/Floskell/Printers.hs:384)
    alignOnOperatorV (src/Floskell/Printers.hs:388)
    withOperatorFormatting (src/Floskell/Printers.hs:392)
    withOperatorFormattingH (src/Floskell/Printers.hs:405)
    withOperatorFormattingV (src/Floskell/Printers.hs:417)
    operatorSectionL (src/Floskell/Printers.hs:429)
    operatorSectionR (src/Floskell/Printers.hs:435)
    comma (src/Floskell/Printers.hs:441)
  67% (  2 /  3) in 'Floskell.Pretty'
  Missing documentation for:
    Module header
 100% (  2 /  2) in 'Floskell.Comments'
  67% ( 12 / 18) in 'Floskell'
  Missing documentation for:
    AppConfig (src/Floskell/ConfigFile.hs:56)
    findAppConfigIn (src/Floskell/ConfigFile.hs:172)
    setStyle (src/Floskell/ConfigFile.hs:195)
    setLanguage (src/Floskell/ConfigFile.hs:199)
    setExtensions (src/Floskell/ConfigFile.hs:203)
    setFixities (src/Floskell/ConfigFile.hs:207)
Warning: Floskell.Attoparsec: could not find link destinations for:
    Parser
Warning: Floskell.Config: could not find link destinations for:
    FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList Default def
Warning: Floskell.Fixities: could not find link destinations for:
    Fixity
Warning: Floskell.Imports: could not find link destinations for:
    ImportDecl
Warning: Floskell.ConfigFile: could not find link destinations for:
    Language Extension Fixity FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList
Warning: Floskell.Types: could not find link destinations for:
    MonadSearch cost junction abandon seal collapse Search FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList Default def Pretty pretty Doc prettyPrec SrcInfo toSrcInfo SrcLoc fromSrcInfo SrcSpanInfo getPointLoc fileName startLine startColumn Annotated
Warning: Floskell.Pretty: could not find link destinations for:
    Pretty Alt Annotation Binds Bracket ClassDecl Decl Exp FieldUpdate GuardedRhs IPBind InstDecl Match Module PXAttr Pat PatField QualStmt RPat Rhs Splice Stmt XAttr Assoc QName IPName XName ModuleName Name Activation Asst BangType BooleanFormula CallConv ConDecl Context DataOrNew DeclHead DerivStrategy Deriving ExportSpec ExportSpecList FieldDecl FunDep GadtDecl ImportDecl ImportSpec ImportSpecList InjectivityInfo InstHead InstRule Literal ModuleHead ModulePragma Op Overlap QOp QualConDecl ResultSig Rule RuleVar Safety TyVarBind Type TypeEqn Unpackedness WarningText Annotated
Warning: Floskell.Comments: could not find link destinations for:
    SrcSpanInfo
Warning: Floskell: could not find link destinations for:
    Language Extension Fixity FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/floskell-0.10.2/doc/html/floskell/index.html
Configuring library for haskell-language-server-0.1.0.0..
Preprocessing library for haskell-language-server-0.1.0.0..
Building library for haskell-language-server-0.1.0.0..
[ 7 of 16] Compiling Ide.Plugin.Floskell ( src/Ide/Plugin/Floskell.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/Ide/Plugin/Floskell.o ) [Floskell changed]
[14 of 16] Compiling Paths_haskell_language_server ( /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/autogen/Paths_haskell_language_server.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/Paths_haskell_language_server.o ) [/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/autogen/cabal_macros.h changed]
[15 of 16] Compiling Ide.Cradle       ( src/Ide/Cradle.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/Ide/Cradle.o )
[16 of 16] Compiling Ide.Version      ( src/Ide/Version.hs, /home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/build/Ide/Version.o ) [Ide.Cradle changed]
Preprocessing library for haskell-language-server-0.1.0.0..
Running Haddock on library for haskell-language-server-0.1.0.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: Diff-0.4.0, SHA-1.6.4.4,
StateVar-1.2, adjunctions-4.4, aeson-1.4.7.1, ansi-terminal-0.10.3,
ansi-wl-pprint-0.6.9, async-2.2.2, attoparsec-0.13.2.4, base-compat-0.11.1,
base-compat-batteries-0.11.1, base-orphans-0.8.2, base16-bytestring-0.1.1.6,
bifunctors-5.5.7, brittany-0.12.1.1, butcher-1.3.3.1, cabal-helper-1.1.0.0,
call-stack-0.2.0, case-insensitive-1.2.1.0, clock-0.7.2, cmdargs-0.10.20,
colour-2.3.5, comonad-5.0.6, conduit-1.3.2, conduit-extra-1.3.5,
contravariant-1.5.2, cryptohash-sha1-0.11.100.1, czipwith-1.0.1.2,
data-default-0.7.1.1, data-default-class-0.1.2.0,
data-default-instances-containers-0.0.1, data-default-instances-dlist-0.0.1,
data-default-instances-old-locale-0.0.1, data-tree-print-0.1.0.2, deque-0.4.3,
distributive-0.6.2, dlist-0.8.0.8, exceptions-0.10.4, extra-1.7.1,
file-embed-0.0.12.0, filepattern-0.1.2, free-5.1.3, fuzzy-0.1.0.0,
ghc-exactprint-0.6.2, ghc-lib-parser-8.10.1.20200412, ghc-paths-0.1.0.12,
githash-0.1.4.0, gitrev-1.3.1, haddock-library-1.9.0, hashable-1.3.0.0,
haskell-lsp-0.22.0.0, haskell-lsp-types-0.22.0.0, haskell-src-exts-1.23.0,
heaps-0.3.6.1, hslogger-1.3.1.0, integer-logarithms-1.0.3, invariant-0.5.3,
js-dgtable-0.5.2, js-flot-0.8.3, js-jquery-3.3.1, kan-extensions-5.2,
lens-4.19.2, libyaml-0.1.2, megaparsec-8.0.0, microlens-0.4.11.2,
microlens-th-0.4.3.5, monad-control-1.0.2.3, monad-dijkstra-0.1.1.2,
monad-memo-0.5.1, mono-traversable-1.0.15.1, monoid-subclasses-1.0.1,
multistate-0.8.0.2, neat-interpolation-0.4, network-3.1.1.1,
network-bsd-2.8.1.0, network-uri-2.6.3.0, old-locale-1.0.0.7,
opentelemetry-0.4.0, optparse-applicative-0.15.1.0, optparse-simple-0.1.1.2,
ormolu-0.0.5.0, parallel-3.2.2.0, parser-combinators-1.2.1,
prettyprinter-1.6.1, prettyprinter-ansi-terminal-1.1.1.2, primes-0.2.1.0,
primitive-0.7.0.1, profunctors-5.5.2, psqueues-0.2.7.2, random-1.1,
reflection-2.1.5, regex-base-0.94.0.0, regex-tdfa-1.3.1.0, resourcet-1.2.4,
rope-utf16-splay-0.3.1.0, safe-0.3.18, safe-exceptions-0.1.7.0,
scientific-0.3.6.2, semigroupoids-5.3.4, semigroups-0.18.5,
sorted-list-0.2.1.0, split-0.2.3.4, streaming-commons-0.2.1.2, strict-0.3.2,
strict-list-0.1.5, syb-0.7.1, tagged-0.8.6, temporary-1.2.1.1,
th-abstraction-0.3.2.0, time-compat-1.9.3, transformers-base-0.4.5.2,
transformers-compat-0.6.5, typed-process-0.2.6.0, uniplate-1.6.12,
unix-compat-0.5.2, unliftio-core-0.2.0.1, unordered-containers-0.2.10.0,
unsafe-0.0, utf8-string-1.0.1.1, uuid-types-1.0.3, vector-0.12.1.2,
vector-algorithms-0.8.0.3, void-0.7.3, yaml-0.11.4.0, zlib-0.6.2.1
Haddock coverage:
  17% (  1 /  6) in 'Ide.Logger'
  Missing documentation for:
    hlsLogger (src/Ide/Logger.hs:20)
    logm (src/Ide/Logger.hs:31)
    debugm (src/Ide/Logger.hs:34)
    warningm (src/Ide/Logger.hs:37)
    errorm (src/Ide/Logger.hs:40)
Warning: 'ghc' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'main' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'stack' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'cabal' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'distdir' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'ciSourceDir' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  66% ( 19 / 29) in 'Ide.Cradle'
  Missing documentation for:
    Module header
    implicitCradle (src/Ide/Cradle.hs:61)
    CabalHelper (src/Ide/Cradle.hs:108)
    tryCommand (src/Ide/Cradle.hs:156)
    isStackProject (src/Ide/Cradle.hs:280)
    isCabalV2FileProject (src/Ide/Cradle.hs:284)
    isCabalProject (src/Ide/Cradle.hs:288)
    projectRootDir (src/Ide/Cradle.hs:778)
    projectType (src/Ide/Cradle.hs:785)
    projectNoneType (src/Ide/Cradle.hs:792)
  75% (  3 /  4) in 'Ide.Plugin.Config'
  Missing documentation for:
    Module header
  33% (  3 /  9) in 'Ide.PluginUtils'
  Missing documentation for:
    Module header
    WithDeletions (src/Ide/PluginUtils.hs:22)
    makeDiffTextEdit (src/Ide/PluginUtils.hs:32)
    makeDiffTextEditAdditive (src/Ide/PluginUtils.hs:35)
    diffTextEdit (src/Ide/PluginUtils.hs:38)
    clientSupportsDocumentChanges (src/Ide/PluginUtils.hs:104)
  11% (  2 / 18) in 'Ide.Types'
  Missing documentation for:
    Module header
    IdePlugins (src/Ide/Types.hs:41)
    PluginDescriptor (src/Ide/Types.hs:47)
    PluginCommand (src/Ide/Types.hs:81)
    PluginId (src/Ide/Types.hs:155)
    CommandId (src/Ide/Types.hs:76)
    DiagnosticProvider (src/Ide/Types.hs:129)
    DiagnosticProviderFunc (src/Ide/Types.hs:124)
    SymbolsProvider (src/Ide/Types.hs:142)
    HoverProvider (src/Ide/Types.hs:140)
    CodeActionProvider (src/Ide/Types.hs:94)
    CodeLensProvider (src/Ide/Types.hs:109)
    CommandFunction (src/Ide/Types.hs:89)
    ExecuteCommandProvider (src/Ide/Types.hs:147)
    CompletionProvider (src/Ide/Types.hs:102)
    WithSnippets (src/Ide/Types.hs:151)
  14% (  1 /  7) in 'Ide.Plugin.Formatter'
  Missing documentation for:
    Module header
    formatting (src/Ide/Plugin/Formatter.hs:39)
    rangeFormatting (src/Ide/Plugin/Formatter.hs:48)
    noneProvider (src/Ide/Plugin/Formatter.hs:79)
    responseError (src/Ide/Plugin/Formatter.hs:84)
    extractRange (src/Ide/Plugin/Formatter.hs:89)
   0% (  0 /  3) in 'Ide.Plugin.Ormolu'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/Ormolu.hs:31)
    provider (src/Ide/Plugin/Ormolu.hs:47)
  33% (  1 /  3) in 'Ide.Plugin.Floskell'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/Floskell.hs:27)
  44% (  4 /  9) in 'Ide.Plugin.Brittany'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/Brittany.hs:21)
    fromMaybeT (src/Ide/Plugin/Brittany.hs:95)
    opt (src/Ide/Plugin/Brittany.hs:98)
    showErr (src/Ide/Plugin/Brittany.hs:101)
Warning: 'Notifaction' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
Warning: 'Request' is out of scope.
    If you qualify the identifier, haddock can try to link it anyway.
  25% (  2 /  8) in 'Ide.Plugin'
  Missing documentation for:
    Module header
    pluginDescToIdePlugins (src/Ide/Plugin.hs:77)
    mkLspCommand (src/Ide/Plugin.hs:366)
    allLspCmdIds (src/Ide/Plugin.hs:377)
    allLspCmdIds' (src/Ide/Plugin.hs:80)
    responseError (src/Ide/Plugin/Formatter.hs:84)
  50% (  1 /  2) in 'Ide.Plugin.Pragmas'
  Missing documentation for:
    descriptor (src/Ide/Plugin/Pragmas.hs:26)
   0% (  0 /  2) in 'Ide.Plugin.GhcIde'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/GhcIde.hs:22)
   0% (  0 /  2) in 'Ide.Plugin.Example2'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/Example2.hs:43)
   0% (  0 /  2) in 'Ide.Plugin.Example'
  Missing documentation for:
    Module header
    descriptor (src/Ide/Plugin/Example.hs:43)
  17% (  1 /  6) in 'Ide.Version'
  Missing documentation for:
    hlsVersion (src/Ide/Version.hs:20)
    hlsGhcDisplayVersion (src/Ide/Version.hs:35)
    getProjectGhcVersion (src/Ide/Version.hs:38)
    hlsGhcVersion (src/Ide/Version.hs:45)
    checkCabalInstall (src/Ide/Version.hs:50)
Warning: Ide.Cradle: could not find link destinations for:
    Ex ProjLoc ProjLocV2Dir ProjLocV2File ProjLocStackYaml QueryEnv Package mkQueryEnv Unit ChComponentInfo ciSourceDirs
Warning: Ide.Plugin.Config: could not find link destinations for:
    InitializeRequest DidChangeConfigurationNotification FromJSON parseJSON Value Parser parseJSONList ToJSON toJSON toEncoding Encoding toJSONList toEncodingList Default def
Warning: Ide.PluginUtils: could not find link destinations for:
    ClientCapabilities WorkspaceEdit TextEdit
Warning: Ide.Types: could not find link destinations for:
    FromJSON DiagnosticTrigger DiagnosticProviderFuncSync DiagnosticProviderFuncAsync LspFuncs DocumentSymbolParams ResponseError DocumentSymbol FormattingOptions TextEdit TextDocumentPositionParams Hover TextDocumentIdentifier CodeActionContext CAResult CodeLensParams CodeLens Value ServerMethod ApplyWorkspaceEditParams ExecuteCommandParams CompletionParams CompletionResponseResult
Warning: Ide.Plugin.Formatter: could not find link destinations for:
    LspFuncs DocumentFormattingParams ResponseError TextEdit DocumentRangeFormattingParams
Warning: Ide.Plugin.Brittany: could not find link destinations for:
    FormattingOptions BrittanyError
Warning: Ide.Plugin: could not find link destinations for:
    Value Command ResponseError
Warning: Ide.Plugin.Pragmas: could not find link destinations for:
    possiblePragmas
Documentation created:
/home/host/Public/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.8.3/haskell-language-server-0.1.0.0/doc/html/haskell-language-server/index.html
Configuring library 'hls-test-utils' for haskell-language-server-0.1.0.0..
Loaded package environment from /home/host/.cache/cabal-helper/ghc-8.8.3.package-envs/Cabal-3.0.0.0.package-env
<command line>: cannot satisfy -package-id Cabal-3.0.0.0-464b38d375a5620fd7e44100b360cafaf1c661fb67425c875b8f9e195fdfa039
    (use -v for more information)
haskell-language-server: panic! compileHelper': compiling helper failed! exit code ExitFailure 1
2020-05-14 16:39:06.810919041 [ThreadId 49] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:39:24.473509154 [ThreadId 52] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:39:35.788207671 [ThreadId 55] - Plugin.makeCodeLens (ideLogger)
2020-05-14 16:39:37.006793953 [ThreadId 58] - GhcIde.hover entered (ideLogger)
2020-05-14 16:39:37.00735777 [ThreadId 58] - Hover request at position 61:10 in file: /home/host/Public/haskell-language-server/src/Ide/Cradle.hs
2020-05-14 16:39:38.512000727 [ThreadId 61] - GhcIde.hover entered (ideLogger)
2020-05-14 16:39:38.512560705 [ThreadId 61] - Hover request at position 61:10 in file: /home/host/Public/haskell-language-server/src/Ide/Cradle.hs
2020-05-14 16:39:42.222990773 [ThreadId 64] - Plugin.makeCodeLens (ideLogger)

@jneira
Copy link
Member Author

jneira commented May 14, 2020

First of all thanks for review and try this, even when you are a not big fan of cabal-helper 😜

Cabal-helper startup times are much longer then hie-bios, and it's more fragile.

  • You are right, it triggers a build (only configure) for each component to ensure all the needed info is present, to be precise. Maybe it could detect that an existing build is valid or reuse it own triggered one (cause stack builds lib+exe by default f.e.). To investigate.
  • We are lately talking of the possibility that hie would make its own builds in an isolate location to not interfere with user main one, so this builds would be needed anyway.

What is the expected result of loading a basic stack project's src/Lib.hs and then test/Spec.hs, this worked after a stack build once, but did not work when cabal-helper chose to use stack, despite there being no .stack-work and having just run cabal build.

Building Cabal-helper panicked preventing the fallback from being attempted at all with the hls repo

Thanks for catching that, my code had not handled the possible exceptions, cause i assumed incorrectly they were already catched in the previous Either and cause i triggered an error compiling at runtime making the cache directory read only and worked for me (maybe it was in another point that did not throw an exception)

@Avi-D-coder
Copy link
Collaborator

That (sharing the default build) is one of the reasons of the relative difficulty of adding test components for stack, cause of the error loading a test module in your example. There is a draft pr that hopefully some day will fix it: DanielG/cabal-helper#92.

The issue is more general. There will always be some modules cabal-helper can load and others it fails to, what happens when the cabal-helper cradle was working and then the user opens a module that cabal-helper fails on. This situation was why my first implict-hie hie-bios attempt failed, and why I had to generate all the cradle info in one go (one hie.yaml instead of multiple in sub packages).

I'm still not convinced that we need cabal-helper for the wrapper, we could provide a much faster experience without it. If we use cabal-helper as the default cradle we are tieing hls to it, since it's currently only used in the wrapper we could move away without breaking workflows, if we switch the cradle that's that.

@jneira
Copy link
Member Author

jneira commented May 15, 2020

Well, maybe it is due c-h works better with cabal but i didn't noticed serious problems in the cradle initialization since 1.0. Btw maybe the issue opening hls (cannot satisfy -package-id Cabal-3.0.0.0-..) could be fixed deleting the c-h cache in /home/host/.cache/cabal-helper

the cabal-helper cradle was working and then the user opens a module that cabal-helper fails on

mmm, i am not aware of any issue that causes that other than the stack with test component (and Setup.hs that no one seems to be able to load it). I mean, once the cradle is initialized correctly it usually handles all the files.

Btw stack configure --tests should make work the test files.
(this had been an issue since 2016!)

I think some of my arguments still hold:

  • cabal-helper has bugs (that can be fixed) but potentially could handle almost all user cases
    • in fact there have been several bug fixes, with the help of the project owner
  • we likely will need to make isolated builds triggered from the ide anyways, cause of the startup delay
    • and maybe it could be improved reusing builds products
  • we dont have right now an unique reliable way that covers most use cases to load an implicit cradle so it seems combine them could improve user experience (so we could discuss the order but no use only one of them)

since it's currently only used in the wrapper we could move away without breaking workflows

You are right, we could remove it from the wrapper (and it does not trigger a project configure or the runtime compile) cause any cradle capable of tell us the build tool used would work

@Avi-D-coder
Copy link
Collaborator

Much to my surprise deleting ~/cache/cabal-helper did allow it to load hls.
This is a start, but the error was opaque, if you had not told me I would not have tried it, despite having done that with cabal-helper < 1.0 several times.

Even if the error log were improved, most users will just think hls is broken, since they won't check the log. Cabal-helper still having fragile global mutable state is a major issue.

Which brings me to the next issue, cabal-helper still won't load it's self. Opening lib/Distribution/Helper.hs succeeds, but completions and hover, etc.. are completely silently broken.

## Output channel: languageserver.haskell

ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: /home/host/.cabal/store/ghc
-8.8.3/haskell-language-server-0.1.0.0-5ee0eb20ba93b84644c34c4a3cfc97b
d0e8581eb6ba74c3d07fb7f314227b2ad/bin/haskell-language-server)
Startin
g (haskell-language-server)LSP server...
  with arguments: Argument
s {argLSP = True, argsCwd = Nothing, argFiles = [], argsVersion = False, 
argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin =
 False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 1}

  with plugins: [PluginId "brittany",PluginId 
"floskell",PluginId "ghcide",PluginId "ormolu",P
luginId "pragmas"]
If you are seeing this in a termina
l, you probably should have run ghcide WITHOUT the --lsp
 option!
 
Started LSP server in 
0.01s
2020-05-15 05:02:35.014350671 [ThreadId 9] - Opened text document: file:///home/host/cabal-helper/lib/Distribution/Helper.hs
Consulting the cradle for "/home/host/cabal-helper/lib/Distribution/Helper.hs"
2020-05-15 05:02:35.016775324 [ThreadId 26] - Cabal-Helper decided to use: ProjLocV2File {plCabalProjectFile = "/home/host/cabal-helper/cabal.project", plProjectDirV2 = "/home/host/cabal-helper"}
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
 - cabal-helper-1.1.0.0 (lib) (configuration changed)
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-helper-1.1.0.0 (test:programs-test) (first run)
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-helper-1.1.0.0 (test:ghc-session) (first run)
Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O","-outputdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-odir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-hidir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-stubdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-i","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-i/home/host/cabal-helper/src","-i/home/host/cabal-helper/lib","-i/home/host/cabal-helper/tests","-i/home/host/cabal-helper/os/posix","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/autogen","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/ghc-session-tmp","-optP-include","-optP/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/ghc-session/build/ghc-session/autogen/cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/host/.cabal/store/ghc-8.8.3/package.db","-package-db","/home/host/cabal-helper/dist-newstyle/packagedb/ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-6ad947bf541fd1c7ba0a9a507a850bdd947d14706d15e05cbe43679acbb7722c","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-90c3710bb45847ef10e5f758780ddf428c485922dd419676a04ea1d2d57ebe58","-package-id","clock-0.7.2-0bfad4514aed1a95d054d942caeb5c653560619033ee18702463a6cb3b68ea70","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","ghc-8.8.3","-package-id","mtl-2.2.2","-package-id","pretty-show-1.8.2-1e09147e952c23308a08b9e363e75b500b13a687272e2ce1d38839ee2a6f2bf4","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-7226cd4b5e78260f4545a3da2f4a3d2998c0963cced7dcce370e6235724832ea","-package-id","semigroups-0.18.5-f04180ebf70d980630175e54a2a1971aa3d720745c13cbd922c0f4b349b66fac","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-f283a86a41e301dc29330c2135e0231ea294f62da89a7b46a8661d20581910d3","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-2.7.2.2","-package-id","unix-compat-0.5.2-3fc18be3724185bd5aa584ffb09be40f68a2b33a6acb6ebd91c25590ec9d16bf","-package-id","utf8-string-1.0.1.1-d76bceb8bb7b728d50464ba115ea0e2b57e8c13d09f1eda1903cbaa723343d0f","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","-Wall","-fwarn-incomplete-uni-patterns","lib/GhcSession.hs","CabalHelper.Compiletime.Cabal","CabalHelper.Compiletime.CompPrograms","CabalHelper.Compiletime.Compat.Environment","CabalHelper.Compiletime.Compat.Version","CabalHelper.Compiletime.Compat.Parsec","CabalHelper.Compiletime.Compile","CabalHelper.Compiletime.Data","CabalHelper.Compiletime.Log","CabalHelper.Compiletime.Process","CabalHelper.Compiletime.Program.CabalInstall","CabalHelper.Compiletime.Program.Stack","CabalHelper.Compiletime.Program.GHC","CabalHelper.Compiletime.Sandbox","CabalHelper.Compiletime.Types","CabalHelper.Compiletime.Types.Cabal","CabalHelper.Compiletime.Types.RelativePath","CabalHelper.Runtime.Compat","CabalHelper.Runtime.HelperMain","CabalHelper.Shared.Common","CabalHelper.Shared.InterfaceTypes","Paths_cabal_helper","Symlink","Distribution.Helper","Distribution.Helper.Discover","TestOptions"], componentRoot = "/home/host/cabal-helper", componentDependencies = []})
"Making new HscEnv[main]"
(([],Just HscEnvEq 3),fromList [])
2020-05-15 05:02:37.030983041 [ThreadId 4100] - Plugin.makeCodeLens (ideLogger)
2020-05-15 05:02:37.032473967 [ThreadId 4111] - finish: InitialLoad (took 0.56s)

@jneira
Copy link
Member Author

jneira commented May 15, 2020

Sorry, cant reproduce in my windows 10 + vscode:

imagen

Maybe comparing the outputs we could hunt why it is happen. However i am not sure if the root cause here is in cabal-helper, as the cradle initialization has been succesful and the subsequent ghc session has started succesfully too (the (([],Just HscEnvEq 3),fromList []))
If you try with an explicit hie.yaml the error is reproduced?

Basic stack project log

[client] run command = "haskell-language-server-wrapper --lsp"
[client] debug command = "haskell-language-server-wrapper --lsp -d -l C:\TEMP\hls.log"
ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: D:\bin\haskell-language-server-wrapper.exe)
cd d:\dev\ws\haskell\cabal-helper; cabal v2-build --with-ghc=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --with-ghc-pkg=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc-pkg.exe --with-haddock=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\haddock.exe --project-file=d:\dev\ws\haskell\cabal-helper\cabal.project --builddir=d:\dev\ws\haskell\cabal-helper\dist-newstyle --dry-run all
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
 - cabal-helper-1.1.0.0 (lib) (configuration changed)
ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: D:\bin\haskell-language-server-8.8.3.exe)
Starting (haskell-language-server)LSP server...
  with arguments: Arguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsVersion = False, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Just "C:\\TEMP\\hls.log", argsThreads = 1}
  with plugins: [PluginId "brittany",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas"]
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.01s
Consulting the cradle for "D:\\dev\\ws\\haskell\\cabal-helper\\lib\\Distribution\\Helper.hs"
cd D:\dev\ws\haskell\cabal-helper; cabal v2-build --with-ghc=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --with-ghc-pkg=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc-pkg.exe --with-haddock=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\haddock.exe --project-file=D:\dev\ws\haskell\cabal-helper\cabal.project --builddir=D:\dev\ws\haskell\cabal-helper\dist-newstyle --dry-run all
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
 - cabal-helper-1.1.0.0 (lib) (configuration changed)
cd D:\dev\ws\haskell\cabal-helper; cabal v2-build --with-ghc=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --with-ghc-pkg=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc-pkg.exe --with-haddock=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\haddock.exe --project-file=D:\dev\ws\haskell\cabal-helper\cabal.project --builddir=D:\dev\ws\haskell\cabal-helper\dist-newstyle --only-configure cabal-helper:test:programs-test
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-helper-1.1.0.0 (test:programs-test) (file tests\ProgramsTest.hs changed)
D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --numeric-version
=> 8.8.3

cabal --numeric-version
=> 3.2.0.0

using helper compiled with Cabal from v2-build package-env C:\Users\atrey\Local Settings\Cache\cabal-helper\ghc-8.8.3.package-envs\Cabal-3.2.0.0.package-env
helper already compiled, using exe: C:\Users\atrey\Local Settings\Cache\cabal-helper\cabal-helper-1.1.0.0--Cabal-3.2.0.0--642c18efd5657699c4a87dbd7ad05e3be3857a9df0526a676bd8d0a5fcce9476.build\cabal-helper
compileHelper took 0.37748s
'C:\Users\atrey\Local Settings\Cache\cabal-helper\cabal-helper-1.1.0.0--Cabal-3.2.0.0--642c18efd5657699c4a87dbd7ad05e3be3857a9df0526a676bd8d0a5fcce9476.build\cabal-helper' D:\dev\ws\haskell\cabal-helper\.\cabal-helper.cabal D:\dev\ws\haskell\cabal-helper\dist-newstyle\build\x86_64-windows\ghc-8.8.3\cabal-helper-1.1.0.0\t\programs-test v2 package-id compiler-id flags config-flags non-default-config-flags component-info
=> [Just (ChResponseVersion ("cabal-helper",Version {versionBranch = [1,1,0,0], versionTags = []})),Just (ChResponseVersion ("GHC",Version {versionBranch = [8,8,3], versionTags = []})),Just (ChResponseFlags [("dev",False)]),Just (ChResponseFlags [("dev",False)]),Just (ChResponseFlags []),Just (ChResponseComponentsInfo (fromList [(ChTestName "programs-test",ChComponentInfo {ciComponentName = ChTestName "programs-test", ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-odir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-hidir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-stubdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-i","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-isrc","-itests","-ios/win","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\autogen","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\programs-test-tmp","-optP-include","-optPD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\programs-test\\build\\programs-test\\autogen\\cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-e897bf754e85ae20bbe74cb735c28cb10af05f70","-package-id","Win32-2.6.1.0","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-cbd6c0109e10c73fdd33ef8bcccb43efdf3e279d","-package-id","clock-0.7.2-b69f9c6c9bfefa97c578e34a45fb7593ab1dcb5c","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","mtl-2.2.2","-package-id","pretty-show-1.8.2-a87f55d37551e9d434a5fd124167f87fd79cc632","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-1e91002c7b372760dfe7f7b3f5a99f9550e9c1c3","-package-id","semigroups-0.18.5-ea33a25608d1dcd56d1ab87d8c0aba2949bd0c33","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-893b68f8e464fabcdb26953d71ce70bd67c63724","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-compat-0.5.2-f83a89786817379de80ba15e63094a019d5a2817","-package-id","utf8-string-1.0.1.1-20b315cdb7319b31a4a470d5ff5701f052c91fdd","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","-Wall","-fwarn-incomplete-uni-patterns"], ciSourceDirs = ["src","tests","os/win"], ciEntrypoints = ChExeEntrypoint {chMainIs = "ProgramsTest.hs", chOtherModules = [ChModuleName {unChModuleName = "CabalHelper.Compiletime.Cabal"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.CompPrograms"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Environment"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Version"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Parsec"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compile"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Data"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Log"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Process"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.CabalInstall"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.Stack"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.GHC"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Sandbox"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types.Cabal"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types.RelativePath"},ChModuleName {unChModuleName = "CabalHelper.Runtime.Compat"},ChModuleName {unChModuleName = "CabalHelper.Runtime.HelperMain"},ChModuleName {unChModuleName = "CabalHelper.Shared.Common"},ChModuleName {unChModuleName = "CabalHelper.Shared.InterfaceTypes"},ChModuleName {unChModuleName = "Paths_cabal_helper"},ChModuleName {unChModuleName = "Symlink"}]}})]))]

cd D:\dev\ws\haskell\cabal-helper; cabal v2-build --with-ghc=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --with-ghc-pkg=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc-pkg.exe --with-haddock=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\haddock.exe --project-file=D:\dev\ws\haskell\cabal-helper\cabal.project --builddir=D:\dev\ws\haskell\cabal-helper\dist-newstyle --only-configure cabal-helper:test:ghc-session
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-helper-1.1.0.0 (test:ghc-session) (file src\CabalHelper\Compiletime\Program\CabalInstall.hs changed)
D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --numeric-version
=> 8.8.3

cabal --numeric-version
=> 3.2.0.0

using helper compiled with Cabal from v2-build package-env C:\Users\atrey\Local Settings\Cache\cabal-helper\ghc-8.8.3.package-envs\Cabal-3.2.0.0.package-env
helper already compiled, using exe: C:\Users\atrey\Local Settings\Cache\cabal-helper\cabal-helper-1.1.0.0--Cabal-3.2.0.0--642c18efd5657699c4a87dbd7ad05e3be3857a9df0526a676bd8d0a5fcce9476.build\cabal-helper
compileHelper took 0.38520s
'C:\Users\atrey\Local Settings\Cache\cabal-helper\cabal-helper-1.1.0.0--Cabal-3.2.0.0--642c18efd5657699c4a87dbd7ad05e3be3857a9df0526a676bd8d0a5fcce9476.build\cabal-helper' D:\dev\ws\haskell\cabal-helper\.\cabal-helper.cabal D:\dev\ws\haskell\cabal-helper\dist-newstyle\build\x86_64-windows\ghc-8.8.3\cabal-helper-1.1.0.0\t\ghc-session v2 package-id compiler-id flags config-flags non-default-config-flags component-info
=> [Just (ChResponseVersion ("cabal-helper",Version {versionBranch = [1,1,0,0], versionTags = []})),Just (ChResponseVersion ("GHC",Version {versionBranch = [8,8,3], versionTags = []})),Just (ChResponseFlags [("dev",False)]),Just (ChResponseFlags [("dev",False)]),Just (ChResponseFlags []),Just (ChResponseComponentsInfo (fromList [(ChTestName "ghc-session",ChComponentInfo {ciComponentName = ChTestName "ghc-session", ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-odir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-hidir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-stubdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-i","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-isrc","-ilib","-itests","-ios/win","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-optP-include","-optPD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen\\cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-e897bf754e85ae20bbe74cb735c28cb10af05f70","-package-id","Win32-2.6.1.0","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-cbd6c0109e10c73fdd33ef8bcccb43efdf3e279d","-package-id","clock-0.7.2-b69f9c6c9bfefa97c578e34a45fb7593ab1dcb5c","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","ghc-8.8.3","-package-id","mtl-2.2.2","-package-id","pretty-show-1.8.2-a87f55d37551e9d434a5fd124167f87fd79cc632","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-1e91002c7b372760dfe7f7b3f5a99f9550e9c1c3","-package-id","semigroups-0.18.5-ea33a25608d1dcd56d1ab87d8c0aba2949bd0c33","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-893b68f8e464fabcdb26953d71ce70bd67c63724","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-compat-0.5.2-f83a89786817379de80ba15e63094a019d5a2817","-package-id","utf8-string-1.0.1.1-20b315cdb7319b31a4a470d5ff5701f052c91fdd","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","-Wall","-fwarn-incomplete-uni-patterns"], ciSourceDirs = ["src","lib","tests","os/win"], ciEntrypoints = ChExeEntrypoint {chMainIs = "GhcSession.hs", chOtherModules = [ChModuleName {unChModuleName = "CabalHelper.Compiletime.Cabal"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.CompPrograms"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Environment"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Version"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compat.Parsec"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Compile"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Data"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Log"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Process"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.CabalInstall"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.Stack"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Program.GHC"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Sandbox"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types.Cabal"},ChModuleName {unChModuleName = "CabalHelper.Compiletime.Types.RelativePath"},ChModuleName {unChModuleName = "CabalHelper.Runtime.Compat"},ChModuleName {unChModuleName = "CabalHelper.Runtime.HelperMain"},ChModuleName {unChModuleName = "CabalHelper.Shared.Common"},ChModuleName {unChModuleName = "CabalHelper.Shared.InterfaceTypes"},ChModuleName {unChModuleName = "Paths_cabal_helper"},ChModuleName {unChModuleName = "Symlink"},ChModuleName {unChModuleName = "Distribution.Helper"},ChModuleName {unChModuleName = "Distribution.Helper.Discover"},ChModuleName {unChModuleName = "TestOptions"}]}})]))]

Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-odir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-hidir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-stubdir","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-i","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-iD:\\dev\\ws\\haskell\\cabal-helper\\src","-iD:\\dev\\ws\\haskell\\cabal-helper\\lib","-iD:\\dev\\ws\\haskell\\cabal-helper\\tests","-iD:\\dev\\ws\\haskell\\cabal-helper\\os/win","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen","-iD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\ghc-session-tmp","-optP-include","-optPD:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\cabal-helper-1.1.0.0\\t\\ghc-session\\build\\ghc-session\\autogen\\cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\cabal-helper\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-e897bf754e85ae20bbe74cb735c28cb10af05f70","-package-id","Win32-2.6.1.0","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-cbd6c0109e10c73fdd33ef8bcccb43efdf3e279d","-package-id","clock-0.7.2-b69f9c6c9bfefa97c578e34a45fb7593ab1dcb5c","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","ghc-8.8.3","-package-id","mtl-2.2.2","-package-id","pretty-show-1.8.2-a87f55d37551e9d434a5fd124167f87fd79cc632","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-1e91002c7b372760dfe7f7b3f5a99f9550e9c1c3","-package-id","semigroups-0.18.5-ea33a25608d1dcd56d1ab87d8c0aba2949bd0c33","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-893b68f8e464fabcdb26953d71ce70bd67c63724","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-compat-0.5.2-f83a89786817379de80ba15e63094a019d5a2817","-package-id","utf8-string-1.0.1.1-20b315cdb7319b31a4a470d5ff5701f052c91fdd","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","-Wall","-fwarn-incomplete-uni-patterns","lib\\GhcSession.hs","CabalHelper.Compiletime.Cabal","CabalHelper.Compiletime.CompPrograms","CabalHelper.Compiletime.Compat.Environment","CabalHelper.Compiletime.Compat.Version","CabalHelper.Compiletime.Compat.Parsec","CabalHelper.Compiletime.Compile","CabalHelper.Compiletime.Data","CabalHelper.Compiletime.Log","CabalHelper.Compiletime.Process","CabalHelper.Compiletime.Program.CabalInstall","CabalHelper.Compiletime.Program.Stack","CabalHelper.Compiletime.Program.GHC","CabalHelper.Compiletime.Sandbox","CabalHelper.Compiletime.Types","CabalHelper.Compiletime.Types.Cabal","CabalHelper.Compiletime.Types.RelativePath","CabalHelper.Runtime.Compat","CabalHelper.Runtime.HelperMain","CabalHelper.Shared.Common","CabalHelper.Shared.InterfaceTypes","Paths_cabal_helper","Symlink","Distribution.Helper","Distribution.Helper.Discover","TestOptions"], componentRoot = "D:\\dev\\ws\\haskell\\cabal-helper", componentDependencies = []})
"Making new HscEnv[main]"
Error while checking GHC version: "D:\\\\bin\\\\stack\\\\x86_64-windows\\\\ghc-8.8.3\\\\lib\\bin\\ghc: readCreateProcess: does not exist (No such file or directory)"
(([],Just HscEnvEq 3),fromList [])

@Avi-D-coder
Copy link
Collaborator

Avi-D-coder commented May 15, 2020

I say it's cabal-helper because running only gen-hie > hie.yaml and reopening the file works. No rebuild, no nothing. Cabal-helper's failure modes are complex, and led to impression in the boarder Haskell community that hie was flaky, and unreliable. The fact that cradle initialization is not deterministic is rather damming.

Successful Log (with gen-hie's hie.yaml)
## Output channel: languageserver.haskell

ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: /home/host/.cabal/store/ghc-8.8.3/hask
ell-language-server-0.1.0.0-5ee0eb20ba93b84644c34c4a3cfc97bd0e8581eb6b
a
74c3d07fb7f314227b2ad/bin/haskell-language-server)
Starting (haskell-l
anguage-server)LSP server...
  with arguments: Arguments {argLSP = Tru
e, argsCwd = Nothing, argFiles = [], argsVersion = False, argsShakeProfil
ing = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, a
rgsLogFile = Nothing, argsThreads = 1}
  with plugins: [PluginId
 "brittany",PluginId "floskell",PluginId "ghcide",PluginId 
"ormolu",PluginId "pragmas"]
If you are seeing this in a terminal
, you probably should have run ghcide WITHOUT the --lsp option!
 
Started LSP server in 0.00s
2020-05-15 11:44:08.681065632 [ThreadId 9] - Opened text document: file:///home/host/cabal-helper/lib/Distribution/Helper.hs
Consulting the cradle for "/home/host/cabal-helper/lib/Distribution/Helper.hs"
> Resolving dependencies...
2020-05-15 11:44:10.688839478 [ThreadId 33] - Plugin.makeCodeLens (ideLogger)
> Build profile: -w ghc-8.8.3 -O1
> In order, the following will be built (use -v for more details):
>  - cabal-helper-1.1.0.0 (lib) (configuration changed)
> Configuring library for cabal-helper-1.1.0.0..
> Preprocessing library for cabal-helper-1.1.0.0..
Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-odir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-hidir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-stubdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-i","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-isrc","-ilib","-ios/posix","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/autogen","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build","-optP-include","-optP/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/build/autogen/cabal_macros.h","-this-unit-id","cabal-helper-1.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/host/.cabal/store/ghc-8.8.3/package.db","-package-db","/home/host/cabal-helper/dist-newstyle/packagedb/ghc-8.8.3","-package-db","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/package.conf.inplace","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-6ad947bf541fd1c7ba0a9a507a850bdd947d14706d15e05cbe43679acbb7722c","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-90c3710bb45847ef10e5f758780ddf428c485922dd419676a04ea1d2d57ebe58","-package-id","clock-0.7.2-0bfad4514aed1a95d054d942caeb5c653560619033ee18702463a6cb3b68ea70","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","mtl-2.2.2","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-7226cd4b5e78260f4545a3da2f4a3d2998c0963cced7dcce370e6235724832ea","-package-id","semigroups-0.18.5-f04180ebf70d980630175e54a2a1971aa3d720745c13cbd922c0f4b349b66fac","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-f283a86a41e301dc29330c2135e0231ea294f62da89a7b46a8661d20581910d3","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-2.7.2.2","-package-id","unix-compat-0.5.2-3fc18be3724185bd5aa584ffb09be40f68a2b33a6acb6ebd91c25590ec9d16bf","-package-id","utf8-string-1.0.1.1-d76bceb8bb7b728d50464ba115ea0e2b57e8c13d09f1eda1903cbaa723343d0f","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","Distribution.Helper","Distribution.Helper.Discover","CabalHelper.Compiletime.Cabal","CabalHelper.Compiletime.CompPrograms","CabalHelper.Compiletime.Compat.Environment","CabalHelper.Compiletime.Compat.Version","CabalHelper.Compiletime.Compat.Parsec","CabalHelper.Compiletime.Compile","CabalHelper.Compiletime.Data","CabalHelper.Compiletime.Log","CabalHelper.Compiletime.Process","CabalHelper.Compiletime.Program.CabalInstall","CabalHelper.Compiletime.Program.Stack","CabalHelper.Compiletime.Program.GHC","CabalHelper.Compiletime.Sandbox","CabalHelper.Compiletime.Types","CabalHelper.Compiletime.Types.Cabal","CabalHelper.Compiletime.Types.RelativePath","CabalHelper.Runtime.Compat","CabalHelper.Runtime.HelperMain","CabalHelper.Shared.Common","CabalHelper.Shared.InterfaceTypes","Paths_cabal_helper","Symlink","-hide-all-packages"], componentRoot = "/home/host/cabal-helper", componentDependencies = ["cabal-helper.cabal","cabal.project","cabal.project.local"]})
"Making new HscEnv[cabal-helper-1.1.0.0-inplace]"
(([],Just HscEnvEq 3),fromList [("cabal-helper.cabal",Just 2020-05-13 06:37:06.906456415 UTC),("cabal.project",Just 2020-05-13 06:37:06.906456415 UTC),("cabal.project.local",Nothing)])
2020-05-15 11:44:14.805916332 [ThreadId 6213] - finish: InitialLoad (took 0.11s)

Compare a cabal-helper error to hie-bios.
Opening src/CabalHelper/Runtime/Compat.hs

hie.yaml

[compiler] [E] Multi Cradle: No prefixes matched
pwd: /home/host/cabal-helper
filepath: /home/host/cabal-helper/src/CabalHelper/Runtime/Compat.hs
prefixes:
("./lib",Cabal {component = Just "lib:cabal-helper"})
("./tests",Cabal {component = Just "cabal-helper:test:compile-test"})
("./tests",Cabal {component = Just "cabal-helper:test:programs-test"})
("./tests",Cabal {component = Just "cabal-helper:test:ghc-session"})
("./tests",Cabal {component = Just "cabal-helper:test:examples"})
("./src/CabalHelper/Runtime/Main.hs",Cabal {component = Just "cabal-helper:exe:cabal-helper-main"})

cabal-helper (no fallback to hie-bios's implicit occurred because againg cabal-helper cradle loaded)

[compiler] [E] `gcc' failed in phase `C pre-processor'. (Exit code: 1)
ghcide version: 0.1.0.0 (GHC: 8.8.3) (PATH: /home/host/.cabal/store/gh
c-8.8.3/haskell-language-server-0.1.0.0-5ee0eb20ba93b84644c34c4a3cfc97b
d0e8581eb6ba74c3d07fb7f314227b2ad/bin/haskell-language-server)
Starting (haskell-la
nguage-server)LSP server...
  with arguments: Arguments {argLSP = True,
 argsCwd = Nothing, argFiles = [], argsVersion = False, argsShakeProfili
ng = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, 
argsLogFile = Nothing, argsThreads = 1}
  with plugins: [PluginId "b
rittany",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "p
ragmas"]
If you are seeing this in a terminal, you probably should have r
un ghcide WITHOUT the --lsp option!
 
Start
ed LSP server in 0.00s
2020-05-15 12:00:45.63574469 [ThreadId 9] - Opened text document: file:///home/host/cabal-helper/src/CabalHelper/Runtime/Compat.hs
Consulting the cradle for "/home/host/cabal-helper/src/CabalHelper/Runtime/Compat.hs"
2020-05-15 12:00:45.639077001 [ThreadId 26] - Cabal-Helper decided to use: ProjLocV2File {plCabalProjectFile = "/home/host/cabal-helper/cabal.project", plProjectDirV2 = "/home/host/cabal-helper"}
Resolving dependencies...
2020-05-15 12:00:47.644165646 [ThreadId 38] - Plugin.makeCodeLens (ideLogger)
Build profile: -w ghc-8.8.3 -O1
In order, the following would be built (use -v for more details):
 - cabal-helper-1.1.0.0 (lib) (configuration changed)
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cabal-helper-1.1.0.0 (test:programs-test) (first run)
Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O","-outputdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-odir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-hidir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-stubdir","/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-i","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-i/home/host/cabal-helper/src","-i/home/host/cabal-helper/tests","-i/home/host/cabal-helper/os/posix","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/autogen","-i/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/global-autogen","-I/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/programs-test-tmp","-optP-include","-optP/home/host/cabal-helper/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-helper-1.1.0.0/t/programs-test/build/programs-test/autogen/cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/host/.cabal/store/ghc-8.8.3/package.db","-package-db","/home/host/cabal-helper/dist-newstyle/packagedb/ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","SHA-1.6.4.4-6ad947bf541fd1c7ba0a9a507a850bdd947d14706d15e05cbe43679acbb7722c","-package-id","base-4.13.0.0","-package-id","bytestring-0.10.10.0","-package-id","cabal-plan-0.6.2.0-90c3710bb45847ef10e5f758780ddf428c485922dd419676a04ea1d2d57ebe58","-package-id","clock-0.7.2-0bfad4514aed1a95d054d942caeb5c653560619033ee18702463a6cb3b68ea70","-package-id","containers-0.6.2.1","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","mtl-2.2.2","-package-id","pretty-show-1.8.2-1e09147e952c23308a08b9e363e75b500b13a687272e2ce1d38839ee2a6f2bf4","-package-id","process-1.6.8.0","-package-id","semigroupoids-5.3.4-7226cd4b5e78260f4545a3da2f4a3d2998c0963cced7dcce370e6235724832ea","-package-id","semigroups-0.18.5-f04180ebf70d980630175e54a2a1971aa3d720745c13cbd922c0f4b349b66fac","-package-id","template-haskell-2.15.0.0","-package-id","temporary-1.2.1.1-f283a86a41e301dc29330c2135e0231ea294f62da89a7b46a8661d20581910d3","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unix-2.7.2.2","-package-id","unix-compat-0.5.2-3fc18be3724185bd5aa584ffb09be40f68a2b33a6acb6ebd91c25590ec9d16bf","-package-id","utf8-string-1.0.1.1-d76bceb8bb7b728d50464ba115ea0e2b57e8c13d09f1eda1903cbaa723343d0f","-XHaskell2010","-XNondecreasingIndentation","-XImplicitParams","-XNamedFieldPuns","-XRecordWildCards","-XFlexibleContexts","-XConstraintKinds","-Wall","-fwarn-incomplete-uni-patterns","src/ProgramsTest.hs","CabalHelper.Compiletime.Cabal","CabalHelper.Compiletime.CompPrograms","CabalHelper.Compiletime.Compat.Environment","CabalHelper.Compiletime.Compat.Version","CabalHelper.Compiletime.Compat.Parsec","CabalHelper.Compiletime.Compile","CabalHelper.Compiletime.Data","CabalHelper.Compiletime.Log","CabalHelper.Compiletime.Process","CabalHelper.Compiletime.Program.CabalInstall","CabalHelper.Compiletime.Program.Stack","CabalHelper.Compiletime.Program.GHC","CabalHelper.Compiletime.Sandbox","CabalHelper.Compiletime.Types","CabalHelper.Compiletime.Types.Cabal","CabalHelper.Compiletime.Types.RelativePath","CabalHelper.Runtime.Compat","CabalHelper.Runtime.HelperMain","CabalHelper.Shared.Common","CabalHelper.Shared.InterfaceTypes","Paths_cabal_helper","Symlink"], componentRoot = "/home/host/cabal-helper", componentDependencies = []})
"Making new HscEnv[main]"
(([],Just HscEnvEq 3),fromList [])
2020-05-15 12:00:49.332123926 [ThreadId 2597] - finish: InitialLoad (took 0.48s)

@Avi-D-coder
Copy link
Collaborator

#114 is a good argument for keeping cabal-helper, It's the first component I'm aware of in the wild that cabal-helper can load, but hie-bios cannot.

I still think cabal-helper should be a fallback not the first choice since, hie-bios is faster and has simpler failure modes.

@jneira How would you feel about this order?

  1. use hie-bios, if we get a diagnostic starting with Multi Cradle: No prefixes matched or Failed to parse result of calling fall through.
  2. Try loading cabal-helper if we are able to detect a failure fall through.
  3. Revert to hie-bios even through we no it's incomplete, at least some of the components will work.

The primary advantage of this order is that hie-bios's failure is easy to detect, where as cabal-helper's cradle can load, but be broken.

@jneira
Copy link
Member Author

jneira commented May 18, 2020

@Avi-D-coder yeah, that bug is a symptom of one of the hie-bios flaws (and base of its best feature): it relies on cabal repl/stack repl and it suffer the limitations of both build tools. It is on porpuse: for hie-bios return the proper ghc flags is responsibility of the tools. But the tools didnt know that and its repl support is not thinking in that requirement.

cabal-helper relies on a stronger invariant: both tools must use the Cabal library and generate the same build products. Those build products determine directly the ghc flags. So potentially it could cover 100% of the use cases.

Fo example, the issue with test files: the explicit cradle works cause it turns out stack repl pkg:test:whatever builds the test component without --test, but the implicit one fails cause stack repl file.test does not build the test component of the file (inconsistently, i would say) .

cabal-helper can't load test files cause stack, by default does not build them. User have to tell explicitly stack to build the tests and benchs, and stack repl pkg:test:name is an exception to that rule. Build tests automatically, against the default behaviour, without user approval and in the default build dir, is dangerous for obvious reasons: maybe tests triggers some nuclear missile launch or whatever. 😝

The workaround to load test files with cabal helper is simply telling stack that should build the tests, avoiding its default behaviour: fo so you can add a line in the stack.yaml with test: true and voila!
In fact this is the cabal behaviour (build tests by default) and arguably it should be the stack one.

So i am still thinking that cabal-helper should be the first option. But it is not a strong opinion cause this is a balance between:

  • Potential 100% correctness with actual bugs that should be fixed and worst performance.
    • If we end up building the project in an isolate location the performance will be the same
  • Faster option that covers most (??) actual simple use cases but assuming it will no be able to cover all of them
  • Taking in account that hopefully there will be a third option that will have the good of both.
    • But without knowing when stack will fix it

@Avi-D-coder
Copy link
Collaborator

It worth noting the most popular Dev tool for Haskell is ghcid, which uses an extreme version hie-bios approach. Ghcid has a very good reputation because it's easy to setup, reliable and transparent. If ghcid failed it's just your GHCi command that's wrong. Cabal-helper could theoretically solve 100% of uses cases, but in practice it solves fewer. For cabal helper to be a good default it needs to actually work today not a few years from now.

Today it's not deterministic, fails to build many common cases and occasionally returns a completely unresponsive cradle.

I don't mean to harp on this issue, but reliability bugs making hie hard to uses was the number one reason Haskeller's gave me for not using hie.

In most cases those bugs were caused by cabal-helper. The hie closed issues tab is littered with people bumping up against cabal-helper. Cabal-helper has improved, but it's still the same approach and while that approach could theoretically in the future work 100% of the time, today it just doesn't while requiring global mutable state which breeds bugs and is known to be broken.

@Avi-D-coder
Copy link
Collaborator

The workaround to load test files with cabal helper is simply telling stack that should build the tests, avoiding its default behaviour: fo so you can add a line in the stack.yaml with test: true and voila!

The issue is this sort of thing doesn't help new users. They show up in droves with this exact problem asking the same questions as hie issues. We should have a sensible default(even if stack doesn't). Building tests should always be safe from side effects, we are not running, just building them.

@jneira
Copy link
Member Author

jneira commented May 19, 2020

Ok, i'll change the logic to try first implicit-hie and then cabal-helper: thanks for feedback!

@Avi-D-coder
Copy link
Collaborator

Thank you

@jneira
Copy link
Member Author

jneira commented May 19, 2020

Btw, not totally sure, but maybe implicit-hie could be used in ghcide, to make it available to ghcide users and we could add the fallback to cabal-helper here. Moreover knowing that it will not be included in hie-bios and reading @ndmitchell comment about.
Have you considered make a pr in ghcide, @Avi-D-coder?
//cc @ndmitchell @cocreature

@Avi-D-coder
Copy link
Collaborator

I have to provide a hie-bios cradle since it's not going to be in hie-bios directly and upload it to hackage. Then the cradle could likely be used in both places, but I think we would still need the logic here. I'll take a look.

In absence of an explicit hie.yaml config the code tries
the hie-bios implicit cradle with a fallback to the
cabal-helper one
@jneira
Copy link
Member Author

jneira commented May 19, 2020

Ok, i've switched the order of the callback: now the code tries the default hie-bios implicit cradle and then the cabal-helper.
@Avi-D-coder if you have planned add a cradle to implicit-hie, i would wait for a lib version with it included and we should only replace the hie-bios one with yours
Afaiu, the cradles are already being loaded for each file, and each one could be loaded by a diff cradle so the fallback is computed for each file on demand:

putStrLn $ "Consulting the cradle for " <> show file
cradle <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle hieYaml
eopts <- cradleToSessionOpts cradle cfp
print eopts
case eopts of
Right opts -> do
(cs, res) <- session (hieYaml, toNormalizedFilePath' cfp, opts)
signalBarrier finished_barrier (cs, fst res)
Left err -> do
dep_info <- getDependencyInfo ([fp | Just fp <- [hieYaml]])
let ncfp = toNormalizedFilePath' cfp
let res = (map (renderCradleError ncfp) err, Nothing)
modifyVar_ fileToFlags $ \var -> do
pure $ Map.insertWith HM.union hieYaml (HM.singleton ncfp (res, dep_info)) var
signalBarrier finished_barrier ([(ncfp, (res, dep_info) )], res)

I've tested the code in hls itself where the implicit hie-bios cradle fails:

  • hls.log:
haskell-lsp:Starting up server ...
2020-05-19 15:18:50.3282882 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":13156,"clientInfo":{"name":"vscode","version":"1.45.0"},"rootPath":"d:\\dev\\ws\\haskell\\hls","rootUri":"file:///d%3A/dev/ws/haskell/hls","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:///d%3A/dev/ws/haskell/hls","name":"hls"}]}}
2020-05-19 15:18:50.3312851 [ThreadId 4] - haskell-lsp:initializeRequestHandler: setting current dir to project root:d:\dev\ws\haskell\hls
2020-05-19 15:18:50.3332899 [ThreadId 6] - <--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":["17924:ghcide:typesignature.add","17924:pragmas:addPragma"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":false},"codeLensProvider":{},"documentSymbolProvider":true,"documentFormattingProvider":true}},"jsonrpc":"2.0","id":0}
2020-05-19 15:18:50.3532838 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}}
2020-05-19 15:18:50.3532838 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"languageServerHaskell":{"hlintOn":true,"maxNumberOfProblems":100,"diagnosticsOnChange":true,"liquidOn":false,"completionSnippetsOn":true,"formatOnImportOn":true,"formattingProvider":"floskell","showTypeForSelection":{"onHover":true,"command":{"location":"dropdown"}},"trace":{"server":"messages"},"logFile":"C:\\TEMP\\hls.log","hieVariant":"haskell-language-server","hieExecutablePath":"","enableHIE":true}}}}
2020-05-19 15:18:50.3542945 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///d%3A/dev/ws/haskell/hls/src/Ide/Cradle.hs","languageId":"haskell","version":1,"text":"{-# LANGUAGE OverloadedStrings #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE NamedFieldPuns #-}\r\n{-# LANGUAGE LambdaCase #-}\r\n{-# LANGUAGE GADTs #-}\r\n\r\nmodule Ide.Cradle where\r\n\r\nimport           Control.Exception\r\nimport           Data.Foldable (toList)\r\nimport           Data.Function ((&))\r\nimport           Data.List (isPrefixOf, sortOn, find)\r\nimport           Data.List.NonEmpty (NonEmpty)\r\nimport qualified Data.List.NonEmpty as NonEmpty\r\nimport qualified Data.Map as Map\r\nimport           Data.Maybe (listToMaybe, mapMaybe, isJust)\r\nimport           Data.Ord (Down(..))\r\nimport           Data.String (IsString(..))\r\nimport qualified Data.Text as T\r\nimport           Distribution.Helper (Package, projectPackages, pUnits,\r\n                                      pSourceDir, ChComponentInfo(..),\r\n                                      unChModuleName, Ex(..), ProjLoc(..),\r\n                                      QueryEnv, mkQueryEnv, runQuery,\r\n                                      Unit, unitInfo, uiComponents,\r\n                                      ChEntrypoint(..), UnitInfo(..))\r\nimport           Distribution.Helper.Discover (findProjects, getDefaultDistDir)\r\nimport           Ide.Logger\r\nimport           HIE.Bios as Bios\r\nimport qualified HIE.Bios.Cradle as Bios\r\nimport           HIE.Bios.Types (CradleAction(..))\r\nimport qualified HIE.Bios.Types as Bios\r\nimport           System.Directory (getCurrentDirectory, canonicalizePath, findExecutable)\r\nimport           System.Exit\r\nimport           System.FilePath\r\nimport           System.Process (readCreateProcessWithExitCode, shell, CreateProcess(..))\r\nimport Exception (tryIO)\r\n\r\n\r\n-- ---------------------------------------------------------------------\r\n\r\n-- | Find the cradle that the given File belongs to.\r\n--\r\n-- First looks for a \"hie.yaml\" file in the directory of the file\r\n-- or one of its parents. If this file is found, the cradle\r\n-- is read from the config. If this config does not comply to the \"hie.yaml\"\r\n-- specification, an error is raised.\r\n--\r\n-- If no \"hie.yaml\" can be found, the implicit config is used.\r\n-- The implicit config uses different heuristics to determine the type\r\n-- of the project that may or may not be accurate.\r\nfindLocalCradle :: FilePath -> IO (Cradle CabalHelper)\r\nfindLocalCradle fp = do\r\n  cradleConf <- Bios.findCradle fp\r\n  crdl       <- case cradleConf of\r\n    Just yaml -> do\r\n      debugm $ \"Found \\\"\" ++ yaml ++ \"\\\" for \\\"\" ++ fp ++ \"\\\"\"\r\n      crdl <- Bios.loadCradle yaml\r\n      return $ fmap (const CabalNone) crdl\r\n    Nothing -> cabalHelperCradle fp\r\n  logm $ \"Module \\\"\" ++ fp ++ \"\\\" is loaded by Cradle: \" ++ show crdl\r\n  return crdl\r\n\r\nimplicitCradle :: FilePath -> IO (Cradle CabalHelper)\r\nimplicitCradle fp = cradleFallback main fallback\r\n  where main = loadImplicitCradle fp\r\n        fallback = cabalHelperCradle fp\r\n\r\ncradleFallback :: IO (Cradle CabalHelper) -> IO (Cradle CabalHelper) -> IO (Cradle CabalHelper)\r\ncradleFallback mainCradle fallbackCradle = do\r\n  crd@Cradle\r\n    { cradleOptsProg = CradleAction { actionName = mActionName, runCradle = mRunCradle}\r\n    } <- mainCradle\r\n  Cradle\r\n    { cradleOptsProg = CradleAction { actionName = fbActionName, runCradle = fbRunCradle}\r\n    } <- fallbackCradle\r\n  return $ crd {\r\n    cradleOptsProg =\r\n      CradleAction\r\n        { actionName = mActionName\r\n        , runCradle = \\logF fp -> do\r\n            let fallback errMsg = do\r\n                  warningm $ \"Error loading \" ++ cradleDisplay crd\r\n                          ++ \" using cradle action \" ++ show mActionName ++ \": \" ++ errMsg\r\n                  warningm $ \"Fallback to cradle action \" ++ show fbActionName\r\n                  fbRes <- fbRunCradle logF fp\r\n                  return fbRes\r\n            res <- tryIO $ mRunCradle logF fp\r\n            case res of\r\n              Left x -> fallback (show x)\r\n              Right (CradleFail (CradleError _ex stde)) -> fallback (unlines stde)\r\n              Right chRes -> return chRes\r\n        }\r\n  }\r\n\r\n-- | Check if the given cradle is a stack cradle.\r\n-- This might be used to determine the GHC version to use on the project.\r\n-- If it is a stack-cradle, we have to use @\"stack path --compiler-exe\"@\r\n-- otherwise we may ask `ghc` directly what version it is.\r\nisStackCradle :: Cradle CabalHelper -> Bool\r\nisStackCradle crdl = Bios.isStackCradle crdl || cabalHelperStackCradle crdl\r\n where\r\n  cabalHelperStackCradle =\r\n    (`elem` [Bios.Other Stack, Bios.Other StackNone])\r\n      . Bios.actionName\r\n      . Bios.cradleOptsProg\r\n\r\n\r\n-- | Check if the given cradle is a cabal cradle.\r\n-- This might be used to determine the GHC version to use on the project.\r\n-- If it is a stack-cradle, we have to use @\"stack path --compiler-exe\"@\r\n-- otherwise we may ask @ghc@ directly what version it is.\r\nisCabalCradle :: Cradle CabalHelper -> Bool\r\nisCabalCradle crdl = Bios.isCabalCradle crdl || cabalHelperCabalCradle crdl\r\n where\r\n  cabalHelperCabalCradle =\r\n    (`elem` [Bios.Other CabalV2, Bios.Other CabalNone])\r\n      . Bios.actionName\r\n      . Bios.cradleOptsProg\r\n\r\ndata CabalHelper\r\n  = Stack\r\n  | StackNone\r\n  | CabalV2\r\n  | CabalNone\r\n  deriving (Show, Eq, Ord)\r\n\r\n-- | Execute @ghc@ that is based on the given cradle.\r\n-- Output must be a single line. If an error is raised, e.g. the command\r\n-- failed, a 'Nothing' is returned.\r\n-- The exact error is written to logs.\r\n--\r\n-- E.g. for a stack cradle, we use @stack ghc@ and for a cabal cradle\r\n-- we are taking the @ghc@ that is on the path.\r\nexecProjectGhc :: Cradle CabalHelper -> [String] -> IO (Maybe String)\r\nexecProjectGhc crdl args = do\r\n  isStackInstalled <- isJust <$> findExecutable \"stack\"\r\n  -- isCabalInstalled <- isJust <$> findExecutable \"cabal\"\r\n  ghcOutput <- if isStackCradle crdl && isStackInstalled\r\n    then do\r\n      logm $ \"Executing Stack GHC with args: \" <> unwords args\r\n      catch (Just <$> tryCommand crdl stackCmd) $ \\(_ :: IOException) -> do\r\n        errorm $ \"Command `\" ++ stackCmd ++\"` failed.\"\r\n        execWithGhc\r\n    -- The command `cabal v2-exec -v0 ghc` only works if the project has been\r\n    -- built already.\r\n    -- This command must work though before the project is build.\r\n    -- Therefore, fallback to \"ghc\" on the path.\r\n    --\r\n    -- else if isCabalCradle crdl && isCabalInstalled then do\r\n    --   let cmd = \"cabal v2-exec -v0 ghc -- \" ++ unwords args\r\n    --   catch (Just <$> tryCommand crdl cmd) $ \\(_ ::IOException) -> do\r\n    --     errorm $ \"Command `\" ++ cmd ++ \"` failed.\"\r\n    --     return Nothing\r\n    else do\r\n      logm $ \"Executing GHC on path with args: \" <> unwords args\r\n      execWithGhc\r\n  debugm $ \"GHC Output: \\\"\" ++ show ghcOutput ++ \"\\\"\"\r\n  return ghcOutput\r\n  where\r\n    stackCmd = \"stack ghc -- \" ++ unwords args\r\n    plainCmd = \"ghc \" ++ unwords args\r\n\r\n    execWithGhc =\r\n      catch (Just <$> tryCommand crdl plainCmd) $ \\(_ :: IOException) -> do\r\n        errorm $ \"Command `\" ++ plainCmd ++\"` failed.\"\r\n        return Nothing\r\n\r\ntryCommand :: Cradle CabalHelper -> String -> IO String\r\ntryCommand crdl cmd = do\r\n  let p = (shell cmd) { cwd = Just (cradleRootDir crdl) }\r\n  (code, sout, serr) <- readCreateProcessWithExitCode p \"\"\r\n  case code of\r\n    ExitFailure e -> do\r\n      let errmsg = concat\r\n            [ \"`\"\r\n            , cmd\r\n            , \"`: Exit failure: \"\r\n            , show e\r\n            , \", stdout: \"\r\n            , sout\r\n            , \", stderr: \"\r\n            , serr\r\n            ]\r\n      errorm errmsg\r\n      throwIO $ userError errmsg\r\n\r\n    ExitSuccess -> return $ T.unpack . T.strip . head . T.lines $ T.pack sout\r\n\r\n\r\n-- | Get the directory of the libdir based on the project ghc.\r\ngetProjectGhcLibDir :: Cradle CabalHelper -> IO (Maybe FilePath)\r\ngetProjectGhcLibDir crdl =\r\n  execProjectGhc crdl [\"--print-libdir\"] >>= \\case\r\n    Nothing -> do\r\n      errorm \"Could not obtain the libdir.\"\r\n      return Nothing\r\n    mlibdir -> return mlibdir\r\n\r\n  -- ---------------------------------------------------------------------\r\n\r\n\r\n{- | Finds a Cabal v2-project, Cabal v1-project or a Stack project\r\nrelative to the given FilePath.\r\nCabal v2-project and Stack have priority over Cabal v1-project.\r\nThis entails that if a Cabal v1-project can be identified, it is\r\nfirst checked whether there are Stack projects or Cabal v2-projects\r\nbefore it is concluded that this is the project root.\r\nCabal v2-projects and Stack projects are equally important.\r\nDue to the lack of user-input we have to guess which project it\r\nshould rather be.\r\nThis guessing has no guarantees and may change at any time.\r\n\r\n=== Example:\r\n\r\nAssume the following project structure:\r\n\r\n@\r\n  /\r\n  └── Foo/\r\n      ├── Foo.cabal\r\n      ├── stack.yaml\r\n      ├── cabal.project\r\n      ├── src\r\n      │   └── Lib.hs\r\n      └── B/\r\n          ├── B.cabal\r\n          └── src/\r\n              └── Lib2.hs\r\n@\r\n\r\nAssume the call @findCabalHelperEntryPoint \"\\/Foo\\/B\\/src\\/Lib2.hs\"@.\r\nWe now want to know to which project \"\\/Foo\\/B\\/src\\/Lib2.hs\" belongs to\r\nand what the projects root is. If we only do a naive search to find the\r\nfirst occurrence of either \"B.cabal\", \"stack.yaml\", \"cabal.project\"\r\nor \"Foo.cabal\", we might assume that the location  of \"B.cabal\" marks\r\nthe project's root directory of which \"\\/Foo\\/B\\/src\\/Lib2.hs\" is part of.\r\nHowever, there is also a \"cabal.project\" and \"stack.yaml\" in the parent\r\ndirectory, which add the package @B@ as a package.\r\nSo, the compilation of the package @B@, and the file \"src\\/Lib2.hs\" in it,\r\ndoes not only depend on the definitions in \"B.cabal\", but also\r\non \"stack.yaml\" and \"cabal.project\".\r\nThe project root is therefore \"\\/Foo\\/\".\r\nOnly if there is no \"stack.yaml\" or \"cabal.project\" in any of the ancestor\r\ndirectories, it is safe to assume that \"B.cabal\" marks the root of the project.\r\n\r\nThus:\r\n\r\n>>> findCabalHelperEntryPoint \"/Foo/B/src/Lib2.hs\r\nJust (Ex (ProjLocStackYaml { plStackYaml = \"/Foo/\"}))\r\n\r\nor\r\n\r\n>>> findCabalHelperEntryPoint \"/Foo/B/src/Lib2.hs\"\r\nJust (Ex (ProjLocV2File { plProjectDirV2 = \"/Foo/\"}))\r\n\r\nIn the given example, it is not guaranteed which project type is found,\r\nit is only guaranteed that it will not identify the project\r\nas a cabal v1-project. Note that with cabal-helper version (1.0),\r\nby default a *.cabal file is identified as a 'ProjLocV2Dir' project.\r\nThe same issue as before exists and we look for a 'ProjLocV2File' or\r\n'ProjLocStackYaml' before deciding that 'ProjLocV2Dir' marks the project root.\r\n\r\nNote that this will not return any project types for which the corresponding\r\nbuild tool is not on the PATH. This is \"stack\" and \"cabal\" for stack and cabal\r\n(both v1 and v2) projects respectively.\r\n-}\r\nfindCabalHelperEntryPoint :: FilePath -> IO (Maybe (Ex ProjLoc))\r\nfindCabalHelperEntryPoint fp = do\r\n  allProjs <- concat <$> mapM findProjects (ancestors (takeDirectory fp))\r\n\r\n  debugm $ \"Cabal-Helper found these projects: \" ++ show (map (\\(Ex x) -> show x) allProjs)\r\n\r\n  -- We only want to return projects that we have the build tools installed for\r\n  isStackInstalled <- isJust <$> findExecutable \"stack\"\r\n  isCabalInstalled <- isJust <$> findExecutable \"cabal\"\r\n  let supportedProjs = filter (\\x -> supported x isStackInstalled isCabalInstalled) allProjs\r\n  debugm $ \"These projects have the build tools installed: \" ++ show (map (\\(Ex x) -> show x) supportedProjs)\r\n\r\n  case filter (\\p -> isCabalV2FileProject p || isStackProject p) supportedProjs of\r\n    (x:_) -> return $ Just x\r\n    []    -> case filter isCabalProject supportedProjs of\r\n      (x:_) -> return $ Just x\r\n      []    -> return Nothing\r\n    where\r\n      supported :: Ex ProjLoc -> Bool -> Bool -> Bool\r\n      supported (Ex ProjLocStackYaml {}) stackInstalled _ = stackInstalled\r\n      supported (Ex ProjLocV2Dir {}) _ cabalInstalled = cabalInstalled\r\n      supported (Ex ProjLocV2File {}) _ cabalInstalled = cabalInstalled\r\n      supported (Ex ProjLocV1Dir {}) _ cabalInstalled = cabalInstalled\r\n      supported (Ex ProjLocV1CabalFile {}) _ cabalInstalled = cabalInstalled\r\n\r\nisStackProject :: Ex ProjLoc -> Bool\r\nisStackProject (Ex ProjLocStackYaml {}) = True\r\nisStackProject _ = False\r\n\r\nisCabalV2FileProject :: Ex ProjLoc -> Bool\r\nisCabalV2FileProject (Ex ProjLocV2File {}) = True\r\nisCabalV2FileProject _ = False\r\n\r\nisCabalProject :: Ex ProjLoc -> Bool\r\nisCabalProject (Ex ProjLocV1CabalFile {}) = True\r\nisCabalProject (Ex ProjLocV1Dir {}) = True\r\nisCabalProject (Ex ProjLocV2File {}) = True\r\nisCabalProject (Ex ProjLocV2Dir {}) = True\r\nisCabalProject _ = False\r\n\r\n{- | Given a FilePath, find the cradle the FilePath belongs to.\r\n\r\nFinds the Cabal Package the FilePath is most likely a part of\r\nand creates a cradle whose root directory is the directory\r\nof the package the File belongs to.\r\n\r\nIt is not required that the FilePath given actually exists. If it does not\r\nexist or is not part of any of the packages in the project, a \"None\"-cradle is\r\nproduced.\r\nSee <https://github.com/mpickering/hie-bios> for what a \"None\"-cradle is.\r\nThe \"None\"-cradle can still be used to query for basic information, such as\r\nthe GHC version used to build the project. However, it can not be used to\r\nload any of the files in the project.\r\n\r\n== General Approach\r\n\r\nGiven a FilePath that we want to load, we need to create a cradle\r\nthat can compile and load the given FilePath.\r\nIn Cabal-Helper, there is no notion of a cradle, but a project\r\nconsists of multiple packages that contain multiple units.\r\nEach unit may consist of multiple components.\r\nA unit is the smallest part of code that Cabal (the library) can compile.\r\nExamples are executables, libraries, tests or benchmarks are all units.\r\nEach of this units has a name that is unique within a build-plan,\r\nsuch as \"exe:hie\" which represents the executable of the Haskell IDE Engine.\r\n\r\nIn principle, a unit is what hie-bios considers to be a cradle.\r\nHowever, to find out to which unit a FilePath belongs, we have to initialise\r\nthe unit, e.g. configure its dependencies and so on. When discovering a cradle\r\nwe do not want to pay for this upfront, but rather when we actually want to\r\nload a Module in the project. Therefore, we only identify the package the\r\nFilePath is part of and decide which unit to load when 'runCradle' is executed.\r\n\r\nThus, to find the options required to compile and load the given FilePath,\r\nwe have to do the following:\r\n\r\n  1. Identify the package that contains the FilePath (should be unique)\r\n     Happens in 'cabalHelperCradle'\r\n  2. Find the unit that that contains the FilePath (May be non-unique)\r\n     Happens in 'cabalHelperAction'\r\n  3. Find the component that exposes the FilePath (May be non-unique)\r\n     Happens in 'cabalHelperAction'\r\n\r\n=== Identify the package that contains the FilePath\r\n\r\nThe function 'cabalHelperCradle' does the first step only.\r\nIt starts by querying Cabal-Helper to find the project's root.\r\nSee 'findCabalHelperEntryPoint' for details how this is done.\r\nOnce the root of the project is defined, we query Cabal-Helper for all packages\r\nthat are defined in the project and match by the packages source directory\r\nwhich package the given FilePath is most likely to be a part of.\r\nE.g. if the source directory of the package is the most concrete\r\nprefix of the FilePath, the FilePath is in that package.\r\nAfter the package is identified, we create a cradle where cradle's root\r\ndirectory is set to the package's source directory. This is necessary,\r\nbecause compiler options obtained from a component, are relative\r\nto the source directory of the package the component is part of.\r\n\r\n=== Find the unit that that contains the FilePath\r\n\r\nIn 'cabalHelperAction' we want to load a given FilePath, already knowing\r\nwhich package the FilePath is part of. Now we obtain all Units that are part\r\nof the package and match by the source directories (plural is intentional),\r\nto which unit the given FilePath most likely belongs to. If no unit can be\r\nobtained, e.g. for every unit, no source directory is a prefix of the FilePath,\r\nwe return an error code, since this is not allowed to happen.\r\nIf there are multiple matches, which is possible, we check whether any of the\r\ncomponents defined in the unit exposes or defines the given FilePath as a module.\r\n\r\n=== Find the component that exposes the FilePath\r\n\r\nA component defines the options that are necessary to compile a FilePath that\r\nis in the component. It also defines which modules are in the component.\r\nTherefore, we translate the given FilePath into a module name, relative to\r\nthe unit's source directory, and check if the module name is exposed by the\r\ncomponent. There is a special case, executables define a FilePath, for the\r\nfile that contains the 'main'-function, that is relative to the unit's source\r\ndirectory.\r\n\r\nAfter the component has been identified, we can actually retrieve the options\r\nrequired to load and compile the given file.\r\n\r\n== Examples\r\n\r\n=== Mono-Repo\r\n\r\nAssume the project structure:\r\n\r\n@\r\n  /\r\n  └── Mono/\r\n      ├── cabal.project\r\n      ├── stack.yaml\r\n      ├── A/\r\n      │   ├── A.cabal\r\n      │   └── Lib.hs\r\n      └── B/\r\n          ├── B.cabal\r\n          └── Exe.hs\r\n@\r\n\r\nCurrently, Haskell IDE Engine needs to know on startup which GHC version is\r\nneeded to compile the project. This information is needed to show warnings to\r\nthe user if the GHC version on the project does not agree with the GHC version\r\nthat was used to compile Haskell IDE Engine.\r\n\r\nTherefore, the function 'findLocalCradle' is invoked with a dummy FilePath,\r\nsuch as \"\\/Mono\\/Lib.hs\". Since there will be no package that contains this\r\ndummy FilePath, the result will be a None-cradle.\r\n\r\nEither\r\n\r\n>>> findLocalCradle \"/Mono/Lib.hs\"\r\nCradle { cradleRootDir = \"/Mono/\", CradleAction { actionName = \"Cabal-Helper-Stack-None\", ..} }\r\n\r\nor\r\n\r\n>>> findLocalCradle \"/Mono/Lib.hs\"\r\nCradle { cradleRootDir = \"/Mono/\", CradleAction { actionName = \"Cabal-Helper-Cabal-V2-None\", ..} }\r\n\r\nThe cradle result of this invocation is only used to obtain the GHC version,\r\nwhich is safe, since it only checks if the cradle is a 'stack' project or\r\na 'cabal' project.\r\n\r\n\r\nIf we are trying to load the executable:\r\n\r\n>>> findLocalCradle \"/Mono/B/Exe.hs\"\r\nCradle { cradleRootDir = \"/Mono/\", CradleAction { actionName = \"Cabal-Helper-Cabal-V2\", ..} }\r\n\r\nwe will detect correctly the compiler options, by first finding the appropriate\r\npackage, followed by traversing the units in the package and finding the\r\ncomponent that exposes the executable by FilePath.\r\n\r\n=== No explicit executable folder\r\n\r\nAssume the project structure:\r\n\r\n@\r\n  /\r\n  └── Library/\r\n      ├── cabal.project\r\n      ├── stack.yaml\r\n      ├── Library.cabal\r\n      └── src\r\n          ├── Lib.hs\r\n          └── Exe.hs\r\n@\r\n\r\nThere are different dependencies for the library \"Lib.hs\" and the\r\nexecutable \"Exe.hs\". If we are trying to load the executable \"src\\/Exe.hs\"\r\nwe will correctly identify the executable unit, and correctly initialise\r\ndependencies of \"exe:Library\".\r\nIt will be correct even if we load the unit \"lib:Library\" before\r\nthe \"exe:Library\" because the unit \"lib:Library\" does not expose\r\na module @\"Exe\"@.\r\n\r\n=== Sub package\r\n\r\nAssume the project structure:\r\n\r\n@\r\n  /\r\n  └── Repo/\r\n      ├── cabal.project\r\n      ├── stack.yaml\r\n      ├── Library.cabal\r\n      ├── src\r\n      |   └── Lib.hs\r\n      └── SubRepo\r\n          ├── SubRepo.cabal\r\n          └── Lib2.hs\r\n@\r\n\r\nWhen we try to load \"\\/Repo\\/SubRepo\\/Lib2.hs\", we need to identify root\r\nof the project, which is \"\\/Repo\\/\" but set the root directory of the cradle\r\nresponsible to load \"\\/Repo\\/SubRepo\\/Lib2.hs\" to \"\\/Repo\\/SubRepo\", since\r\nthe compiler options obtained from Cabal-Helper are relative to the package\r\nsource directory, which is \"\\/Repo\\/SubRepo\".\r\n\r\n-}\r\ncabalHelperCradle :: FilePath -> IO (Cradle CabalHelper)\r\ncabalHelperCradle file = do\r\n  projM <- findCabalHelperEntryPoint file\r\n  case projM of\r\n    Nothing        -> do\r\n      errorm $ \"Could not find a Project for file: \" ++ file\r\n      cwd <- getCurrentDirectory\r\n      return\r\n        Cradle { cradleRootDir = cwd\r\n               , cradleOptsProg =\r\n                   CradleAction { actionName = Bios.Direct\r\n                                , runCradle = \\_ _ ->\r\n                                      return\r\n                                      $ CradleSuccess\r\n                                        ComponentOptions\r\n                                          { componentOptions = [file, fixImportDirs cwd \"-i.\"]\r\n                                          , componentRoot = cwd\r\n                                          , componentDependencies = []\r\n                                          }\r\n                                }\r\n               }\r\n    Just (Ex proj) -> do\r\n      logm $ \"Cabal-Helper decided to use: \" ++ show proj\r\n      -- Find the root of the project based on project type.\r\n      let root = projectRootDir proj\r\n      -- Create a suffix for the cradle name.\r\n      -- Purpose is mainly for easier debugging.\r\n      let actionNameSuffix = projectType proj\r\n      debugm $ \"Cabal-Helper dirs: \" ++ show [root, file]\r\n      let dist_dir = getDefaultDistDir proj\r\n      env <- mkQueryEnv proj dist_dir\r\n      packages <- runQuery projectPackages env\r\n      -- Find the package the given file may belong to.\r\n      -- If it does not belong to any package, create a none-cradle.\r\n      -- We might want to find a cradle without actually loading anything.\r\n      -- Useful if we only want to determine a ghc version to use.\r\n      case packages `findPackageFor` file of\r\n        Nothing          -> do\r\n          debugm $ \"Could not find a package for the file: \" ++ file\r\n          debugm\r\n            \"This is perfectly fine if we only want to determine the GHC version.\"\r\n          return\r\n            Cradle { cradleRootDir = root\r\n                   , cradleOptsProg =\r\n                       CradleAction { actionName = Bios.Other (projectNoneType proj)\r\n                                    , runCradle = \\_ _ -> return CradleNone\r\n                                    }\r\n                   }\r\n        Just realPackage -> do\r\n          debugm $ \"Cabal-Helper cradle package: \" ++ show realPackage\r\n          -- Field `pSourceDir` often has the form `<cwd>/./plugin`\r\n          -- but we only want `<cwd>/plugin`\r\n          normalisedPackageLocation <- canonicalizePath $ pSourceDir realPackage\r\n          debugm\r\n            $ \"Cabal-Helper normalisedPackageLocation: \"\r\n            ++ normalisedPackageLocation\r\n          return\r\n            Cradle { cradleRootDir = normalisedPackageLocation\r\n                   , cradleOptsProg =\r\n                       CradleAction { actionName = Bios.Other actionNameSuffix\r\n                                    , runCradle = \\_ fp -> cabalHelperAction\r\n                                        (Ex proj)\r\n                                        env\r\n                                        realPackage\r\n                                        normalisedPackageLocation\r\n                                        fp\r\n                                    }\r\n                   }\r\n\r\n-- | Cradle Action to query for the ComponentOptions that are needed\r\n-- to load the given FilePath.\r\n-- This Function is not supposed to throw any exceptions and use\r\n-- 'CradleLoadResult' to indicate errors.\r\ncabalHelperAction :: Ex ProjLoc -- ^ Project location, can be used\r\n                                -- to present build-tool\r\n                                -- agnostic error messages.\r\n                  -> QueryEnv v -- ^ Query Env created by 'mkQueryEnv'\r\n                                -- with the appropriate 'distdir'\r\n                  -> Package v -- ^ Package this cradle is part for.\r\n                  -> FilePath -- ^ Root directory of the cradle\r\n                              -- this action belongs to.\r\n                  -> FilePath -- ^ FilePath to load, expected to be an absolute path.\r\n                  -> IO (CradleLoadResult ComponentOptions)\r\ncabalHelperAction proj env package root fp = do\r\n  -- Get all unit infos the given FilePath may belong to\r\n  let units = pUnits package\r\n  -- make the FilePath to load relative to the root of the cradle.\r\n  let relativeFp = makeRelative root fp\r\n  debugm $ \"Relative Module FilePath: \" ++ relativeFp\r\n  getComponent proj env (toList units) relativeFp\r\n    >>= \\case\r\n      Right comp -> do\r\n        let fs' = getFlags comp\r\n        let fs = map (fixImportDirs root) fs'\r\n        let targets = getTargets comp relativeFp\r\n        let ghcOptions = fs ++ targets\r\n        debugm $ \"Flags for \\\"\" ++ fp ++ \"\\\": \" ++ show ghcOptions\r\n        debugm $ \"Component Infos: \" ++ show comp\r\n        return\r\n          $ CradleSuccess\r\n            ComponentOptions { componentOptions = ghcOptions\r\n                             , componentRoot = root\r\n                             , componentDependencies = []\r\n                             }\r\n      Left err   -> return\r\n        $ CradleFail\r\n        $ CradleError\r\n          (ExitFailure 2)\r\n          err\r\n\r\n-- | Fix occurrences of \"-i.\" to \"-i<cradle-root-dir>\"\r\n-- Flags obtained from cabal-helper are relative to the package\r\n-- source directory. This is less resilient to using absolute paths,\r\n-- thus, we fix it here.\r\nfixImportDirs :: FilePath -> String -> String\r\nfixImportDirs base_dir arg =\r\n  if \"-i\" `isPrefixOf` arg\r\n    then let dir = drop 2 arg\r\n    -- the flag \"-i\" has special meaning.\r\n    in if not (null dir) && isRelative dir then (\"-i\" ++ base_dir </> dir)\r\n                              else arg\r\n    else arg\r\n\r\n\r\n-- | Get the component the given FilePath most likely belongs to.\r\n-- Lazily ask units whether the given FilePath is part of one of their\r\n-- component's.\r\n-- If a Module belongs to multiple components, it is not specified which\r\n-- component will be loaded.\r\n-- The given FilePath must be relative to the Root of the project\r\n-- the given units belong to.\r\ngetComponent\r\n  :: forall pt. Ex ProjLoc -> QueryEnv pt -> [Unit pt] -> FilePath -> IO (Either [String] ChComponentInfo)\r\ngetComponent proj env unitCandidates fp = getComponent' [] [] unitCandidates >>=\r\n    \\case\r\n      (tried, failed, Nothing) -> return (Left $ buildErrorMsg tried failed)\r\n      (_, _, Just comp) -> return (Right comp)\r\n  where\r\n    getComponent' :: [UnitInfo] -> [(Unit pt, IOException)] -> [Unit pt] -> IO ([UnitInfo], [(Unit pt, IOException)], Maybe ChComponentInfo)\r\n    getComponent' triedUnits failedUnits [] = return (triedUnits, failedUnits, Nothing)\r\n    getComponent' triedUnits failedUnits (unit : units) =\r\n      try (runQuery (unitInfo unit) env) >>= \\case\r\n        Left (e :: IOException) -> do\r\n          warningm $ \"Catching and swallowing an IOException: \" ++ show e\r\n          warningm\r\n            $  \"The Exception was thrown in the context of finding\"\r\n            ++ \" a component for \\\"\"\r\n            ++ fp\r\n            ++ \"\\\" in the unit: \"\r\n            ++ show unit\r\n          getComponent' triedUnits ((unit, e):failedUnits) units\r\n        Right ui -> do\r\n          let components = Map.elems (uiComponents ui)\r\n          debugm $ \"Unit Info: \" ++ show ui\r\n          case find (fp `partOfComponent`) components of\r\n            Nothing -> getComponent' (ui:triedUnits) failedUnits units\r\n            comp    -> return (triedUnits, failedUnits, comp)\r\n\r\n    buildErrorMsg :: [UnitInfo] -> [(Unit pt, IOException)] -> [String]\r\n    buildErrorMsg triedUnits failedUnits =\r\n        concat\r\n          [ [ \"Could not obtain flags for: \\\"\" ++ fp ++ \"\\\".\"\r\n            , \"\"\r\n            ]\r\n          , concat\r\n            [ concat\r\n              [ [ \"This module was not part of any component we are aware of.\"\r\n                , \"\"\r\n                ]\r\n              , concatMap ppShowUnitInfo triedUnits\r\n              , [ \"\"\r\n                , \"\"\r\n                ]\r\n              , if isStackProject proj\r\n                  then stackSpecificInstructions\r\n                  else cabalSpecificInstructions\r\n              ]\r\n            | not (null triedUnits)\r\n            ]\r\n          , concat\r\n            [\r\n              [ \"We could not build all components.\"\r\n              , \"If one of these components exposes this Module, make sure they compile.\"\r\n              , \"You can try to invoke the commands yourself.\"\r\n              , \"The following commands failed:\"\r\n              ]\r\n              ++ concatMap (ppShowIOException . snd) failedUnits\r\n            | not (null failedUnits)\r\n            ]\r\n        ]\r\n\r\n    stackSpecificInstructions :: [String]\r\n    stackSpecificInstructions =\r\n      [ \"To expose a module, refer to:\"\r\n      , \"https://docs.haskellstack.org/en/stable/GUIDE/\"\r\n      , \"If you are using `package.yaml` then you don't have to manually expose modules.\"\r\n      , \"Maybe you didn't set the source directories for your project correctly.\"\r\n      ]\r\n\r\n    cabalSpecificInstructions :: [String]\r\n    cabalSpecificInstructions =\r\n      [ \"To expose a module, refer to:\"\r\n      , \"https://www.haskell.org/cabal/users-guide/developing-packages.html\"\r\n      , \"\"\r\n      ]\r\n\r\n    ppShowUnitInfo :: UnitInfo -> [String]\r\n    ppShowUnitInfo u =\r\n      u\r\n      & uiComponents\r\n      & Map.toList\r\n      & map\r\n        (\\(name, info) ->\r\n          \"Component: \" ++ show name ++ \" with source directory: \" ++ show (ciSourceDirs info)\r\n        )\r\n\r\n\r\n    ppShowIOException :: IOException -> [String]\r\n    ppShowIOException e =\r\n        [ \"\"\r\n        , show e\r\n        ]\r\n\r\n-- | Check whether the given FilePath is part of the Component.\r\n-- A FilePath is part of the Component if and only if:\r\n--\r\n--   * One Component's 'ciSourceDirs' is a prefix of the FilePath\r\n--   * The FilePath, after converted to a module name,\r\n--     is a in the Component's Targets, or the FilePath is\r\n--     the executable in the component.\r\n--\r\n-- The latter is achieved by making the FilePath relative to the 'ciSourceDirs'\r\n-- and then replacing Path separators with \".\".\r\n-- To check whether the given FilePath is the executable of the Component,\r\n-- we have to check whether the FilePath, including 'ciSourceDirs',\r\n-- is part of the targets in the Component.\r\npartOfComponent ::\r\n  -- | FilePath relative to the package root.\r\n  FilePath ->\r\n  -- | Component to check whether the given FilePath is part of it.\r\n  ChComponentInfo ->\r\n  Bool\r\npartOfComponent fp' comp =\r\n  inTargets (ciSourceDirs comp) fp' (getTargets comp fp')\r\n  where\r\n    -- Check if the FilePath is in an executable or setup's main-is field\r\n    inMainIs :: FilePath -> Bool\r\n    inMainIs fp\r\n      | ChExeEntrypoint mainIs _ <- ciEntrypoints comp = mainIs == fp\r\n      | ChSetupEntrypoint mainIs <- ciEntrypoints comp = mainIs == fp\r\n      | otherwise = False\r\n\r\n    inTargets :: [FilePath] -> FilePath -> [String] -> Bool\r\n    inTargets sourceDirs fp targets =\r\n      let candidates = relativeTo fp sourceDirs\r\n      in any (existsInTargets targets fp) candidates\r\n\r\n    existsInTargets :: [String] -> FilePath -> FilePath -> Bool\r\n    existsInTargets targets absFp relFp = or\r\n        [ any (`elem` targets) [getModuleName relFp, absFp]\r\n        , inMainIs relFp\r\n        ]\r\n\r\n    getModuleName :: FilePath -> String\r\n    getModuleName fp = map\r\n      (\\c -> if isPathSeparator c\r\n            then '.'\r\n            else c)\r\n      (dropExtension fp)\r\n\r\n-- | Get the flags necessary to compile the given component.\r\ngetFlags :: ChComponentInfo -> [String]\r\ngetFlags = ciGhcOptions\r\n\r\n-- | Get all Targets of a Component, since we want to load all components.\r\n-- FilePath is needed for the special case that the Component is an Exe.\r\n-- The Exe contains a Path to the Main which is relative to some entry\r\n-- in 'ciSourceDirs'.\r\n-- We monkey-patch this by supplying the FilePath we want to load,\r\n-- which is part of this component, and select the 'ciSourceDir' we actually want.\r\n-- See the Documentation of 'ciSourceDir' to why this contains multiple entries.\r\ngetTargets :: ChComponentInfo -> FilePath -> [String]\r\ngetTargets comp fp = case ciEntrypoints comp of\r\n  ChSetupEntrypoint {} -> []\r\n  ChLibEntrypoint { chExposedModules, chOtherModules }\r\n    -> map unChModuleName (chExposedModules ++ chOtherModules)\r\n  ChExeEntrypoint { chMainIs, chOtherModules }\r\n    -> [sourceDir </> chMainIs | Just sourceDir <- [sourceDirs]]\r\n    ++ map unChModuleName chOtherModules\r\n    where\r\n      sourceDirs = find (`isFilePathPrefixOf` fp) (ciSourceDirs comp)\r\n\r\n-- | For all packages in a project, find the project the given FilePath\r\n-- belongs to most likely.\r\nfindPackageFor :: NonEmpty (Package pt) -> FilePath -> Maybe (Package pt)\r\nfindPackageFor packages fp = packages\r\n  & NonEmpty.toList\r\n  & sortOn (Down . pSourceDir)\r\n  & filter (\\p -> pSourceDir p `isFilePathPrefixOf` fp)\r\n  & listToMaybe\r\n\r\n\r\nprojectRootDir :: ProjLoc qt -> FilePath\r\nprojectRootDir ProjLocV1CabalFile { plProjectDirV1 } = plProjectDirV1\r\nprojectRootDir ProjLocV1Dir { plProjectDirV1 } = plProjectDirV1\r\nprojectRootDir ProjLocV2File { plProjectDirV2 } = plProjectDirV2\r\nprojectRootDir ProjLocV2Dir { plProjectDirV2 } = plProjectDirV2\r\nprojectRootDir ProjLocStackYaml { plStackYaml } = takeDirectory plStackYaml\r\n\r\nprojectType :: ProjLoc qt -> CabalHelper\r\nprojectType ProjLocV1CabalFile {} = CabalV2\r\nprojectType ProjLocV1Dir {} = CabalV2\r\nprojectType ProjLocV2File {} = CabalV2\r\nprojectType ProjLocV2Dir {} = CabalV2\r\nprojectType ProjLocStackYaml {} = Stack\r\n\r\nprojectNoneType :: ProjLoc qt -> CabalHelper\r\nprojectNoneType ProjLocV1CabalFile {} = CabalNone\r\nprojectNoneType ProjLocV1Dir {} = CabalNone\r\nprojectNoneType ProjLocV2File {} = CabalNone\r\nprojectNoneType ProjLocV2Dir {} = CabalNone\r\nprojectNoneType ProjLocStackYaml {} = StackNone\r\n\r\n-- ----------------------------------------------------------------------------\r\n--\r\n-- Utility functions to manipulate FilePath's\r\n--\r\n-- ----------------------------------------------------------------------------\r\n\r\n-- | Helper function to make sure that both FilePaths are normalised.\r\n-- Checks whether the first FilePath is a Prefix of the second FilePath.\r\n-- Intended usage:\r\n--\r\n-- >>> isFilePathPrefixOf \"./src/\" \"./src/File.hs\"\r\n-- True\r\n--\r\n-- >>> isFilePathPrefixOf \"./src\" \"./src/File.hs\"\r\n-- True\r\n--\r\n-- >>> isFilePathPrefixOf \"./src/././\" \"./src/File.hs\"\r\n-- True\r\n--\r\n-- >>> isFilePathPrefixOf \"./src\" \"./src-dir/File.hs\"\r\n-- False\r\nisFilePathPrefixOf :: FilePath -> FilePath -> Bool\r\nisFilePathPrefixOf dir fp = isJust $ stripFilePath dir fp\r\n\r\n-- | Strip the given directory from the filepath if and only if\r\n-- the given directory is a prefix of the filepath.\r\n--\r\n-- >>> stripFilePath \"app\" \"app/File.hs\"\r\n-- Just \"File.hs\"\r\n--\r\n-- >>> stripFilePath \"src\" \"app/File.hs\"\r\n-- Nothing\r\n--\r\n-- >>> stripFilePath \"src\" \"src-dir/File.hs\"\r\n-- Nothing\r\n--\r\n-- >>> stripFilePath \".\" \"src/File.hs\"\r\n-- Just \"src/File.hs\"\r\n--\r\n-- >>> stripFilePath \"app/\" \"./app/Lib/File.hs\"\r\n-- Just \"Lib/File.hs\"\r\n--\r\n-- >>> stripFilePath \"/app/\" \"./app/Lib/File.hs\"\r\n-- Nothing -- Nothing since '/app/' is absolute\r\n--\r\n-- >>> stripFilePath \"/app\" \"/app/Lib/File.hs\"\r\n-- Just \"Lib/File.hs\"\r\nstripFilePath :: FilePath -> FilePath -> Maybe FilePath\r\nstripFilePath \".\" fp\r\n  | isRelative fp = Just fp\r\n  | otherwise = Nothing\r\nstripFilePath dir' fp'\r\n  | Just relativeFpParts <- splitDir `stripPrefix` splitFp = Just (joinPath relativeFpParts)\r\n  | otherwise = Nothing\r\n  where\r\n    dir = normalise dir'\r\n    fp = normalise fp'\r\n    splitFp = splitPath fp\r\n    splitDir = splitPath dir\r\n    stripPrefix (x:xs) (y:ys)\r\n      | x `equalFilePath` y = stripPrefix xs ys\r\n      | otherwise = Nothing\r\n    stripPrefix [] ys = Just ys\r\n    stripPrefix _ [] = Nothing\r\n\r\n-- | Obtain all ancestors from a given directory.\r\n--\r\n-- >>> ancestors \"a/b/c/d/e\"\r\n-- [ \"a/b/c/d/e\", \"a/b/c/d\", \"a/b/c\", \"a/b\", \"a\", \".\" ]\r\n--\r\n-- >>> ancestors \"/a/b/c/d/e\"\r\n-- [ \"/a/b/c/d/e\", \"/a/b/c/d\", \"/a/b/c\", \"/a/b\", \"/a\", \"/\" ]\r\n--\r\n-- >>> ancestors \"/a/b.hs\"\r\n-- [ \"/a/b.hs\", \"/a\", \"/\" ]\r\n--\r\n-- >>> ancestors \"a/b.hs\"\r\n-- [ \"a/b.hs\", \"a\", \".\" ]\r\n--\r\n-- >>> ancestors \"a/b/\"\r\n-- [ \"a/b\" ]\r\nancestors :: FilePath -> [FilePath]\r\nancestors dir\r\n  | subdir `equalFilePath` dir = [dir]\r\n  | otherwise = dir : ancestors subdir\r\n  where\r\n    subdir = takeDirectory dir\r\n\r\n-- | Assuming a FilePath @\"src\\/Lib\\/Lib.hs\"@ and a list of directories\r\n-- such as @[\"src\", \"app\"]@, returns the given FilePath\r\n-- with a matching directory stripped away.\r\n-- If there are multiple matches, e.g. multiple directories are a prefix\r\n-- of the given FilePath we return all matches.\r\n-- Returns an empty list if no prefix matches the given FilePath.\r\n--\r\n-- >>> relativeTo \"src/Lib/Lib.hs\" [\"src\"]\r\n-- [\"Lib/Lib.hs\"]\r\n--\r\n-- >>> relativeTo \"src/Lib/Lib.hs\" [\"app\"]\r\n-- []\r\n--\r\n-- >>> relativeTo \"src/Lib/Lib.hs\" [\"src\", \"src/Lib\"]\r\n-- [\"Lib/Lib.hs\", \"Lib.hs\"]\r\nrelativeTo :: FilePath -> [FilePath] -> [FilePath]\r\nrelativeTo file sourceDirs =\r\n  mapMaybe (`stripFilePath` file) sourceDirs\r\n\r\n-- | Returns a user facing display name for the cradle type,\r\n-- e.g. \"Stack project\" or \"GHC session\"\r\ncradleDisplay :: IsString a => Cradle CabalHelper -> a\r\ncradleDisplay cradle = fromString result\r\n where\r\n  result\r\n    | Bios.isStackCradle cradle\r\n      ||     name\r\n      `elem` [Bios.Other Stack, Bios.Other StackNone]\r\n    = \"Stack project\"\r\n    | Bios.isCabalCradle cradle\r\n      ||     name\r\n      `elem` [Bios.Other CabalV2, Bios.Other CabalNone]\r\n    = \"Cabal project\"\r\n    | Bios.isDirectCradle cradle\r\n    = \"GHC session\"\r\n    | Bios.isMultiCradle cradle\r\n    = \"Multi Component project\"\r\n    | otherwise\r\n    = \"project\"\r\n  name = Bios.actionName (Bios.cradleOptsProg cradle)\r\n\r\n-- ---------------------------------------------------------------------\r\n"}}}
2020-05-19 15:18:50.3722839 [ThreadId 8] - Set files of interest to: [NormalizedFilePath "D:\\dev\\ws\\haskell\\hls\\src\\Ide\\Cradle.hs"]
2020-05-19 15:18:50.3722839 [ThreadId 8] - Opened text document: file:///d%3A/dev/ws/haskell/hls/src/Ide/Cradle.hs
2020-05-19 15:18:50.3722839 [ThreadId 7] - Starting: (1,0):[DelayedAction: OfInterest]
2020-05-19 15:18:50.396288 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///d%3A/dev/ws/haskell/hls/src/Ide/Cradle.hs"}}}
2020-05-19 15:18:50.4022825 [ThreadId 25] - Cabal-Helper found these projects: ["ProjLocV2File {plCabalProjectFile = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\\\\cabal.project\", plProjectDirV2 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}","ProjLocStackYaml {plStackYaml = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\\\\stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}","ProjLocV1Dir {plProjectDirV1 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}"]
2020-05-19 15:18:50.4032836 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":2,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///d%3A/dev/ws/haskell/hls/src/Ide/Cradle.hs"},"range":{"start":{"line":83,"character":55},"end":{"line":83,"character":55}},"context":{"diagnostics":[]}}}
2020-05-19 15:18:50.4042828 [ThreadId 25] - These projects have the build tools installed: ["ProjLocV2File {plCabalProjectFile = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\\\\cabal.project\", plProjectDirV2 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}","ProjLocStackYaml {plStackYaml = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\\\\stack.yaml\"}","ProjLocV2Dir {plProjectDirV2 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}","ProjLocV1Dir {plProjectDirV1 = \"D:\\\\dev\\\\ws\\\\haskell\\\\hls\"}"]
2020-05-19 15:18:50.4042828 [ThreadId 6] - <--2--{"result":[],"jsonrpc":"2.0","id":1}
2020-05-19 15:18:50.4052878 [ThreadId 25] - Cabal-Helper decided to use: ProjLocV2File {plCabalProjectFile = "D:\\dev\\ws\\haskell\\hls\\cabal.project", plProjectDirV2 = "D:\\dev\\ws\\haskell\\hls"}
2020-05-19 15:18:50.4052878 [ThreadId 25] - Cabal-Helper dirs: ["D:\\dev\\ws\\haskell\\hls","D:\\dev\\ws\\haskell\\hls\\src\\Ide\\Cradle.hs"]
2020-05-19 15:18:50.4752891 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"token":"2"},"method":"window/workDoneProgress/create","id":0}
2020-05-19 15:18:50.476284 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","title":"Processing"},"token":"2"},"method":"$/progress"}
2020-05-19 15:18:50.4832861 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"result":null}
2020-05-19 15:18:50.4842882 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":null}"
2020-05-19 15:18:50.5762826 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"1/2"},"token":"2"},"method":"$/progress"}
2020-05-19 15:18:50.6262848 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":3,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///d%3A/dev/ws/haskell/hls/src/Ide/Cradle.hs"}}}
2020-05-19 15:18:57.6682908 [ThreadId 25] - Cabal-Helper cradle package: Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-hls-test-utils", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils", uImpl = UnitImplV2 {uiV2Components = [(ChLibName (ChSubLibName "hls-test-utils"),"haskell-language-server:lib:hls-test-utils")], uiV2OnlyDependencies = False}} :| [Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-haskell-language-server-wrapper", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper", uImpl = UnitImplV2 {uiV2Components = [(ChExeName "haskell-language-server-wrapper","haskell-language-server:exe:haskell-language-server-wrapper")], uiV2OnlyDependencies = False}},Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-haskell-language-server", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server", uImpl = UnitImplV2 {uiV2Components = [(ChExeName "haskell-language-server","haskell-language-server:exe:haskell-language-server")], uiV2OnlyDependencies = False}},Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-func-test", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\t\\func-test", uImpl = UnitImplV2 {uiV2Components = [(ChTestName "func-test","haskell-language-server:test:func-test")], uiV2OnlyDependencies = False}},Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0", uImpl = UnitImplV2 {uiV2Components = [(ChLibName ChMainLibName,"haskell-language-server:lib:haskell-language-server")], uiV2OnlyDependencies = False}}]}
2020-05-19 15:18:57.6722872 [ThreadId 25] - Cabal-Helper normalisedPackageLocation: D:\dev\ws\haskell\hls
2020-05-19 15:19:02.9148224 [ThreadId 25] - Error loading Stack project using cradle action Stack: Failed to parse result of calling stack
�[0m�[0m
�[0m* * * * * * * *�[0m
�[0mThe main module to load is ambiguous. Candidates are: �[0m
�[0m1. Package `ghcide' component ghcide:exe:ghcide with main-is file: D:\dev\ws\haskell\hls\ghcide\exe\Main.hs�[0m
�[0m2. Package `ghcide' component ghcide:exe:ghcide-test-preprocessor with main-is file: D:\dev\ws\haskell\hls\ghcide\test\preprocessor\Main.hs�[0m
�[0m3. Package `haskell-language-server' component haskell-language-server:exe:haskell-language-server with main-is file: D:\dev\ws\haskell\hls\exe\Main.hs�[0m
�[0m4. Package `haskell-language-server' component haskell-language-server:exe:haskell-language-server-wrapper with main-is file: D:\dev\ws\haskell\hls\exe\Wrapper.hs�[0m
�[0mYou can specify which one to pick by: �[0m
�[0m * Specifying targets to stack ghci e.g. stack ghci ghcide:exe:ghcide�[0m
�[0m * Specifying what the main is e.g. stack ghci --main-is ghcide:exe:ghcide�[0m
�[0m * Choosing from the candidate above [1..4]�[0m
�[0m* * * * * * * *�[0m
�[0m�[0m
�[0m<stdin>: hGetLine: end of file�[0m

2020-05-19 15:19:02.9338638 [ThreadId 25] - Fallback to cradle action Other CabalV2
2020-05-19 15:19:02.9338638 [ThreadId 25] - Relative Module FilePath: src\Ide\Cradle.hs
2020-05-19 15:19:07.441043 [ThreadId 25] - Unit Info: UnitInfo {uiUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-hls-test-utils", uiPackageId = ("haskell-language-server",Version {versionBranch = [0,1,0,0], versionTags = []}), uiComponents = fromList [(ChLibName (ChSubLibName "hls-test-utils"),ChComponentInfo {ciComponentName = ChLibName (ChSubLibName "hls-test-utils"), ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-itest/utils","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build\\hls-test-utils\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build\\hls-test-utils\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\build\\hls-test-utils\\autogen\\cabal_macros.h","-this-unit-id","haskell-language-server-0.1.0.0-inplace-hls-test-utils","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","aeson-1.4.7.1-fc8398145fa0ee6fec76a607d9eb93e9f38adc8b","-package-id","base-4.13.0.0","-package-id","blaze-markup-0.8.2.5-f1be64c49edf5d0256db1a0c37875e9c97b0c2c8","-package-id","containers-0.6.2.1","-package-id","data-default-0.7.1.1-033226fdb10d071ccb7a11bb006186d99a023015","-package-id","directory-1.3.6.0","-package-id","filepath-1.4.2.1","-package-id","haskell-language-server-0.1.0.0-inplace","-package-id","haskell-lsp-0.22.0.0-5c6408a59f58e41858cdacfc65f34fad89862eeb","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","hslogger-1.3.1.0-8dabf3b71c3b3aaa9a96a77dd1975ce0d4d016c2","-package-id","hspec-2.7.1-db22ee3e509bf32ee3fbdd0c5210739778844cbb","-package-id","hspec-core-2.7.1-7a440abbd70d7f132c322b824eea4fd850b2c2fa","-package-id","lsp-test-0.11.0.1-bc90ad15d463b3ae0f4acb42fd682d93301b2776","-package-id","stm-2.5.0.0","-package-id","tasty-hunit-0.10.0.2-f283075f857cbc22a535af462a3e34602abc80c5","-package-id","text-1.2.4.0","-package-id","unordered-con_-0.2.10.0-c3b82e1039056472fe4d435a46bece9e9a3085ed","-package-id","yaml-0.11.4.0-49edb5a5a4819256830b83bd692183178961bbb3","-XHaskell2010","-Wall","-Wredundant-constraints"], ciSourceDirs = ["test/utils"], ciEntrypoints = ChLibEntrypoint {chExposedModules = [ChModuleName {unChModuleName = "Test.Hls.Util"}], chOtherModules = [], chSignatures = []}})], uiCompilerId = ("GHC",Version {versionBranch = [8,8,3], versionTags = []}), uiPackageFlags = [("agpl",True),("pedantic",False)], uiConfigFlags = [("agpl",True),("pedantic",False)], uiNonDefaultConfigFlags = [], uiModTimes = UnitModTimes {umtPkgYaml = Nothing, umtCabalFile = ("D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal",1589874832), umtSetupConfig = Just ("D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\l\\hls-test-utils\\setup-config",1589894007)}}
2020-05-19 15:19:11.2740483 [ThreadId 25] - Unit Info: UnitInfo {uiUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-haskell-language-server-wrapper", uiPackageId = ("haskell-language-server",Version {versionBranch = [0,1,0,0], versionTags = []}), uiComponents = fromList [(ChExeName "haskell-language-server-wrapper",ChComponentInfo {ciComponentName = ChExeName "haskell-language-server-wrapper", ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-iexe","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\haskell-language-server-wrapper-tmp","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\build\\haskell-language-server-wrapper\\autogen\\cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","base-4.13.0.0","-package-id","directory-1.3.6.0","-package-id","extra-1.7.1-a83458ef88dac31e0cac223c17d25bb72a612a4f","-package-id","filepath-1.4.2.1","-package-id","ghc-8.8.3","-package-id","ghc-paths-0.1.0.12-d037d03a5a167a0c1d75fceed177419d69b088be","-package-id","gitrev-1.3.1-b1edcb5d90ef595259dfaaa3133daf13af159c81","-package-id","haskell-language-server-0.1.0.0-inplace","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","optparse-appl_-0.15.1.0-495b9e1b40f9c9dc50e135b6245c2dbe66f2ecee","-package-id","process-1.6.8.0","-XHaskell2010","-threaded","-Wall","-Wno-name-shadowing","-Wredundant-constraints","-rtsopts","-with-rtsopts=-I0 -qg -A128M"], ciSourceDirs = ["exe"], ciEntrypoints = ChExeEntrypoint {chMainIs = "Wrapper.hs", chOtherModules = [ChModuleName {unChModuleName = "Arguments"},ChModuleName {unChModuleName = "Paths_haskell_language_server"}]}})], uiCompilerId = ("GHC",Version {versionBranch = [8,8,3], versionTags = []}), uiPackageFlags = [("agpl",True),("pedantic",False)], uiConfigFlags = [("agpl",True),("pedantic",False)], uiNonDefaultConfigFlags = [], uiModTimes = UnitModTimes {umtPkgYaml = Nothing, umtCabalFile = ("D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal",1589874832), umtSetupConfig = Just ("D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server-wrapper\\setup-config",1589893970)}}
2020-05-19 15:19:36.5070761 [ThreadId 25] - Unit Info: UnitInfo {uiUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-haskell-language-server", uiPackageId = ("haskell-language-server",Version {versionBranch = [0,1,0,0], versionTags = []}), uiComponents = fromList [(ChExeName "haskell-language-server",ChComponentInfo {ciComponentName = ChExeName "haskell-language-server", ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-iexe","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\haskell-language-server-tmp","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\build\\haskell-language-server\\autogen\\cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","aeson-1.4.7.1-fc8398145fa0ee6fec76a607d9eb93e9f38adc8b","-package-id","async-2.2.2-05756a1172b8b4fad3f56c1edb02d7883d7f9090","-package-id","base-4.13.0.0","-package-id","base16-bytest_-0.1.1.6-ea2ad28a507a2e47e0ae702db77e9c99d1a9b31f","-package-id","binary-0.8.7.0","-package-id","bytestring-0.10.10.0","-package-id","containers-0.6.2.1","-package-id","cryptohash-sh_-0.11.10_-4b3f16af6314cbc262e05bfb036bb3cc4bf8090b","-package-id","data-default-0.7.1.1-033226fdb10d071ccb7a11bb006186d99a023015","-package-id","deepseq-1.4.4.0","-package-id","directory-1.3.6.0","-package-id","extra-1.7.1-a83458ef88dac31e0cac223c17d25bb72a612a4f","-package-id","filepath-1.4.2.1","-package-id","ghc-8.8.3","-package-id","ghc-check-0.3.0.1-db791197683e6922fe8c13fb82eafc7a2c386754","-package-id","ghc-paths-0.1.0.12-d037d03a5a167a0c1d75fceed177419d69b088be","-package-id","ghcide-0.1.0-inplace","-package-id","gitrev-1.3.1-b1edcb5d90ef595259dfaaa3133daf13af159c81","-package-id","hashable-1.3.0.0-270f4c47d6f231557da8f0cdcd265797c63e63c6","-package-id","haskell-language-server-0.1.0.0-inplace","-package-id","haskell-lsp-0.22.0.0-5c6408a59f58e41858cdacfc65f34fad89862eeb","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","hslogger-1.3.1.0-8dabf3b71c3b3aaa9a96a77dd1975ce0d4d016c2","-package-id","optparse-appl_-0.15.1.0-495b9e1b40f9c9dc50e135b6245c2dbe66f2ecee","-package-id","shake-0.19-inplace","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","unordered-con_-0.2.10.0-c3b82e1039056472fe4d435a46bece9e9a3085ed","-XHaskell2010","-threaded","-Wall","-Wno-name-shadowing","-Wredundant-constraints","-rtsopts","-with-rtsopts=-I0 -qg -A128M"], ciSourceDirs = ["exe"], ciEntrypoints = ChExeEntrypoint {chMainIs = "Main.hs", chOtherModules = [ChModuleName {unChModuleName = "Arguments"},ChModuleName {unChModuleName = "Paths_haskell_language_server"}]}})], uiCompilerId = ("GHC",Version {versionBranch = [8,8,3], versionTags = []}), uiPackageFlags = [("agpl",True),("pedantic",False)], uiConfigFlags = [("agpl",True),("pedantic",False)], uiNonDefaultConfigFlags = [], uiModTimes = UnitModTimes {umtPkgYaml = Nothing, umtCabalFile = ("D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal",1589874832), umtSetupConfig = Just ("D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\x\\haskell-language-server\\setup-config",1589894007)}}
2020-05-19 15:20:09.1703671 [ThreadId 25] - Catching and swallowing an IOException: callProcessStderr: cabal v2-build --with-ghc=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe --with-ghc-pkg=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\ghc-pkg.exe --with-haddock=D:\bin\stack\x86_64-windows\ghc-8.8.3\bin\haddock.exe --project-file=D:\dev\ws\haskell\hls\cabal.project --builddir=D:\dev\ws\haskell\hls\dist-newstyle --only-configure haskell-language-server:test:func-test (exit 1): failed
2020-05-19 15:20:09.1703671 [ThreadId 25] - The Exception was thrown in the context of finding a component for "src\Ide\Cradle.hs" in the unit: Unit {uUnitId = UnitId "haskell-language-server-0.1.0.0-inplace-func-test", uPackage = Package {pPackageName = "haskell-language-server", pSourceDir = "D:\\dev\\ws\\haskell\\hls\\.", pCabalFile = CabalFile "D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal", pFlags = [], pUnits = ()}, uDistDir = DistDirLib "D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\t\\func-test", uImpl = UnitImplV2 {uiV2Components = [(ChTestName "func-test","haskell-language-server:test:func-test")], uiV2OnlyDependencies = False}}
2020-05-19 15:20:22.397366 [ThreadId 25] - Unit Info: UnitInfo {uiUnitId = UnitId "haskell-language-server-0.1.0.0-inplace", uiPackageId = ("haskell-language-server",Version {versionBranch = [0,1,0,0], versionTags = []}), uiComponents = fromList [(ChLibName ChMainLibName,ChComponentInfo {ciComponentName = ChLibName ChMainLibName, ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-isrc","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen\\cabal_macros.h","-this-unit-id","haskell-language-server-0.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","Diff-0.4.0-4a7b14dec401b5657c1efeff0000c3dea3d9993b","-package-id","Win32-2.6.1.0","-package-id","aeson-1.4.7.1-fc8398145fa0ee6fec76a607d9eb93e9f38adc8b","-package-id","base-4.13.0.0","-package-id","binary-0.8.7.0","-package-id","brittany-0.12.1.1-2cd7ccc2c18a0f5101490d64c252171e606ed3b7","-package-id","bytestring-0.10.10.0","-package-id","cabal-helper-1.1.0.0-inplace","-package-id","containers-0.6.2.1","-package-id","data-default-0.7.1.1-033226fdb10d071ccb7a11bb006186d99a023015","-package-id","deepseq-1.4.4.0","-package-id","directory-1.3.6.0","-package-id","extra-1.7.1-a83458ef88dac31e0cac223c17d25bb72a612a4f","-package-id","filepath-1.4.2.1","-package-id","floskell-0.10.3-752024a679c0d375f48d794af06c9fd8e4793f45","-package-id","ghc-8.8.3","-package-id","ghcide-0.1.0-inplace","-package-id","gitrev-1.3.1-b1edcb5d90ef595259dfaaa3133daf13af159c81","-package-id","hashable-1.3.0.0-270f4c47d6f231557da8f0cdcd265797c63e63c6","-package-id","haskell-lsp-0.22.0.0-5c6408a59f58e41858cdacfc65f34fad89862eeb","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","hslogger-1.3.1.0-8dabf3b71c3b3aaa9a96a77dd1975ce0d4d016c2","-package-id","lens-4.19.2-087903fa153ad038ee06c3f82ade7b642a3cde1c","-package-id","optparse-simp_-0.1.1.2-65a32f952a7f8813da113aa37430a00e88a9325d","-package-id","ormolu-0.0.5.0-622e5dd37ea12194170309d3ce872957aadea11c","-package-id","process-1.6.8.0","-package-id","regex-tdfa-1.3.1.0-2a0466af0a970ab30ce13d4cb622a321a4093834","-package-id","shake-0.19-inplace","-package-id","text-1.2.4.0","-package-id","transformers-0.5.6.2","-package-id","unordered-con_-0.2.10.0-c3b82e1039056472fe4d435a46bece9e9a3085ed","-XHaskell2010","-Wall","-Wredundant-constraints","-Wno-name-shadowing"], ciSourceDirs = ["src"], ciEntrypoints = ChLibEntrypoint {chExposedModules = [ChModuleName {unChModuleName = "Ide.Cradle"},ChModuleName {unChModuleName = "Ide.Logger"},ChModuleName {unChModuleName = "Ide.Plugin"},ChModuleName {unChModuleName = "Ide.Plugin.Config"},ChModuleName {unChModuleName = "Ide.Plugin.Example"},ChModuleName {unChModuleName = "Ide.Plugin.Example2"},ChModuleName {unChModuleName = "Ide.Plugin.GhcIde"},ChModuleName {unChModuleName = "Ide.Plugin.Ormolu"},ChModuleName {unChModuleName = "Ide.Plugin.Pragmas"},ChModuleName {unChModuleName = "Ide.Plugin.Floskell"},ChModuleName {unChModuleName = "Ide.Plugin.Formatter"},ChModuleName {unChModuleName = "Ide.PluginUtils"},ChModuleName {unChModuleName = "Ide.Types"},ChModuleName {unChModuleName = "Ide.Version"},ChModuleName {unChModuleName = "Ide.Plugin.Brittany"}], chOtherModules = [ChModuleName {unChModuleName = "Paths_haskell_language_server"}], chSignatures = []}})], uiCompilerId = ("GHC",Version {versionBranch = [8,8,3], versionTags = []}), uiPackageFlags = [("agpl",True),("pedantic",False)], uiConfigFlags = [("agpl",True),("pedantic",False)], uiNonDefaultConfigFlags = [], uiModTimes = UnitModTimes {umtPkgYaml = Nothing, umtCabalFile = ("D:\\dev\\ws\\haskell\\hls\\.\\haskell-language-server.cabal",1589874832), umtSetupConfig = Just ("D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\setup-config",1589894247)}}
2020-05-19 15:20:22.3983697 [ThreadId 25] - Flags for "D:\dev\ws\haskell\hls\src\Ide\Cradle.hs": ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-iD:\\dev\\ws\\haskell\\hls\\src","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen\\cabal_macros.h","-this-unit-id","haskell-language-server-0.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","Diff-0.4.0-4a7b14dec401b5657c1efeff0000c3dea3d9993b","-package-id","Win32-2.6.1.0","-package-id","aeson-1.4.7.1-fc8398145fa0ee6fec76a607d9eb93e9f38adc8b","-package-id","base-4.13.0.0","-package-id","binary-0.8.7.0","-package-id","brittany-0.12.1.1-2cd7ccc2c18a0f5101490d64c252171e606ed3b7","-package-id","bytestring-0.10.10.0","-package-id","cabal-helper-1.1.0.0-inplace","-package-id","containers-0.6.2.1","-package-id","data-default-0.7.1.1-033226fdb10d071ccb7a11bb006186d99a023015","-package-id","deepseq-1.4.4.0","-package-id","directory-1.3.6.0","-package-id","extra-1.7.1-a83458ef88dac31e0cac223c17d25bb72a612a4f","-package-id","filepath-1.4.2.1","-package-id","floskell-0.10.3-752024a679c0d375f48d794af06c9fd8e4793f45","-package-id","ghc-8.8.3","-package-id","ghcide-0.1.0-inplace","-package-id","gitrev-1.3.1-b1edcb5d90ef595259dfaaa3133daf13af159c81","-package-id","hashable-1.3.0.0-270f4c47d6f231557da8f0cdcd265797c63e63c6","-package-id","haskell-lsp-0.22.0.0-5c6408a59f58e41858cdacfc65f34fad89862eeb","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","hslogger-1.3.1.0-8dabf3b71c3b3aaa9a96a77dd1975ce0d4d016c2","-package-id","lens-4.19.2-087903fa153ad038ee06c3f82ade7b642a3cde1c","-package-id","optparse-simp_-0.1.1.2-65a32f952a7f8813da113aa37430a00e88a9325d","-package-id","ormolu-0.0.5.0-622e5dd37ea12194170309d3ce872957aadea11c","-package-id","process-1.6.8.0","-package-id","regex-tdfa-1.3.1.0-2a0466af0a970ab30ce13d4cb622a321a4093834","-package-id","shake-0.19-inplace","-package-id","text-1.2.4.0","-package-id","transformers-0.5.6.2","-package-id","unordered-con_-0.2.10.0-c3b82e1039056472fe4d435a46bece9e9a3085ed","-XHaskell2010","-Wall","-Wredundant-constraints","-Wno-name-shadowing","Ide.Cradle","Ide.Logger","Ide.Plugin","Ide.Plugin.Config","Ide.Plugin.Example","Ide.Plugin.Example2","Ide.Plugin.GhcIde","Ide.Plugin.Ormolu","Ide.Plugin.Pragmas","Ide.Plugin.Floskell","Ide.Plugin.Formatter","Ide.PluginUtils","Ide.Types","Ide.Version","Ide.Plugin.Brittany","Paths_haskell_language_server"]
2020-05-19 15:20:22.3993698 [ThreadId 25] - Component Infos: ChComponentInfo {ciComponentName = ChLibName ChMainLibName, ciGhcOptions = ["-fbuilding-cabal-package","-O","-outputdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-odir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-hidir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-stubdir","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-i","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-isrc","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-iD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\global-autogen","-ID:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build","-optP-DAGPL","-optP-include","-optPD:\\dev\\ws\\haskell\\hls\\dist-newstyle\\build\\x86_64-windows\\ghc-8.8.3\\haskell-language-server-0.1.0.0\\build\\autogen\\cabal_macros.h","-this-unit-id","haskell-language-server-0.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","C:\\sd\\ghc-8.8.3\\package.db","-package-db","D:\\dev\\ws\\haskell\\hls\\dist-newstyle\\packagedb\\ghc-8.8.3","-package-id","Cabal-3.0.1.0","-package-id","Diff-0.4.0-4a7b14dec401b5657c1efeff0000c3dea3d9993b","-package-id","Win32-2.6.1.0","-package-id","aeson-1.4.7.1-fc8398145fa0ee6fec76a607d9eb93e9f38adc8b","-package-id","base-4.13.0.0","-package-id","binary-0.8.7.0","-package-id","brittany-0.12.1.1-2cd7ccc2c18a0f5101490d64c252171e606ed3b7","-package-id","bytestring-0.10.10.0","-package-id","cabal-helper-1.1.0.0-inplace","-package-id","containers-0.6.2.1","-package-id","data-default-0.7.1.1-033226fdb10d071ccb7a11bb006186d99a023015","-package-id","deepseq-1.4.4.0","-package-id","directory-1.3.6.0","-package-id","extra-1.7.1-a83458ef88dac31e0cac223c17d25bb72a612a4f","-package-id","filepath-1.4.2.1","-package-id","floskell-0.10.3-752024a679c0d375f48d794af06c9fd8e4793f45","-package-id","ghc-8.8.3","-package-id","ghcide-0.1.0-inplace","-package-id","gitrev-1.3.1-b1edcb5d90ef595259dfaaa3133daf13af159c81","-package-id","hashable-1.3.0.0-270f4c47d6f231557da8f0cdcd265797c63e63c6","-package-id","haskell-lsp-0.22.0.0-5c6408a59f58e41858cdacfc65f34fad89862eeb","-package-id","hie-bios-0.5.0-59bcb20f59bd607b9be2c4a783e248762ffcd352","-package-id","hslogger-1.3.1.0-8dabf3b71c3b3aaa9a96a77dd1975ce0d4d016c2","-package-id","lens-4.19.2-087903fa153ad038ee06c3f82ade7b642a3cde1c","-package-id","optparse-simp_-0.1.1.2-65a32f952a7f8813da113aa37430a00e88a9325d","-package-id","ormolu-0.0.5.0-622e5dd37ea12194170309d3ce872957aadea11c","-package-id","process-1.6.8.0","-package-id","regex-tdfa-1.3.1.0-2a0466af0a970ab30ce13d4cb622a321a4093834","-package-id","shake-0.19-inplace","-package-id","text-1.2.4.0","-package-id","transformers-0.5.6.2","-package-id","unordered-con_-0.2.10.0-c3b82e1039056472fe4d435a46bece9e9a3085ed","-XHaskell2010","-Wall","-Wredundant-constraints","-Wno-name-shadowing"], ciSourceDirs = ["src"], ciEntrypoints = ChLibEntrypoint {chExposedModules = [ChModuleName {unChModuleName = "Ide.Cradle"},ChModuleName {unChModuleName = "Ide.Logger"},ChModuleName {unChModuleName = "Ide.Plugin"},ChModuleName {unChModuleName = "Ide.Plugin.Config"},ChModuleName {unChModuleName = "Ide.Plugin.Example"},ChModuleName {unChModuleName = "Ide.Plugin.Example2"},ChModuleName {unChModuleName = "Ide.Plugin.GhcIde"},ChModuleName {unChModuleName = "Ide.Plugin.Ormolu"},ChModuleName {unChModuleName = "Ide.Plugin.Pragmas"},ChModuleName {unChModuleName = "Ide.Plugin.Floskell"},ChModuleName {unChModuleName = "Ide.Plugin.Formatter"},ChModuleName {unChModuleName = "Ide.PluginUtils"},ChModuleName {unChModuleName = "Ide.Types"},ChModuleName {unChModuleName = "Ide.Version"},ChModuleName {unChModuleName = "Ide.Plugin.Brittany"}], chOtherModules = [ChModuleName {unChModuleName = "Paths_haskell_language_server"}], chSignatures = []}}

@jneira jneira changed the title Use cabal-helper cradle with a fallback to the hie-bios implicit one Use hie-bios implicit cradle with a fallback to the cabal-helper one May 20, 2020
@jneira
Copy link
Member Author

jneira commented May 30, 2020

Closing this as the implicit cradle logic is being moved to implicit-hie

@jneira jneira closed this May 30, 2020
@jneira jneira deleted the implicit-cradle branch August 17, 2020 20:06
alanz added a commit to alanz/haskell-language-server that referenced this pull request Sep 3, 2020
pepeiborra pushed a commit that referenced this pull request Dec 27, 2020
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 this pull request may close these issues.

2 participants