haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.72k stars 368 forks source link

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

Open runeksvendsen opened 3 years ago

runeksvendsen commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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?

runeksvendsen commented 3 years ago

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.

runeksvendsen commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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:

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

fendor commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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.

georgefst commented 1 year ago
  • 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 commented 1 year ago

@georgefst Exactly, that is one of the things that https://github.com/haskell/cabal/pull/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 commented 1 year ago

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 commented 1 year ago

I think so, https://github.com/haskell/haskell-language-server/issues/2010#issuecomment-882053507 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 commented 1 year ago

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 commented 1 year ago

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.