Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

HLS fails to start: setNumCapabilities: Capability count (0) must be positive with one core or -j1 #2457

Closed
vanceism7 opened this issue Dec 8, 2021 · 10 comments · Fixed by #3334
Labels
can-workaround os: nixos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@vanceism7
Copy link

Your environment

Which OS do you use:
Ubuntu 21.10 (in a vm with a windows host)

Which lsp-client do you use:
Vscode with Haskell extension

Describe your project (alternative: link to the project):
This is happening on a newly generated shpadoinkle project. (Instructions to generate here: https://shpadoinkle.org/getting-started)

Steps to reproduce

  1. Generate the project using bash <( curl https://gitlab.com/platonic/shpadoinkle/-/raw/master/snowman/generate.sh )
  2. Use nix environment selector vscode extension to use the shell.nix environment generated from the previous command.
  3. Open up Main.hs to spin up haskell language server

Expected behaviour

Haskell language server starts up

Actual behaviour

The server crashes 5 times in 3 minutes (impressive 🥇)
And looking at the output logs shows the following:

<my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5 --lsp --debug
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)

Include debug information

Debug output:

I don't have a haskell-language-server-wrapper, but I do have haskell-language-server-wrapper-1.5.1-linux; output below:
Note: The commands were run in the nix-shell environment

No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper-1.5.1-linux) Version 1.5.1.0, Git revision 745ef26f406dbdd5e4a538585f8519af9f1ccb09 (dirty) x86_64 ghc-8.10.7
Current directory: <ny-project-dir>/hls-test
Operating system: linux
Arguments: ["--debug","."]
Cradle directory: <my-project-dir>/hls-test
Cradle type: Cabal

Tool versions found on the $PATH
cabal:          3.0.0.0
stack:          Not found
ghc:            8.6.5


Consulting the cradle to get project GHC version...
Project GHC version: 8.6.5
haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server"]
Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.6.5, haskell-language-server

I also have haskell-language-server-1.5.1-linux-8.6.5 so I tried this as well:

haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
 ghcide setup tester in <my-project-dir>hls-test.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in <my-project-dir>hls-test
Found 2 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  ()

Step 3/4: Initializing the IDE
2021-12-08 22:47:34.964823323 [ThreadId 7] DEBUG hls:   Initializing exports map from hiedb
2021-12-08 22:47:34.965019597 [ThreadId 7] DEBUG hls:   Done initializing exports map from hiedb (0)

Step 4/4: Type checking the files
2021-12-08 22:47:34.967253605 [ThreadId 31] INFO hls:   Consulting the cradle for "src/Main.hs"
2021-12-08 22:47:34.96754745 [ThreadId 31] WARNING hls: No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/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.
2021-12-08 22:47:34.97172261 [ThreadId 31] DEBUG hls:   Output from setting up the cradle Cradle {cradleRootDir = "<my-project-dir>hls-test", cradleOptsProg = CradleAction: Cabal}
2021-12-08 22:47:35.018110496 [ThreadId 37] INFO hie-bios:      Build profile: -w ghc-8.6.5 -O1
2021-12-08 22:47:35.020863462 [ThreadId 37] INFO hie-bios:      In order, the following will be built (use -v for more details):
2021-12-08 22:47:35.021624465 [ThreadId 37] INFO hie-bios:       - hls-test-0.1.0.0 (exe:hls-test) (first run)
2021-12-08 22:47:35.034908441 [ThreadId 37] INFO hie-bios:      Configuring executable 'hls-test' for hls-test-0.1.0.0..
2021-12-08 22:47:35.866877028 [ThreadId 37] INFO hie-bios:      Preprocessing executable 'hls-test' for hls-test-0.1.0.0..
2021-12-08 22:47:35.972752743 [ThreadId 31] DEBUG hls:  Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-odir","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-hidir","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-stubdir","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-i","-i<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-isrc","-i<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/autogen","-i<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/global-autogen","-I<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/autogen","-I<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/global-autogen","-I<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/hls-test-tmp","-optP-include","-optP<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/build/hls-test/autogen/cabal_macros.h","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","<my-home-dir>/.cabal/store/ghc-8.6.5/package.db","-package-db","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/packagedb/ghc-8.6.5","-package-db","<my-home-dir>/.cache/hie-bios/dist-hls-test-c9135d96f0508c1fe2b9f49fa7cb2e57/build/x86_64-linux/ghc-8.6.5/hls-test-0.1.0.0/x/hls-test/package.conf.inplace","-package-id","Shpadoinkle-0.3.2.0-849WTKkFyhsHiVdZQpZR4K","-package-id","Shpadoinkle-backend-snabbdom-0.3.0.2-GBIzA6hsfKp4RZkSx8TNz7","-package-id","Shpadoinkle-html-0.3.0.2-1zauPpxpowV2nYKBXTwvGR","-package-id","base-4.12.0.0","-package-id","text-1.2.3.1","-XHaskell2010","src/Main.hs","-Wall","-Werror","-Wcompat","-fwarn-redundant-constraints","-fwarn-incomplete-uni-patterns","-fwarn-tabs","-fwarn-incomplete-record-updates","-fwarn-identities","-hide-all-packages"], componentRoot = "<my-project-dir>hls-test", componentDependencies = ["hls-test.cabal","cabal.project","cabal.project.local"]},"/nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/lib/ghc-8.6.5")
2021-12-08 22:47:36.021305006 [ThreadId 31] INFO hls:   Using interface files cache dir: <my-home-dir>/.cache/ghcide/main-2de8183b1cedd2ea4446e9cdb1350587efd30761
2021-12-08 22:47:36.025152482 [ThreadId 31] INFO hls:   Making new HscEnv[main]
2021-12-08 22:47:36.038089181 [ThreadId 31] DEBUG hls:  New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("cabal.project",Nothing),("cabal.project.local",Nothing),("hls-test.cabal",Just 2021-12-08 22:02:50.299776915 UTC)])
2021-12-08 22:47:36.039790559 [ThreadId 31] DEBUG hls:  Known files updated: fromList [(TargetFile NormalizedFilePath "<my-project-dir>hls-test/src/Main.hs",fromList ["<my-project-dir>hls-test/src/Main.hs"])]
2021-12-08 22:47:36.041765613 [ThreadId 10] DEBUG hls:  Finishing build session(exception: AsyncCancelled)
2021-12-08 22:47:36.041818724 [ThreadId 31] DEBUG hls:  Restarting build session due to new component with queue ["User TypeCheck"] for keys [GhcSessionIO; ,GetKnownTargets; ] (aborting the previous one took 0.00s)
2021-12-08 22:47:36.045579537 [ThreadId 59] DEBUG hls:  hlint:getIdeas:file:NormalizedFilePath "<my-project-dir>hls-test/Setup.hs"
2021-12-08 22:47:36.045798301 [ThreadId 60] DEBUG hls:  hlint:getIdeas:file:NormalizedFilePath "<my-project-dir>hls-test/src/Main.hs"
2021-12-08 22:47:36.04634139 [ThreadId 89] INFO hls:    Consulting the cradle for "Setup.hs"
2021-12-08 22:47:36.094762181 [ThreadId 89] WARNING hls:        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.
2021-12-08 22:47:36.0981999 [ThreadId 89] DEBUG hls:    Output from setting up the cradle Cradle {cradleRootDir = "<my-project-dir>hls-test", cradleOptsProg = CradleAction: Cabal}
2021-12-08 22:47:36.100015571 [ThreadId 89] DEBUG hls:  Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: <my-project-dir>hls-test","filepath: <my-project-dir>hls-test/Setup.hs","prefixes:","(\"src/Main.hs\",Cabal {component = Just \"hls-test:exe:hls-test\"})"]}]
2021-12-08 22:47:36.138489053 [ThreadId 85] INFO hls:   File:     <my-project-dir>hls-test/Setup.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Multi Cradle: No prefixes matched
  pwd: <my-project-dir>hls-test
  filepath: <my-project-dir>hls-test/Setup.hs
  prefixes:
  ("src/Main.hs",Cabal {component = Just "hls-test:exe:hls-test"})
2021-12-08 22:47:36.178941889 [ThreadId 60] DEBUG hls:  hlint:getIdeas:setExtensions:[Cpp,OverlappingInstances,UndecidableInstances,IncoherentInstances,UndecidableSuperClasses,MonomorphismRestriction,MonoPatBinds,MonoLocalBinds,RelaxedPolyRec,ExtendedDefaultRules,ForeignFunctionInterface,UnliftedFFITypes,InterruptibleFFI,CApiFFI,GHCForeignImportPrim,JavaScriptFFI,ParallelArrays,TemplateHaskell,TemplateHaskellQuotes,ImplicitParams,ImplicitPrelude,ScopedTypeVariables,AllowAmbiguousTypes,UnliftedNewtypes,BangPatterns,TypeFamilies,TypeFamilyDependencies,TypeInType,OverloadedStrings,OverloadedLists,NumDecimals,DisambiguateRecordFields,RecordWildCards,RecordPuns,ViewPatterns,GADTs,GADTSyntax,NPlusKPatterns,DoAndIfThenElse,BlockArguments,RebindableSyntax,ConstraintKinds,PolyKinds,DataKinds,InstanceSigs,ApplicativeDo,StandaloneDeriving,DeriveDataTypeable,AutoDeriveTypeable,DeriveFunctor,DeriveTraversable,DeriveFoldable,DeriveGeneric,DefaultSignatures,DeriveAnyClass,DeriveLift,DerivingStrategies,DerivingVia,TypeSynonymInstances,FlexibleContexts,FlexibleInstances,ConstrainedClassMethods,MultiParamTypeClasses,NullaryTypeClasses,FunctionalDependencies,UnicodeSyntax,ExistentialQuantification,MagicHash,EmptyDataDecls,KindSignatures,RoleAnnotations,ParallelListComp,MonadComprehensions,GeneralizedNewtypeDeriving,PostfixOperators,TupleSections,PatternGuards,LiberalTypeSynonyms,RankNTypes,ImpredicativeTypes,TypeOperators,ExplicitNamespaces,PackageImports,ExplicitForAll,AlternativeLayoutRuleTransitional,DatatypeContexts,NondecreasingIndentation,RelaxedLayout,TraditionalRecordSyntax,LambdaCase,MultiWayIf,BinaryLiterals,HexFloatLiterals,DuplicateRecordFields,OverloadedLabels,EmptyCase,PatternSynonyms,PartialTypeSignatures,NamedWildCards,TypeApplications,Strict,StrictData,MonadFailDesugaring,EmptyDataDeriving,NumericUnderscores,QuantifiedConstraints,ImportQualifiedPost,CUSKs,StandaloneKindSignatures,StarIsType]
Files that failed:
 * <my-project-dir>hls-test/Setup.hs

Completed (1 file worked, 1 file failed)
2021-12-08 22:47:36.267938427 [ThreadId 55] INFO hls:   finish: User TypeCheck (took 0.22s)

Paste the logs from the lsp-client, you can check instructions about for VS Code here

LSP logs:
2021-12-08 23:03:29.4110000 [client] DEBUG Environment variables:
2021-12-08 23:03:29.4110000 [client] DEBUG   USER: <user-name>
2021-12-08 23:03:29.4110000 [client] DEBUG   SSH_CLIENT: <ip-addr> 64910 22
2021-12-08 23:03:29.4110000 [client] DEBUG   XDG_SESSION_TYPE: tty
2021-12-08 23:03:29.4110000 [client] DEBUG   SHLVL: 1
2021-12-08 23:03:29.4110000 [client] DEBUG   MOTD_SHOWN: pam
2021-12-08 23:03:29.4110000 [client] DEBUG   HOME: <my-home-dir>
2021-12-08 23:03:29.4120000 [client] DEBUG   LOGNAME: <user-name>
2021-12-08 23:03:29.4120000 [client] DEBUG   _: <my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node
2021-12-08 23:03:29.4120000 [client] DEBUG   XDG_SESSION_CLASS: user
2021-12-08 23:03:29.4120000 [client] DEBUG   XDG_SESSION_ID: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   PATH: /nix/store/90y23lrznwmkdnczk1dzdsq4m35zj8ww-bash-interactive-5.1-p8/bin:/nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/bin:/nix/store/7azp14fh9dy5jfbhl5c2fk1gd1hkd7ja-patchelf-0.9/bin:/nix/store/1v0410l20p343l6cvpijz8bi4if2ysh6-gcc-wrapper-9.2.0/bin:/nix/store/pbfnvqlf8bgp09gy601554ph83y4qzp5-gcc-9.2.0/bin:/nix/store/v235kcs9jfd5vw9d1ylwilqvf49dyjhg-glibc-2.30-bin/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/sh8l6la5mv29girlgswnd23s0vfpcfdn-binutils-wrapper-2.31.1/bin:/nix/store/nyhj00w339gk2gaj3faz70gjrnbmam8v-binutils-2.31.1/bin:/nix/store/v235kcs9jfd5vw9d1ylwilqvf49dyjhg-glibc-2.30-bin/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112/bin:/nix/store/rq94vj555avg3fc6dar4661gr23npay6-cabal-install-3.0.0.0/bin:/nix/store/q05kc3a1n89i3sbi83jm5lwxssz2k16z-ghcid-0.7.7-bin/bin:/nix/store/n0g5y761ys3d005wb1kgm2hvdy5ahr0y-stylish-haskell-0.9.2.2/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/1rhis3wsl2jbd78c6yy4cqsb4xk0lb43-findutils-4.7.0/bin:/nix/store/18wym0gzky4svbv9afyx4nl7kr297n3q-diffutils-3.7/bin:/nix/store/ymk93mnzr0d6qafpr19rngrkzmslm8lg-gnused-4.8/bin:/nix/store/sjvvyjp67sssnpl0k0g5ysmcm8xscwp4-gnugrep-3.4/bin:/nix/store/5c1damhkybvqliiccxn510iy8sck5304-gawk-5.0.1/bin:/nix/store/2b4c17l8b5kml3kh9q4jb8zclc2gwafs-gnutar-1.32/bin:/nix/store/rkbz618nhks3x8rb2pzbrrqp4bzlhdy5-gzip-1.10/bin:/nix/store/xhrb919k3pfx8ldbg3mky8cfbkipsgb8-bzip2-1.0.6.0.1-bin/bin:/nix/store/83r0d1ifwprxhkzzryrcy07hx4bmpxiq-gnumake-4.2.1/bin:/nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin:/nix/store/6wv4ba40i9scmwqzylh4cmlfak9zqckn-patch-2.7.6/bin:/nix/store/hsa8hmhkpkagfx1j9pbhsgfr2z4y2z5b-xz-5.2.4-bin/bin:<my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/bin:<my-home-dir>/.nix-profile/bin:<my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_AGENT_FOLDER: <my-home-dir>/.vscode-server
2021-12-08 23:03:29.4120000 [client] DEBUG   XDG_RUNTIME_DIR: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   LANG: en_US.UTF-8
2021-12-08 23:03:29.4120000 [client] DEBUG   SHELL: /nix/store/90y23lrznwmkdnczk1dzdsq4m35zj8ww-bash-interactive-5.1-p8/bin/bash
2021-12-08 23:03:29.4120000 [client] DEBUG   PWD: <my-project-dir>/hls-test
2021-12-08 23:03:29.4120000 [client] DEBUG   SSH_CONNECTION: <ip-addr> 64910 <ip-addr> 22
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: <my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/remote/node_modules
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_CWD: <my-home-dir>
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_PROFILES: /nix/var/nix/profiles/default <my-home-dir>/.nix-profile
2021-12-08 23:03:29.4120000 [client] DEBUG   LS_COLORS: 
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
2021-12-08 23:03:29.4120000 [client] DEBUG   LESSCLOSE: /usr/bin/lesspipe %s %s
2021-12-08 23:03:29.4120000 [client] DEBUG   LESSOPEN: | /usr/bin/lesspipe %s
2021-12-08 23:03:29.4120000 [client] DEBUG   XDG_DATA_DIRS: /usr/local/share:/usr/share:/var/lib/snapd/desktop
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_LOG_NATIVE: false
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_AMD_ENTRYPOINT: vs/server/remoteExtensionHostProcess
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_PIPE_LOGGING: true
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_VERBOSE_LOGGING: true
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_EXTHOST_WILL_SEND_SOCKET: true
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_HANDLES_UNCAUGHT_ERRORS: true
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_LOG_STACK: false
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_NLS_CONFIG: {"locale":"en","availableLanguages":{}}
2021-12-08 23:03:29.4120000 [client] DEBUG   BROWSER: <my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/bin/helpers/browser.sh
2021-12-08 23:03:29.4120000 [client] DEBUG   VSCODE_IPC_HOOK_CLI: /run/user/1000/vscode-ipc-318e63d4-763b-4ea5-bd70-d108d33c38cd.sock
2021-12-08 23:03:29.4120000 [client] DEBUG   .-~~\
                           /     \ _
                           ~x   .-~_)_
                             ~x".-~   ~-.
                         _   ( /         \   _
                         ||   T  o  o     Y  ||
                       : null
2021-12-08 23:03:29.4120000 [client] DEBUG   AR: ar
2021-12-08 23:03:29.4120000 [client] DEBUG   AS: as
2021-12-08 23:03:29.4120000 [client] DEBUG   CC: gcc
2021-12-08 23:03:29.4120000 [client] DEBUG   COMPILER: ghc865
2021-12-08 23:03:29.4120000 [client] DEBUG   CONFIG_SHELL: /nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin/bash
2021-12-08 23:03:29.4120000 [client] DEBUG   CXX: g++
2021-12-08 23:03:29.4120000 [client] DEBUG   HOST_PATH: /nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112/bin:/nix/store/rq94vj555avg3fc6dar4661gr23npay6-cabal-install-3.0.0.0/bin:/nix/store/q05kc3a1n89i3sbi83jm5lwxssz2k16z-ghcid-0.7.7-bin/bin:/nix/store/n0g5y761ys3d005wb1kgm2hvdy5ahr0y-stylish-haskell-0.9.2.2/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/1rhis3wsl2jbd78c6yy4cqsb4xk0lb43-findutils-4.7.0/bin:/nix/store/18wym0gzky4svbv9afyx4nl7kr297n3q-diffutils-3.7/bin:/nix/store/ymk93mnzr0d6qafpr19rngrkzmslm8lg-gnused-4.8/bin:/nix/store/sjvvyjp67sssnpl0k0g5ysmcm8xscwp4-gnugrep-3.4/bin:/nix/store/5c1damhkybvqliiccxn510iy8sck5304-gawk-5.0.1/bin:/nix/store/2b4c17l8b5kml3kh9q4jb8zclc2gwafs-gnutar-1.32/bin:/nix/store/rkbz618nhks3x8rb2pzbrrqp4bzlhdy5-gzip-1.10/bin:/nix/store/xhrb919k3pfx8ldbg3mky8cfbkipsgb8-bzip2-1.0.6.0.1-bin/bin:/nix/store/83r0d1ifwprxhkzzryrcy07hx4bmpxiq-gnumake-4.2.1/bin:/nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin:/nix/store/6wv4ba40i9scmwqzylh4cmlfak9zqckn-patch-2.7.6/bin:/nix/store/hsa8hmhkpkagfx1j9pbhsgfr2z4y2z5b-xz-5.2.4-bin/bin
2021-12-08 23:03:29.4120000 [client] DEBUG   IN_NIX_SHELL: impure
2021-12-08 23:03:29.4120000 [client] DEBUG   LD: ld
2021-12-08 23:03:29.4120000 [client] DEBUG   LOCALE_ARCHIVE: /nix/store/yyx02r3bp750h1r06637wbahnrfvngvl-glibc-locales-2.30/lib/locale/locale-archive
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_BINTOOLS: /nix/store/sh8l6la5mv29girlgswnd23s0vfpcfdn-binutils-wrapper-2.31.1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_BINTOOLS_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_BUILD_CORES: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_BUILD_TOP: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_CC: /nix/store/1v0410l20p343l6cvpijz8bi4if2ysh6-gcc-wrapper-9.2.0
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_ENFORCE_NO_NATIVE: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_GHC: /nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/bin/ghc
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_GHCPKG: /nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/bin/ghc-pkg
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_GHC_DOCDIR: /nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/share/doc/ghc/html
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_GHC_LIBDIR: /nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/lib/ghc-8.6.5
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_HARDENING_ENABLE: fortify stackprotector pic strictoverflow format relro bindnow
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_INDENT_MAKE: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_LDFLAGS: -rpath /nix/store/611n6hsnqwvdly0lyrxrac10i98zqzbi-ghc-shell-for-hls-test-0.1.0.0-0/lib64 -rpath /nix/store/611n6hsnqwvdly0lyrxrac10i98zqzbi-ghc-shell-for-hls-test-0.1.0.0-0/lib  -L/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112/lib -L/nix/store/6wfnl0kvgz9r1z8wp53ildc2hgsysybl-libffi-3.3/lib -L/nix/store/d38akrx7lljl6pl5gqdxcsmf57k9w08v-gmp-6.2.0/lib -L/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112/lib -L/nix/store/6wfnl0kvgz9r1z8wp53ildc2hgsysybl-libffi-3.3/lib -L/nix/store/d38akrx7lljl6pl5gqdxcsmf57k9w08v-gmp-6.2.0/lib
2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_STORE: /nix/store
2021-12-08 23:03:29.4120000 [client] DEBUG   NM: nm
2021-12-08 23:03:29.4120000 [client] DEBUG   OBJCOPY: objcopy
2021-12-08 23:03:29.4120000 [client] DEBUG   OBJDUMP: objdump
2021-12-08 23:03:29.4120000 [client] DEBUG   OLDPWD: null
2021-12-08 23:03:29.4120000 [client] DEBUG   RANLIB: ranlib
2021-12-08 23:03:29.4120000 [client] DEBUG   READELF: readelf
2021-12-08 23:03:29.4120000 [client] DEBUG   SIZE: size
2021-12-08 23:03:29.4120000 [client] DEBUG   SOURCE_DATE_EPOCH: 1
2021-12-08 23:03:29.4120000 [client] DEBUG   STRINGS: strings
2021-12-08 23:03:29.4120000 [client] DEBUG   STRIP: strip
2021-12-08 23:03:29.4120000 [client] DEBUG   TEMP: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   TEMPDIR: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   TMP: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   TMPDIR: /run/user/1000
2021-12-08 23:03:29.4120000 [client] DEBUG   buildInputs: /nix/store/rq94vj555avg3fc6dar4661gr23npay6-cabal-install-3.0.0.0 /nix/store/k94ppkwsxpxy6nlvv04c7q3xc0fjnl2r-ghcid-0.7.7 /nix/store/n0g5y761ys3d005wb1kgm2hvdy5ahr0y-stylish-haskell-0.9.2.2
2021-12-08 23:03:29.4120000 [client] DEBUG   builder: /nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin/bash
2021-12-08 23:03:29.4120000 [client] DEBUG   configureFlags: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsBuildBuild: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsBuildBuildPropagated: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsBuildTarget: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsBuildTargetPropagated: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsHostHost: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsHostHostPropagated: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsTargetTarget: 
2021-12-08 23:03:29.4120000 [client] DEBUG   depsTargetTargetPropagated: 
2021-12-08 23:03:29.4120000 [client] DEBUG   doCheck: 
2021-12-08 23:03:29.4120000 [client] DEBUG   doInstallCheck: 
2021-12-08 23:03:29.4120000 [client] DEBUG   installPhase: null
2021-12-08 23:03:29.4120000 [client] DEBUG   name: ghc-shell-for-hls-test-0.1.0.0-0
2021-12-08 23:03:29.4120000 [client] DEBUG   nativeBuildInputs: /nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages
2021-12-08 23:03:29.4120000 [client] DEBUG   out: /nix/store/611n6hsnqwvdly0lyrxrac10i98zqzbi-ghc-shell-for-hls-test-0.1.0.0-0
2021-12-08 23:03:29.4120000 [client] DEBUG   outputs: out
2021-12-08 23:03:29.4120000 [client] DEBUG   patches: 
2021-12-08 23:03:29.4120000 [client] DEBUG   phases: installPhase
2021-12-08 23:03:29.4120000 [client] DEBUG   propagatedBuildInputs: 
2021-12-08 23:03:29.4120000 [client] DEBUG   propagatedNativeBuildInputs: 
2021-12-08 23:03:29.4120000 [client] DEBUG   shell: /nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin/bash
2021-12-08 23:03:29.4120000 [client] DEBUG   shellHook: null
2021-12-08 23:03:29.4120000 [client] DEBUG   stdenv: /nix/store/vilh5ays3ymz3xkwk0fri2a70lha7pfc-stdenv-linux
2021-12-08 23:03:29.4120000 [client] DEBUG   strictDeps: 
2021-12-08 23:03:29.4120000 [client] DEBUG   system: x86_64-linux
2021-12-08 23:03:29.4120000 [client] INFO Searching for server executables haskell-language-server-wrapper,haskell-language-server in $PATH
2021-12-08 23:03:29.4120000 [client] INFO $PATH environment variable: /nix/store/90y23lrznwmkdnczk1dzdsq4m35zj8ww-bash-interactive-5.1-p8/bin:/nix/store/v4hf47773w7gp0nllvqjh2qgz55h1byk-ghc-8.6.5-with-packages/bin:/nix/store/7azp14fh9dy5jfbhl5c2fk1gd1hkd7ja-patchelf-0.9/bin:/nix/store/1v0410l20p343l6cvpijz8bi4if2ysh6-gcc-wrapper-9.2.0/bin:/nix/store/pbfnvqlf8bgp09gy601554ph83y4qzp5-gcc-9.2.0/bin:/nix/store/v235kcs9jfd5vw9d1ylwilqvf49dyjhg-glibc-2.30-bin/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/sh8l6la5mv29girlgswnd23s0vfpcfdn-binutils-wrapper-2.31.1/bin:/nix/store/nyhj00w339gk2gaj3faz70gjrnbmam8v-binutils-2.31.1/bin:/nix/store/v235kcs9jfd5vw9d1ylwilqvf49dyjhg-glibc-2.30-bin/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112/bin:/nix/store/rq94vj555avg3fc6dar4661gr23npay6-cabal-install-3.0.0.0/bin:/nix/store/q05kc3a1n89i3sbi83jm5lwxssz2k16z-ghcid-0.7.7-bin/bin:/nix/store/n0g5y761ys3d005wb1kgm2hvdy5ahr0y-stylish-haskell-0.9.2.2/bin:/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31/bin:/nix/store/1rhis3wsl2jbd78c6yy4cqsb4xk0lb43-findutils-4.7.0/bin:/nix/store/18wym0gzky4svbv9afyx4nl7kr297n3q-diffutils-3.7/bin:/nix/store/ymk93mnzr0d6qafpr19rngrkzmslm8lg-gnused-4.8/bin:/nix/store/sjvvyjp67sssnpl0k0g5ysmcm8xscwp4-gnugrep-3.4/bin:/nix/store/5c1damhkybvqliiccxn510iy8sck5304-gawk-5.0.1/bin:/nix/store/2b4c17l8b5kml3kh9q4jb8zclc2gwafs-gnutar-1.32/bin:/nix/store/rkbz618nhks3x8rb2pzbrrqp4bzlhdy5-gzip-1.10/bin:/nix/store/xhrb919k3pfx8ldbg3mky8cfbkipsgb8-bzip2-1.0.6.0.1-bin/bin:/nix/store/83r0d1ifwprxhkzzryrcy07hx4bmpxiq-gnumake-4.2.1/bin:/nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin:/nix/store/6wv4ba40i9scmwqzylh4cmlfak9zqckn-patch-2.7.6/bin:/nix/store/hsa8hmhkpkagfx1j9pbhsgfr2z4y2z5b-xz-5.2.4-bin/bin:<my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/bin:<my-home-dir>/.nix-profile/bin:<my-home-dir>/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2021-12-08 23:03:29.4180000 [client] INFO Downloading haskell-language-server
2021-12-08 23:03:29.4180000 [client] INFO Using <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell to store downloaded binaries
2021-12-08 23:03:29.4180000 [client] INFO Fetching the latest release from GitHub or from cache
2021-12-08 23:03:30.3930000 [client] INFO The latest known release is 1.5.1
2021-12-08 23:03:30.3930000 [client] INFO Figure out the ghc version to use or advertise an installation link for missing components
2021-12-08 23:03:30.3940000 [client] INFO Working out the project GHC version. This might take a while...
2021-12-08 23:03:30.4030000 [client] INFO Executing '<my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.5.1-linux --project-ghc-version' in cwd '<my-project-dir>/hls-test' to get the project or file ghc version
2021-12-08 23:03:30.4880000 [client] INFO Execution of '<my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.5.1-linux --project-ghc-version' terminated with code 0
2021-12-08 23:03:30.4880000 [client] INFO The GHC version for the project or file: 8.6.5
2021-12-08 23:03:30.4890000 [client] INFO Search for binary haskell-language-server-Linux-8.6.5 in release assets
2021-12-08 23:03:30.4890000 [client] INFO Looking for an existing <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5 or download it from release assets
2021-12-08 23:03:30.4890000 [client] INFO Activating the language server in working dir: <my-project-dir>/hls-test (the workspace folder)
2021-12-08 23:03:30.4890000 [client] INFO run command: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5 --lsp -d
2021-12-08 23:03:30.4890000 [client] INFO debug command: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5 --lsp -d
2021-12-08 23:03:30.4890000 [client] INFO server environment variables:
2021-12-08 23:03:30.4890000 [client] DEBUG document selector patten: <my-project-dir>/hls-test/**/*
2021-12-08 23:03:30.4940000 [client] INFO Starting language server
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)
[Info  - 11:03:30 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)
[Info  - 11:03:30 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)
[Info  - 11:03:30 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)
[Info  - 11:03:30 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.5.1.0 (GHC: 8.6.5) (PATH: <my-home-dir>/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-1.5.1-linux-8.6.5) (GIT hash: 745ef26f406dbdd5e4a538585f8519af9f1ccb09)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "callHierarchy",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "refineImports",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: <my-project-dir>/hls-test
 haskell-language-server-1.5.1-linux-8.6.5: user error (setNumCapabilities: Capability count (0) must be positive)
[Error - 11:03:30 PM] Connection to server got closed. Server will not be restarted.
@vanceism7 vanceism7 added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Dec 8, 2021
@jneira
Copy link
Member

jneira commented Dec 9, 2021

Hmm, thanks for reporting the issue fullfilling all the required info.
That error is new for me so it needs to be investigated asap. As a workround maybe a hls version from nix could work (not a nix expert but hls is available via nix)

@jneira
Copy link
Member

jneira commented Dec 9, 2021

Ok it seems a error reported by ghc cause the the number of concurrent threads set cant be zero:

https://downloads.haskell.org/ghc/8.10.7/docs/html/libraries/base-4.14.3.0/src/GHC-Conc-Sync.html#setNumCapabilities

Dont know how is it even possible
The unique en var which could be related i've seen is

2021-12-08 23:03:29.4120000 [client] DEBUG   NIX_BUILD_CORES: 1

@michaelpj
Copy link
Collaborator

Related? #727 #1828

@jneira
Copy link
Member

jneira commented Dec 9, 2021

Yeah, i also think so, thanks for linking them. #727 talks about a hang but i think it worths to pass -j2 to hls
@vanceism7 could you try adding -j2 to the haskell.serverExtraArgs vscode extension config option to check if that is a workaround?

@pepeiborra
Copy link
Collaborator

The right fix here is to amend the call site of setNumCapabilities with (max 1)

@vanceism7
Copy link
Author

Yeah, i also think so, thanks for linking them. #727 talks about a hang but i think it worths to pass -j2 to hls @vanceism7 could you try adding -j2 to the haskell.serverExtraArgs vscode extension config option to check if that is a workaround?

Just tried this - it does work as a workaround 🎉! Thanks for the quick response on this issue everyone

@jneira jneira changed the title HLS fails to start: setNumCapabilities: Capability count (0) must be positive HLS fails to start: setNumCapabilities: Capability count (0) must be positive with one core or -j1 Dec 9, 2021
@tmattha
Copy link

tmattha commented Apr 14, 2022

Hey. Just wanted to say that there is no workaround currently, when using the VSCode extension. I configured "haskell.serverExtraArgs": "-j2" but the args are somehow not getting forwarded. I tried j2 from the command line and that is fine, but it does not appear to be possible to set this from the VSCode extension.

As this was in a VM, I worked around by assigning more cores, but I think it should be fixed properly.

@michaelpj
Copy link
Collaborator

Please report this as a bug in the vscode-haskell issue tracker if you haven't already!

@michaelpj
Copy link
Collaborator

Did you mean to reopen this Pepe?

@pepeiborra
Copy link
Collaborator

The right fix here is to amend the call site of setNumCapabilities with (max 1)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
can-workaround os: nixos type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants