haskell / vscode-haskell

VS Code extension for Haskell, powered by haskell-language-server
https://marketplace.visualstudio.com/items?itemName=haskell.haskell
Other
547 stars 90 forks source link

Error on brand new project created with stack #665

Closed matux closed 1 year ago

matux commented 1 year ago

Your environment

Which OS do you use? macOS 12.5

Which version of GHC do you use and how did you install it? 9.2.2 from ghcup

How is your project built (alternative: link to the project)?

Which LSP client (editor/plugin) do you use? vscode-haskell (2.2.0)

Which version of HLS do you use and how did you install it? 1.7.0.0 from ghcup Have you configured HLS in any way (especially: a hie.yaml file)? No

Steps to reproduce

stack new myproj cd myproj code . click on app/Main.hs wait a sec

Expected behaviour

No errors thrown.

Actual behaviour

ghcide compiled by GHC 9.0 failed to load packages: <command line>: cannot satisfy -package ch02-0.1.0.0
    (use -v for more information). 
Please ensure that ghcide is compiled with the same GHC installation as the project.cradle

Also, if I open ./Setup.hs, I get:

Multi Cradle: No prefixes matched
pwd: /Users/matux/code/matux/haskell/firstprinciples/ch02
filepath: /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs
prefixes:
("./src",Stack {component = Just "ch02:lib", stackYaml = Nothing})
("./app/Main.hs",Stack {component = Just "ch02:exe:ch02-exe", stackYaml = Nothing})
("./app/Paths_ch02.hs",Stack {component = Just "ch02:exe:ch02-exe", stackYaml = Nothing})
("./test",Stack {component = Just "ch02:test:ch02-test", stackYaml = Nothing})
cradle

Include debug information

Execute in the root of your project the command haskell-language-server-wrapper --debug . and paste the logs here (you can find the executable location here):

Debug output: ``` No 'hie.yaml' found. Try to discover the project type! Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.7.0.0 x86_64 ghc-9.2.2 Current directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 Operating system: darwin Arguments: ["--debug","."] Cradle directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 Cradle type: Stack Tool versions found on the $PATH cabal: 3.6.2.0 stack: 2.7.5 ghc: 9.2.2 Consulting the cradle to get project GHC version... Project GHC version: 9.0.2 haskell-language-server exe candidates: ["haskell-language-server-9.0.2","haskell-language-server"] Launching haskell-language-server exe at:/Users/matux/.ghcup/bin/haskell-language-server-9.0.2 2022-08-04T20:05:31.066694Z | Info | No log file specified; using stderr. 2022-08-04T20:05:31.067248Z | Info | haskell-language-server version: 1.7.0.0 (GHC: 9.0.2) (PATH: /Users/matux/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.0.2) 2022-08-04T20:05:31.067967Z | Info | Directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 2022-08-04T20:05:31.068286Z | Info | Logging heap statistics every 60.00s ghcide setup tester in /Users/matux/code/matux/haskell/firstprinciples/ch02. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in /Users/matux/code/matux/haskell/firstprinciples/ch02 Found 4 files Step 2/4: Looking for hie.yaml files that control setup Found 1 cradle () Step 3/4: Initializing the IDE 2022-08-04T20:05:31.073720Z | Debug | Initializing exports map from hiedb 2022-08-04T20:05:31.074069Z | Debug | Shake session initialized Step 4/4: Type checking the file2022-08-04T20:05:31.074607Z | Debug | Done initializing exports map from hiedb. Size: 1 s 2022-08-04T20:05:31.075613Z | Info | Cradle path: test/Spec.hs 2022-08-04T20:05:31.075698Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for test/Spec.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04T20:05:31.078829Z | Debug | Cradle: Cradle {cradleRootDir = "/Users/matux/code/matux/haskell/firstprinciples/ch02", cradleOptsProg = CradleAction: Stack} 2022-08-04 17:05:31.571623 [ThreadId 46] INFO hie-bios: Using main module: 1. Package `ch02' component ch02:test:ch02-test with main-is file: /Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs 2022-08-04 17:05:31.754936 [ThreadId 46] INFO hie-bios: Building all executables for `ch02' once. After a successful build of all of them, only specified executables will be rebuilt. 2022-08-04 17:05:31.759944 [ThreadId 46] INFO hie-bios: ch02> configure (lib + exe + test) 2022-08-04 17:05:32.500834 [ThreadId 46] INFO hie-bios: Configuring ch02-0.1.0.0... 2022-08-04 17:05:32.976505 [ThreadId 46] INFO hie-bios: ch02> build (lib + exe + test) 2022-08-04 17:05:33.050911 [ThreadId 46] INFO hie-bios: Preprocessing library for ch02-0.1.0.0.. 2022-08-04 17:05:33.050995 [ThreadId 46] INFO hie-bios: Building library for ch02-0.1.0.0.. 2022-08-04 17:05:33.217181 [ThreadId 46] INFO hie-bios: [1 of 2] Compiling Lib 2022-08-04 17:05:33.453699 [ThreadId 46] INFO hie-bios: [2 of 2] Compiling Paths_ch02 2022-08-04 17:05:34.04238 [ThreadId 46] INFO hie-bios: Preprocessing test suite 'ch02-test' for ch02-0.1.0.0.. 2022-08-04 17:05:34.042483 [ThreadId 46] INFO hie-bios: Building test suite 'ch02-test' for ch02-0.1.0.0.. 2022-08-04 17:05:34.209713 [ThreadId 46] INFO hie-bios: [1 of 2] Compiling Main 2022-08-04 17:05:34.386771 [ThreadId 46] INFO hie-bios: [2 of 2] Compiling Paths_ch02 2022-08-04 17:05:34.73857 [ThreadId 46] INFO hie-bios: Linking .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/ch02-test ... 2022-08-04 17:05:35.387221 [ThreadId 46] INFO hie-bios: Preprocessing executable 'ch02-exe' for ch02-0.1.0.0.. 2022-08-04 17:05:35.387313 [ThreadId 46] INFO hie-bios: Building executable 'ch02-exe' for ch02-0.1.0.0.. 2022-08-04 17:05:35.559477 [ThreadId 46] INFO hie-bios: [1 of 2] Compiling Main 2022-08-04 17:05:35.731687 [ThreadId 46] INFO hie-bios: [2 of 2] Compiling Paths_ch02 2022-08-04 17:05:36.080162 [ThreadId 46] INFO hie-bios: Linking .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-exe/ch02-exe ... 2022-08-04 17:05:36.591836 [ThreadId 46] INFO hie-bios: ch02> copy/register 2022-08-04 17:05:36.63329 [ThreadId 46] INFO hie-bios: Installing library in /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/lib/x86_64-osx-ghc-9.0.2/ch02-0.1.0.0-DaEKlTXidsdCNzDXqwl1EG 2022-08-04 17:05:36.633393 [ThreadId 46] INFO hie-bios: Installing executable ch02-exe in /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/bin 2022-08-04 17:05:36.840777 [ThreadId 46] INFO hie-bios: Registering library for ch02-0.1.0.0.. 2022-08-04 17:05:36.928876 [ThreadId 46] INFO hie-bios: ch02> Test running disabled by --no-run-tests flag. 2022-08-04 17:05:36.928959 [ThreadId 46] INFO hie-bios: Completed 2 action(s). 2022-08-04 17:05:37.107231 [ThreadId 46] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2022-08-04 17:05:37.107318 [ThreadId 46] INFO hie-bios: Configuring GHCi with the following packages: ch02 2022-08-04 17:05:37.6808 [ThreadId 53] INFO hie-bios: /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d 2022-08-04T20:05:38.295362Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hidir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hide-all-packages","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/test","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/autogen","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/global-autogen","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/ch02-test-tmp","-stubdir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build","-package-id=base-4.15.1.0","-package-id=ch02-0.1.0.0-DaEKlTXidsdCNzDXqwl1EG","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/ghci/e1c4fc8a/cabal_macros.h","-ghci-script=/private/var/folders/kj/3dgsc18s7pndgyx4tfnnb9n00000gn/T/haskell-stack-ghci/f17d8f89/ghci-script","-package-db","/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d"], componentRoot = "/Users/matux/code/matux/haskell/firstprinciples/ch02", componentDependencies = ["ch02.cabal","package.yaml","stack.yaml"]},"/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib") 2022-08-04T20:05:38.373568Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-536689c2599eb9eefee766d5df075b26a45fcf1b 2022-08-04T20:05:38.373988Z | Info | Making new HscEnv. In-place unit ids: [main] 2022-08-04T20:05:38.382047Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:38.384242Z | Debug | Known files updated: fromList [(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs"]),(TargetModule Paths_ch02,fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/autogen/Paths_ch02.hs"])] 2022-08-04T20:05:38.384662Z | Debug | Finished build session AsyncCancelled 2022-08-04T20:05:38.384750Z | Debug | Restarting build session due to new component Action Queue: [User TypeCheck] Keys: [GetKnownTargets; , GhcSessionIO; ] Aborting previous build session took 0.00s 2022-08-04T20:05:38.385297Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs" 2022-08-04T20:05:38.385371Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs" 2022-08-04T20:05:38.385510Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs" 2022-08-04T20:05:38.385511Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs" 2022-08-04T20:05:38.574695Z | Info | Cradle path: app/Main.hs 2022-08-04T20:05:38.574789Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for app/Main.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04T20:05:38.577411Z | Debug | Cradle: Cradle {cradleRootDir = "/Users/matux/code/matux/haskell/firstprinciples/ch02", cradleOptsProg = CradleAction: Stack} 2022-08-04 17:05:39.995729 [ThreadId 170] INFO hie-bios: Using main module: 1. Package `ch02' component ch02:exe:ch02-exe with main-is file: /Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs 2022-08-04 17:05:39.996967 [ThreadId 170] INFO hie-bios: ch02> configure (lib + exe) 2022-08-04 17:05:39.997026 [ThreadId 170] INFO hie-bios: Configuring ch02-0.1.0.0... 2022-08-04 17:05:40.502118 [ThreadId 170] INFO hie-bios: ch02> initial-build-steps (lib + exe) 2022-08-04 17:05:40.719088 [ThreadId 170] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2022-08-04 17:05:40.719169 [ThreadId 170] INFO hie-bios: Configuring GHCi with the following packages: ch02 2022-08-04 17:05:41.278029 [ThreadId 217] INFO hie-bios: /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d 2022-08-04T20:05:41.883617Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hidir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hide-all-packages","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-exe","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/app","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-exe/autogen","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/global-autogen","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-exe/ch02-exe-tmp","-stubdir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build","-package-id=base-4.15.1.0","-package-id=ch02-0.1.0.0-DaEKlTXidsdCNzDXqwl1EG","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/ghci/a4d1480b/cabal_macros.h","-ghci-script=/private/var/folders/kj/3dgsc18s7pndgyx4tfnnb9n00000gn/T/haskell-stack-ghci/f1081fac/ghci-script","-package-db","/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d"], componentRoot = "/Users/matux/code/matux/haskell/firstprinciples/ch02", componentDependencies = ["ch02.cabal","package.yaml","stack.yaml"]},"/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib") 2022-08-04T20:05:41.959155Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-c8f83a40617518f469bbb94cfdd3c38daeda4425 2022-08-04T20:05:41.959333Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-c8f83a40617518f469bbb94cfdd3c38daeda4425 2022-08-04T20:05:41.959436Z | Info | Making new HscEnv. In-place unit ids: [main, main] 2022-08-04T20:05:41.966825Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 8),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:41.969254Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 9),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:41.972745Z | Debug | Known files updated: fromList [(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs"]),(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs"]),(TargetModule Paths_ch02,fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/autogen/Paths_ch02.hs"])] 2022-08-04T20:05:41.973253Z | Debug | Finished build session AsyncCancelled 2022-08-04T20:05:41.973332Z | Debug | Restarting build session due to new component Action Queue: [User TypeCheck] Keys: [GetKnownTargets; , GhcSessionIO; ] Aborting previous build session took 0.00s 2022-08-04T20:05:41.973813Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs" 2022-08-04T20:05:41.973893Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs" 2022-08-04T20:05:41.974029Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs" 2022-08-04T20:05:41.975559Z | Info | Cradle path: Setup.hs 2022-08-04T20:05:41.975654Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for Setup.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04T20:05:41.979344Z | Debug | Cradle: Cradle {cradleRootDir = "/Users/matux/code/matux/haskell/firstprinciples/ch02", cradleOptsProg = CradleAction: Stack} 2022-08-04T20:05:41.979505Z | Debug | Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /Users/matux/code/matux/haskell/firstprinciples/ch02","filepath: /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs","prefixes:","(\"./src\",Stack {component = Just \"ch02:lib\", stackYaml = Nothing})","(\"./app/Main.hs\",Stack {component = Just \"ch02:exe:ch02-exe\", stackYaml = Nothing})","(\"./app/Paths_ch02.hs\",Stack {component = Just \"ch02:exe:ch02-exe\", stackYaml = Nothing})","(\"./test\",Stack {component = Just \"ch02:test:ch02-test\", stackYaml = Nothing})"]}] 2022-08-04T20:05:41.979820Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs Hidden: no Range: 1:1-2:1 Source: cradle Severity: DsError Message: Multi Cradle: No prefixes matched pwd: /Users/matux/code/matux/haskell/firstprinciples/ch02 filepath: /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs prefixes: ("./src",Stack {component = Just "ch02:lib", stackYaml = Nothing}) ("./app/Main.hs",Stack {component = Just "ch02:exe:ch02-exe", stackYaml = Nothing}) ("./app/Paths_ch02.hs",Stack {component = Just "ch02:exe:ch02-exe", stackYaml = Nothing}) ("./test",Stack {component = Just "ch02:test:ch02-test", stackYaml = Nothing}) 2022-08-04T20:05:41.980988Z | Info | Cradle path: src/Lib.hs 2022-08-04T20:05:41.981081Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/Lib.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04T20:05:41.984642Z | Debug | Cradle: Cradle {cradleRootDir = "/Users/matux/code/matux/haskell/firstprinciples/ch02", cradleOptsProg = CradleAction: Stack} 2022-08-04 17:05:42.841379 [ThreadId 326] INFO hie-bios: Configuring GHCi with the following packages: ch02 2022-08-04 17:05:43.393695 [ThreadId 368] INFO hie-bios: /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d 2022-08-04T20:05:44.012466Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hidir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/odir","-hide-all-packages","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/src","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/autogen","-i/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/global-autogen","-stubdir=/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build","-package-id=base-4.15.1.0","-optP-include","-optP/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/ghci/4a62dd55/cabal_macros.h","-ghci-script=/private/var/folders/kj/3dgsc18s7pndgyx4tfnnb9n00000gn/T/haskell-stack-ghci/a2259f63/ghci-script","-package-db","/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb","-package-db","/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d"], componentRoot = "/Users/matux/code/matux/haskell/firstprinciples/ch02", componentDependencies = ["ch02.cabal","package.yaml","stack.yaml"]},"/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib") 2022-08-04T20:05:44.088447Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-36b77af645cc5e1c5b198eedadf00cd6b013f3a2 2022-08-04T20:05:44.088617Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-36b77af645cc5e1c5b198eedadf00cd6b013f3a2 2022-08-04T20:05:44.088723Z | Info | Interface files cache directory: /Users/matux/.cache/ghcide/main-36b77af645cc5e1c5b198eedadf00cd6b013f3a2 2022-08-04T20:05:44.088805Z | Info | Making new HscEnv. In-place unit ids: [main, main, main] 2022-08-04T20:05:44.096114Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 12),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:44.098639Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 13),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:44.101068Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 14),fromList [("ch02.cabal",Just 2022-08-04 19:36:51.546532725 UTC),("package.yaml",Just 2022-08-04 19:36:51.542901236 UTC),("stack.yaml",Just 2022-08-04 19:36:52.582327067 UTC)]) 2022-08-04T20:05:44.106661Z | Debug | Known files updated: fromList [(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs"]),(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs"]),(TargetModule Lib,fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs"]),(TargetFile NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs",fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs"]),(TargetModule Paths_ch02,fromList ["/Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/ch02-test/autogen/Paths_ch02.hs"])] 2022-08-04T20:05:44.107000Z | Debug | Finished build session AsyncCancelled 2022-08-04T20:05:44.107069Z | Debug | Restarting build session due to new component Action Queue: [User TypeCheck] Keys: [GetKnownTargets; , GhcSessionIO; ] Aborting previous build session took 0.00s 2022-08-04T20:05:44.107425Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/src/Lib.hs" 2022-08-04T20:05:44.109211Z | Info | Cradle path: Setup.hs 2022-08-04T20:05:44.109302Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for Setup.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04T20:05:44.113099Z | Debug | Cradle: Cradle {cradleRootDir = "/Users/matux/code/matux/haskell/firstprinciples/ch02", cradleOptsProg = CradleAction: Stack} 2022-08-04T20:05:44.113267Z | Debug | Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /Users/matux/code/matux/haskell/firstprinciples/ch02","filepath: /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs","prefixes:","(\"./src\",Stack {component = Just \"ch02:lib\", stackYaml = Nothing})","(\"./app/Main.hs\",Stack {component = Just \"ch02:exe:ch02-exe\", stackYaml = Nothing})","(\"./app/Paths_ch02.hs\",Stack {component = Just \"ch02:exe:ch02-exe\", stackYaml = Nothing})","(\"./test\",Stack {component = Just \"ch02:test:ch02-test\", stackYaml = Nothing})"]}] 2022-08-04T20:05:44.114355Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs" 2022-08-04T20:05:44.115439Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs" 2022-08-04T20:05:44.116488Z | Debug | Getting hlint ideas for NormalizedFilePath "/Users/matux/code/matux/haskell/firstprinciples/ch02/test/Spec.hs" 2022-08-04T20:05:44.524368Z | Debug | Finished: User TypeCheck Took: 0.42s 2022-08-04T20:05:44.532736Z | Debug | Finished: GetHie Took: 0.01s 2022-08-04T20:05:44.539152Z | Debug | Finished: GenerateCore Took: 0.01s 2022-08-04T20:05:44.549496Z | Debug | LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps 2022-08-04T20:05:44.549823Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps Files that failed: * /Users/matux/code/matux/haskell/firstprinciples/ch02/Setup.hs Completed (3 files worked, 1 file failed) ```

Paste the contents of extension specific log, you can check instructions about how to find it here

Extension log: ``` 2022-08-04 19:49:36.0920000 [client] DEBUG Environment variables: 2022-08-04 19:49:36.0920000 [client] DEBUG PATH: /Users/matux/.nvm/versions/node/v12.16.3/bin:/Users/matux/opt/anaconda3/bin:/Users/matux/opt/anaconda3/condabin:/Users/matux/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/matux/.cabal/bin:/Users/matux/.ghcup/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources:/Users/matux/code/apple/swift/utils:/Users/matux/fvm/default/bin:/Users/matux/.pub-cache/bin:/usr/local/go/bin:/Users/matux/code/bin/chromium/depot_tools 2022-08-04 19:49:36.0920000 [client] INFO Finding haskell-language-server 2022-08-04 19:49:36.0990000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.0990000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.0990000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.1080000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose upgrade' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.1970000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose upgrade' terminated with code 0 2022-08-04 19:49:36.1980000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.1980000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.1980000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.2000000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.2760000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' terminated with code 0 2022-08-04 19:49:36.2770000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.2770000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.2770000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.2790000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t cabal -c installed -r' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.3510000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t cabal -c installed -r' terminated with code 0 2022-08-04 19:49:36.3520000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.3520000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.3520000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.3540000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t stack -c installed -r' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.4320000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t stack -c installed -r' terminated with code 0 2022-08-04 19:49:36.4350000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.4350000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4350000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4380000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis hls 1.7.0.0' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.4570000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis hls 1.7.0.0' terminated with code 0 2022-08-04 19:49:36.4570000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.4570000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4570000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4600000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis cabal 3.6.2.0' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.4790000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis cabal 3.6.2.0' terminated with code 0 2022-08-04 19:49:36.4790000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.4790000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4790000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.4820000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis stack 2.7.5' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.5030000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis stack 2.7.5' terminated with code 0 2022-08-04 19:49:36.5050000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:36.5050000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.5050000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:36.5070000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose run --hls 1.7.0.0 --cabal 3.6.2.0 --stack 2.7.5 --install' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:36.5960000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose run --hls 1.7.0.0 --cabal 3.6.2.0 --stack 2.7.5 --install' terminated with code 0 2022-08-04 19:49:36.5960000 [client] INFO Working out the project GHC version. This might take a while... 2022-08-04 19:49:36.5970000 [client] INFO Executing 'haskell-language-server-wrapper --project-ghc-version' in cwd '/Users/matux/code/matux/haskell/firstprinciples/ch02' 2022-08-04 19:49:37.3850000 [client] DEBUG Execution of 'haskell-language-server-wrapper --project-ghc-version' terminated with code 0 2022-08-04 19:49:37.4110000 [client] INFO The GHC version for the project or file: 9.0.2 2022-08-04 19:49:37.6950000 [client] INFO Platform constants: Darwin, A_64 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.1.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.6.4,8.6.5,8.8.2,8.8.3,8.8.4 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.2.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.6.4,8.6.5,8.8.2,8.8.3,8.8.4 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.3.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.6.4,8.6.5,8.8.3,8.8.4,9.0.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.4.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.10.6,8.10.7,8.6.4,8.6.5,8.8.3,8.8.4,9.0.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.5.0 compatible with GHC Versions: 8.10.5,8.10.6,8.10.7,8.6.5,8.8.3,8.8.4,9.0.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.5.1 compatible with GHC Versions: 8.10.5,8.10.6,8.10.7,8.6.5,8.8.3,8.8.4,9.0.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.6.0.0 compatible with GHC Versions: 8.10.6,8.10.7,8.6.5,8.8.4,9.0.1,9.0.2,9.2.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.6.1.0 compatible with GHC Versions: 8.10.6,8.10.7,8.6.5,8.8.4,9.0.1,9.0.2,9.2.1 2022-08-04 19:49:37.6950000 [client] DEBUG HLS 1.7.0.0 compatible with GHC Versions: 8.6.5,8.8.4,8.10.7,9.0.2,9.2.1,9.2.2 2022-08-04 19:49:37.6950000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:37.6950000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.6950000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.6970000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:37.7730000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' terminated with code 0 2022-08-04 19:49:37.7730000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:37.7730000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.7730000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.7760000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis bindir' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:37.7970000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis bindir' terminated with code 0 2022-08-04 19:49:37.7990000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:37.7990000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.7990000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.8010000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis hls 1.7.0.0' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:37.8220000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis hls 1.7.0.0' terminated with code 0 2022-08-04 19:49:37.8220000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:37.8220000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.8220000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.8250000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis ghc 9.0.2' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:37.8460000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose whereis ghc 9.0.2' terminated with code 0 2022-08-04 19:49:37.8460000 [client] INFO Checking for ghcup installation 2022-08-04 19:49:37.8460000 [client] INFO Trying to find the ghcup executable in: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.8460000 [client] DEBUG Location after path variables substitution: /Users/matux/.ghcup/bin/ghcup 2022-08-04 19:49:37.8490000 [client] INFO Executing '/Users/matux/.ghcup/bin/ghcup --no-verbose run --hls 1.7.0.0 --cabal 3.6.2.0 --stack 2.7.5 --ghc 9.0.2 --install' in cwd '/Users/matux/code/rollbar/rollbar-flutter' 2022-08-04 19:49:37.9450000 [client] DEBUG Execution of '/Users/matux/.ghcup/bin/ghcup --no-verbose run --hls 1.7.0.0 --cabal 3.6.2.0 --stack 2.7.5 --ghc 9.0.2 --install' terminated with code 0 2022-08-04 19:49:37.9450000 [client] INFO Activating the language server in working dir: /Users/matux/code/matux/haskell/firstprinciples/ch02 (the workspace folder) 2022-08-04 19:49:37.9460000 [client] INFO run command: /Users/matux/.ghcup/tmp/ghcup-ghc-9.0.2_cabal-3.6.2.0_hls-1.7.0.0_stack-2.7.5/haskell-language-server-wrapper --lsp 2022-08-04 19:49:37.9460000 [client] INFO debug command: /Users/matux/.ghcup/tmp/ghcup-ghc-9.0.2_cabal-3.6.2.0_hls-1.7.0.0_stack-2.7.5/haskell-language-server-wrapper --lsp 2022-08-04 19:49:37.9460000 [client] INFO server environment variables: 2022-08-04 19:49:37.9460000 [client] INFO PATH=/Users/matux/.ghcup/tmp/ghcup-ghc-9.0.2_cabal-3.6.2.0_hls-1.7.0.0_stack-2.7.5:/Users/matux/.nvm/versions/node/v12.16.3/bin:/Users/matux/opt/anaconda3/bin:/Users/matux/opt/anaconda3/condabin:/Users/matux/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/matux/.cabal/bin:/Users/matux/.ghcup/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources:/Users/matux/code/apple/swift/utils:/Users/matux/fvm/default/bin:/Users/matux/.pub-cache/bin:/usr/local/go/bin:/Users/matux/code/bin/chromium/depot_tools 2022-08-04 19:49:37.9460000 [client] DEBUG document selector patten: /Users/matux/code/matux/haskell/firstprinciples/ch02/**/* 2022-08-04 19:49:37.9520000 [client] INFO Starting language server No 'hie.yaml' found. Try to discover the project type! Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.7.0.0 x86_64 ghc-9.2.2 Current directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 Operating system: darwin Arguments: ["--lsp"] Cradle directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 Cradle type: Stack Tool versions found on the $PATH cabal: 3.6.2.0 stack: 2.7.5 ghc: 9.0.2 Consulting the cradle to get project GHC version... Project GHC version: 9.0.2 haskell-language-server exe candidates: ["haskell-language-server-9.0.2","haskell-language-server"] Launching haskell-language-server exe at:/Users/matux/.ghcup/tmp/ghcup-ghc-9.0.2_cabal-3.6.2.0_hls-1.7.0.0_stack-2.7.5/haskell-language-server-9.0.2 2022-08-04T19:49:42.653092Z | Info | No log file specified; using stderr. 2022-08-04T19:49:42.653624Z | Info | haskell-language-server version: 1.7.0.0 (GHC: 9.0.2) (PATH: /Users/matux/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.0.2) 2022-08-04T19:49:42.654281Z | Info | Directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 2022-08-04T19:49:42.654590Z | Info | Starting (haskell-language-server) LSP server... GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} PluginIds: [ pragmas , floskell , fourmolu , tactics , ormolu , rename , retrie , brittany , callHierarchy , class , haddockComments , eval , importLens , qualifyImportedNames , refineImports , moduleName , hlint , splice , alternateNumberFormat , selectionRange , changeTypeSignature , ghcide-hover-and-symbols , ghcide-code-actions-imports-exports , ghcide-code-actions-type-signatures , ghcide-code-actions-bindings , ghcide-code-actions-fill-holes , ghcide-completions , ghcide-type-lenses , ghcide-core , LSPRecorderCallback ] 2022-08-04T19:49:42.657983Z | Info | Logging heap statistics every 60.00s 2022-08-04T19:49:42.852229Z | Info | Staring LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! 2022-08-04T19:49:42.854554Z | Info | Started LSP server in 0.00s 2022-08-04T19:49:43.527365Z | Warning | Currently, HLS supports GHC 9 only partially. See [issue #297](https://github.com/haskell/haskell-language-server/issues/297) for more detail. 2022-08-04T19:49:43.533544Z | Info | Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 1928356383550609214 "file:///Users/matux/code/matux/haskell/firstprinciples/ch02"], clientSettings = hashed Nothing} [Info - 4:49:43 PM] haskell-language-server version: 1.7.0.0 (GHC: 9.0.2) (PATH: /Users/matux/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.0.2) 2022-08-04T19:49:43.544993Z | Info | Cradle path: app/Main.hs 2022-08-04T19:49:43.545143Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for app/Main.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. [Info - 4:49:43 PM] Directory: /Users/matux/code/matux/haskell/firstprinciples/ch02 [Info - 4:49:43 PM] Starting (haskell-language-server) LSP server... GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False} PluginIds: [ pragmas , floskell , fourmolu , tactics , ormolu , rename , retrie , brittany , callHierarchy , class , haddockComments , eval , importLens , qualifyImportedNames , refineImports , moduleName , hlint , splice , alternateNumberFormat , selectionRange , changeTypeSignature , ghcide-hover-and-symbols , ghcide-code-actions-imports-exports , ghcide-code-actions-type-signatures , ghcide-code-actions-bindings , ghcide-code-actions-fill-holes , ghcide-completions , ghcide-type-lenses , ghcide-core , LSPRecorderCallback ] [Info - 4:49:43 PM] Logging heap statistics every 60.00s [Info - 4:49:43 PM] Staring LSP server... If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option! [Info - 4:49:43 PM] Started LSP server in 0.00s [Warn - 4:49:43 PM] Currently, HLS supports GHC 9 only partially. See [issue #297](https://github.com/haskell/haskell-language-server/issues/297) for more detail. [Info - 4:49:43 PM] Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 1928356383550609214 "file:///Users/matux/code/matux/haskell/firstprinciples/ch02"], clientSettings = hashed Nothing} [Info - 4:49:43 PM] Cradle path: app/Main.hs [Warn - 4:49:43 PM] No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for app/Main.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-08-04 16:49:44.039097 [ThreadId 94] INFO hie-bios: Using main module: 1. Package `ch02' component ch02:exe:ch02-exe with main-is file: /Users/matux/code/matux/haskell/firstprinciples/ch02/app/Main.hs 2022-08-04 16:49:44.227073 [ThreadId 94] INFO hie-bios: Building all executables for `ch02' once. After a successful build of all of them, only specified executables will be rebuilt. 2022-08-04 16:49:44.228136 [ThreadId 94] INFO hie-bios: ch02> initial-build-steps (lib + exe) 2022-08-04 16:49:44.445507 [ThreadId 94] INFO hie-bios: The following GHC options are incompatible with GHCi and have not been passed to it: -threaded 2022-08-04 16:49:44.445597 [ThreadId 94] INFO hie-bios: Configuring GHCi with the following packages: ch02 2022-08-04 16:49:45.041465 [ThreadId 122] INFO hie-bios: /Users/matux/code/matux/haskell/firstprinciples/ch02/.stack-work/install/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.stack/snapshots/x86_64-osx/d18e8cabd336abf66bccf2a12100537cd4d6de13fd57d0709d64649a967251ba/9.0.2/pkgdb:/Users/matux/.ghcup/ghc/9.0.2/lib/ghc-9.0.2/lib/package.conf.d 2022-08-04T19:50:42.657702Z | Info | Live bytes: 0.00MB Heap size: 0.00MB [Info - 4:50:42 PM] Live bytes: 0.00MB Heap size: 0.00MB ```
hasufell commented 1 year ago

https://haskell-language-server.readthedocs.io/en/stable/configuration.html?highlight=hie.yaml#configuring-your-project-build

Try to add hie.yaml file with contents:

cradle:
  stack:

@fendor the README doesn't mention hie.yaml at all. Additionally, the extension could issue a popup on missing hie.yaml errors linking somewhere. I don't wanna fix this stuff in the extension though, it belongs in hie-bios.

matux commented 1 year ago

@hasufell Thank you, that did something. However, I'm still getting an error on Setup.hs

Could not load module ‘Distribution.Simple’
It is a member of the hidden package ‘Cabal-3.4.1.0’.
You can run ‘:set -package Cabal’ to expose it.
(Note: this unloads all the modules in the current scope.)not found

I tried adding component: "haskell-language-server:lib" to hie.yaml as stated in the link you gave me, but I get a different error:

Failed to parse result of calling stack
Error parsing targets: Unknown local package: haskell-language-server
Note that to specify options to be passed to GHCi, use the --ghci-options flag
cradle

I've been going for hours trying to fix this @ https://github.com/haskell/haskell-language-server/issues/3076 thinking there's some version conflict between HLS and GHC.

I appreciate your response!

hasufell commented 1 year ago

component: "haskell-language-server:lib

This is not correct. You have to specify components from your package. Refer to the cabal documentation about components: https://cabal.readthedocs.io/en/stable/cabal-commands.html?highlight=component#cabal-v2-build

You can use gen-hie --stack with https://hackage.haskell.org/package/implicit-hie

But this looks like you may be hitting some sort of https://github.com/haskell/vscode-haskell#ghc-abis-dont-match

Try the system-ghc setting of stack.

fendor commented 1 year ago

Loading of Setup.hs is currently not supported. If you don't know you need it, just delete it. Saves you some headaches.

matux commented 1 year ago

Thanks guys, I really appreciate all your help! Apologies for the cross-posting, btw.