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

Improve performance of discovering the ghc version used by the project #2010

Open
runeksvendsen opened this issue Jul 12, 2021 · 22 comments
Open
Labels
component: hie-bios performance Issues about memory consumption, responsiveness, etc. type: enhancement New feature or request

Comments

@runeksvendsen
Copy link
Contributor

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /Users/rune/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-darwin) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)
Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4

Which OS do you use:
MacOS
Which lsp-client do you use:
VS Code
Describe your project (alternative: link to the project):
https://github.com/input-output-hk/cardano-node
Contents of hie.yaml:

cradle:
  cabal:
    - path: "cardano-api/src"
      component: "lib:cardano-api"

    - path: "cardano-api/test"
      component: "cardano-api:test:cardano-api-test"

    - path: "cardano-api/test/./"
      component: "lib:cardano-api-test"

    - path: "cardano-submit-api/src"
      component: "lib:cardano-submit-api"

    - path: "cardano-cli/src"
      component: "lib:cardano-cli"

    - path: "cardano-cli/app/cardano-cli.hs"
      component: "cardano-cli:exe:cardano-cli"

    - path: "cardano-cli/test"
      component: "cardano-cli:test:cardano-cli-test"

    - path: "cardano-cli/test"
      component: "cardano-cli:test:cardano-cli-golden"

    - path: "cardano-client-demo/./ScanBlocks.hs"
      component: "cardano-client-demo:exe:scan-blocks"

    - path: "cardano-config/src"
      component: "lib:cardano-config"

    - path: "cardano-node/src"
      component: "lib:cardano-node"

    - path: "cardano-node/app/cardano-node.hs"
      component: "cardano-node:exe:cardano-node"

    - path: "cardano-node/app/Paths_cardano_node.hs"
      component: "cardano-node:exe:cardano-node"

    - path: "cardano-node/test"
      component: "cardano-node:test:cardano-node-test"

    - path: "cardano-node-chairman/app/cardano-node-chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands/Version.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Cardano/Chairman/Commands/Run.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/app/Paths_cardano_node_chairman.hs"
      component: "cardano-node-chairman:exe:cardano-node-chairman"

    - path: "cardano-node-chairman/test"
      component: "cardano-node-chairman:test:chairman-tests"

    - path: "cardano-node-chairman/testnet/Main.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Paths_cardano_node_chairman.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Byron.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/ByronShelley.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Shelley.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Commands/Version.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "cardano-node-chairman/testnet/Testnet/Run.hs"
      component: "cardano-node-chairman:exe:cardano-testnet"

    - path: "hedgehog-extras/src"
      component: "lib:hedgehog-extras"

Steps to reproduce

  1. Open up VS Code (for this repo)
  2. Observe that it takes a long time for all extensions to activate, including HLS

Expected behaviour

Popup saying e.g. "Resolving dependencies..."

Actual behaviour

No extensions activate, stuff like saving a file hangs; all waiting for HLS to finish its cabal cradle operation (which is busy doing "Resolving dependencies...").

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
$ /Users/rune/Library/Application\ Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-darwin --debug .
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper-1.2.0-darwin) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed
haskell-language-server-wrapper-1.2.0-darwin: callProcess: /Users/rune/.local/bin/haskell-language-server "--debug" "." (exit 1): failed

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs:
[client] run command: "haskell-language-server --lsp -d"
[client] debug command: "haskell-language-server --lsp -d"
[client] server cwd: undefined
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
[Info  - 9:31:13 AM] Connection to server got closed. Server will restart.
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
[Info  - 9:31:13 AM] Connection to server got closed. Server will restart.
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
[Info  - 9:31:39 AM] Connection to server got closed. Server will restart.
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
[Info  - 9:31:39 AM] Connection to server got closed. Server will restart.
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.10.4
haskell-language-server exe candidates: ["haskell-language-server-8.10.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/rune/.local/bin/haskell-language-server
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
Run entered for haskell-language-server-wrapper(haskell-language-server) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Operating system: darwin
Arguments: ["--lsp","-d"]
Cradle directory: /Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node
Cradle type: Cabal

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4


Consulting the cradle to get project GHC version...
Failed to get project GHC version:CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Couldn't execute cabal --builddir=/Users/rune/.cache/hie-bios/dist-cardano-node-8f0ac91cbef9230f95861216bea2b816 v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version"]}
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
haskell-language-server: callProcess: /Users/rune/.local/bin/haskell-language-server "--lsp" "-d" (exit 1): failed
[Error - 9:31:51 AM] Connection to server got closed. Server will not be restarted.

@runeksvendsen
Copy link
Contributor Author

A simpler way to reproduce this may be to open a project that uses a cabal cradle, while replacing the cabal executable with a script containing:

echo Resolving dependencies...
sleep 60

and observing that the HLS extension does not activate, and that it blocks other extensions from activating.

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. performance Issues about memory consumption, responsiveness, etc. type: setup type: enhancement New feature or request labels Jul 12, 2021
@jneira
Copy link
Member

jneira commented Jul 12, 2021

Hi, thanks for the detailed bug report. I agree that we should show some kind of feedback while hls is loading the cradle.
We are showing in the status bas a progress notification while loading files and indexing it in the hiedb, is not showing anything while cabal/stack is building?

and that it blocks other extensions from activating.

Afaics the haskell syntax extension is activated quite fast, without waiting for the full loading of the file, what other related (or not) extensions are being blocked?

@jneira jneira added status: needs info Not actionable, because there's missing information and removed type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 13, 2021
@runeksvendsen
Copy link
Contributor Author

We are showing in the status bas a progress notification while loading files and indexing it in the hiedb, is not showing anything while cabal/stack is building?

After further analysis, I think the problem may be that getting project GHC version can be really slow. Here's an example of it taking more than a minute (with the aforementioned repo):

$ time /Users/rune/Library/Application\ Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-darwin --project-ghc-version
Found "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/hie.yaml" for "/Users/rune/Obsidian/iohk/code/os-voltaire-fork/cardano-node/a"
 --project-ghc-version  61.78s user 1.15s system 98% cpu 1:04.13 total

Given that this takes so long, launchHaskellLanguageServer should also be slow to finish, since it also attempts to find the GHC version at startup. Perhaps all cabal-related operations should be async, and provide some sort of progress notification (as e.g. building and indexing does)?

Afaics the haskell syntax extension is activated quite fast, without waiting for the full loading of the file, what other related (or not) extensions are being blocked?

It's not quite deterministic, unfortunately. I've experienced e.g. the smooth scroll extension not activating until HLS is done starting up. Yesterday I experienced VS Code being really slow to save a file ("File create action", I believe the title of the progress dialog was) while HLS was starting up.

I think this is related to dependency resolution being slow for this repo, as it's the only repo I've worked with that has both really slow dependency resolution and makes the VS Code GUI hang on startup.

@jneira jneira removed the status: needs info Not actionable, because there's missing information label Jul 13, 2021
@runeksvendsen
Copy link
Contributor Author

It appears the problem is that the cabal v2-exec command does dependency resolution before running the GHC command. So, running the command

cabal v2-exec --with-compiler <path_to_ghc> ghc -v0 -- --numeric-version

(which HLS runs on startup to find the project's GHC version) will take as long to finish as it takes cabal to resolve dependencies, which can be a very long time (e.g. in the case of the https://github.com/input-output-hk/cardano-node repo).

@jneira
Copy link
Member

jneira commented Jul 18, 2021

Many thanks for the further investigation. It seems when the extension calls cabal/stack to "simply" determine what ghc version is being used by the project, no progress indicator is being emitted
We have to add that prgress notification in the extension with an informative message ("Determining haskell-language-server version" or something similar)

@runeksvendsen
Copy link
Contributor Author

I agree that's a good idea. However, it would also be nice if we could issue a cabal command that finds the correct GHC version without requiring dependency resolution. As far as I can see, it's not necessary for cabal to resolve dependencies before reporting back which GHC version it's using.

@runeksvendsen
Copy link
Contributor Author

On my system, HLS runs the command below to find the GHC version, which takes 60 seconds for the cardano-node repo:

$ time cabal v2-exec --with-compiler /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --numeric-version
8.10.4
cabal v2-exec --with-compiler  ghc -v0 -- --numeric-version  61.89s user 1.00s system 98% cpu 1:03.79 total

Is there a reason we can't just execute the GHC script whose path is passed to cabal via the --with-compiler switch above (/Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b) and pass it the --numeric-version argument like below?

Running this takes a fraction of the time:

$ time /Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b --numeric-version
8.10.4
/Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b   0.05s user 0.04s system 49% cpu 0.173 total

@jneira
Copy link
Member

jneira commented Jul 19, 2021

Is there a reason we can't just execute the GHC script whose path is passed to cabal via the --with-compiler switch above (/Users/rune/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b) and pass it the --numeric-version argument like below?

Running this takes a fraction of the time

good question, the code making that call is in hie-bios, to investigate (maybe @fendor remember that part faster)

@fendor
Copy link
Collaborator

fendor commented Jul 19, 2021

When we execute the wrapper, we need to get a ghc version. Whose ghc version should it report? It can't use the ghc on the path as it is wrong if cabal configure -w ... has been invoked. We can't just hardcode it somewhere, as this is used to find out which hls version should be launched.

@jneira
Copy link
Member

jneira commented Jul 20, 2021

thanks @fendor, so we need the real ghc before calling the wrapper (and getting it before is the reason the wrapper is so fast)
anyways maybe we could make cabal exec ghc skip dependency resolution, as the ghc being used does not depend of them

@jneira
Copy link
Member

jneira commented Jul 20, 2021

The faster invocation i am able to conjure is cabal exec ghc --offline --keep-going -- --numeric-version. Not sure if it is reliable enough though.
@runeksvendsen could you try it in your end to see how it improves times?

@runeksvendsen
Copy link
Contributor Author

@jneira Unfortunately that command is as slow as the current one:

$ time cabal exec ghc --offline --keep-going -- --numeric-version
Warning: Requested index-state 2021-03-15T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-03-14T23:47:09Z).
Resolving dependencies...
8.10.4
cabal exec ghc --offline --keep-going -- --numeric-version  63.81s user 0.83s system 98% cpu 1:05.41 total

Perhaps it would make sense to limit this issue to implementing your suggested fix:

We have to add that progress notification in the extension with an informative message ("Determining haskell-language-server version" or something similar)

and leave the task of optimizing this command, in the cases where dependency resolution is slow, to a different issue?

@jneira
Copy link
Member

jneira commented Jul 20, 2021

mmm or the other way around: create an issue in the vscode extension project about adding the progress notification and let this open until we get a way to reduce times:

  • there are several ongoing improvements in cabal which can gives us a faster invocation (or we can raise an issue there). the definitive solution will be, as in several other issues, the coming of show-build-info: Implement show-build-info for cabal-install cabal#7478
  • we have to investigate how to apply it to stack, maybe it is already is possible although we cant skip the download of ghc if it is not already installed

in any case the improvement should come through a hie-bios change, as we are using it for get the ghc version

@fendor
Copy link
Collaborator

fendor commented Jul 20, 2021

we have to investigate how to apply it to stack, maybe it is already is possible although we cant skip the download of ghc if it is not already installed

Not sure if that needs improvement, as stack does virtually no solving, our current usage of stack exec ghc -- --numeric-version seems fine to me.

@runeksvendsen
Copy link
Contributor Author

runeksvendsen commented Jul 20, 2021

@fendor what happens if the stack exec ghc ... command prompts the "stack setup" phase in which stack downloads and installs GHC? Is this step performed in advance by hie-bios?

As far as I can see, stack should be able to return the GHC version without actually running GHC since the GHC version can be deduced statically from the snapshot.

mmm or the other way around: create an issue in the vscode extension project about adding the progress notification [...]

That seems sensible. I will do that.

@fendor
Copy link
Collaborator

fendor commented Jul 20, 2021

As far as I can see, stack should be able to return the GHC version without actually running GHC since the GHC version can be deduced statically from the snapshot.

That is true, but I don't think stack currently exposes suitable info at the moment.

what happens if the stack exec ghc ... command prompts the "stack setup" phase in which stack downloads and installs GHC? Is this step performed in advance by hie-bios?

Yes it is (directly before it), but I see how that might be annoying.

@jneira jneira changed the title VS Code GUI freezes on long-running "Resolving dependencies..."-operation Improve performance of the ghc version used by the project discovery Aug 2, 2021
@georgefst georgefst changed the title Improve performance of the ghc version used by the project discovery Improve performance of discovering the ghc version used by the project Oct 4, 2023
@georgefst
Copy link
Collaborator

georgefst commented Oct 4, 2023

  • definitive solution will be, as in several other issues, the coming of show-build-info

Does that actually help anything here? The implementation we've ended up with is that the build info is generated as a side-effect of cabal build, so it seems building will be unavoidable.

We could propose that Cabal add a special command for getting the GHC version, which doesn't require solving for dependencies. But it doesn't seem worth it, since as soon as HLS is then loaded, the first thing we'd do is build the project anyway (although actually, if the first build is called from the wrapper, does that mean they use different build dirs?).

@fendor
Copy link
Collaborator

fendor commented Oct 4, 2023

@georgefst Exactly, that is one of the things that haskell/cabal#7500 was supposed to implement but it got slightly stalled.
Maybe we can get it merged with only the relevant ghc-path output...

But it doesn't seem worth it, since as soon as HLS is then loaded, the first thing we'd do is build the project anyway

Right, for completely cold builds, it makes no real difference except for generally slightly better start up times.
For the hot case, it likely chops the startup time in half, which is quite useful.

if the first build is called from the wrapper, does that mean they use different build dirs?

No, we still pass the correct build directory.

@georgefst
Copy link
Collaborator

For the hot case, it likely chops the startup time in half, which is quite useful.

Does it? It's not clear to me what repeated work would otherwise be performed.

@fendor
Copy link
Collaborator

fendor commented Oct 5, 2023

I think so, #2010 (comment) says that cabal resolves dependencies for running the cabal exec ... command. Afterwards, we run cabal repl, which also needs to check that everything is up-to-date. Thus, if we can avoid one of the two expensive commands that basically perform the same work, I'd expect a considerable start-up performance improvement, especially on massive projects.

@georgefst
Copy link
Collaborator

But if the .cabal file hasn't changed in between those two invocations, then I think the second one notices that from the timestamp, and doesn't repeat dependency resolution.

@fendor
Copy link
Collaborator

fendor commented Oct 5, 2023

I would hope so but checking everything is up-to-date, but even then, it would be much better if obtaining the ghc version isn't performing the resolution because it increases the time to startup of HLS.

So, the wrapper finds the ghc version and then launches the appropriate HLS version. If that takes long, the user has no immediate feedback and no IDE feature works.

But if finding the GHC version and launching HLS is extremely quick, then HLS can provide certain IDE features immediately, such as goto definition and hover (iirc) based on existing results in hiedb. Even if no such artefacts exist, we can at least provide UX feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hie-bios performance Issues about memory consumption, responsiveness, etc. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants