Closed
Description
Your environment
VSCode About
Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
Windows About
OS Name Microsoft Windows 10 Pro
Version 10.0.19045 Build 19045
Steps to reproduce
starting the following projeect:
project: https://github.com/theGhostJW/pyrethrum
Expected behaviour
HLS to start
Actual behaviour
I had trouble figuring out the exact GHC version for the project. Falling back to using 'ghc.exe'.
The Haskell (Pyrethrum) server crashed 5 times in the last 3 minutes. The server will not be restarted.
Debug information
Extension Output
2023-09-29 22:50:13.6360000 [client] INFO Finding haskell-language-server
2023-09-29 22:50:13.6460000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:16.3300000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:16.3350000 [client] INFO Executing 'ghcup --no-verbose upgrade' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:25.8090000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:26.8730000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:26.8770000 [client] INFO Executing 'ghcup --no-verbose list -t hls -c installed -r' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:28.2560000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:29.2150000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:29.2190000 [client] INFO Executing 'ghcup --no-verbose list -t cabal -c installed -r' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:30.9420000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:31.9430000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:31.9480000 [client] INFO Executing 'ghcup --no-verbose list -t stack -c installed -r' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:34.2980000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:35.1970000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:35.2000000 [client] INFO Executing 'ghcup --no-verbose whereis hls 2.3.0.0' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:35.6400000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:36.9010000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:36.9080000 [client] INFO Executing 'ghcup --no-verbose whereis cabal 3.10.1.0' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:37.4250000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:38.4880000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:38.4920000 [client] INFO Executing 'ghcup --no-verbose whereis stack 2.11.1' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:39.7850000 [client] INFO Executing 'ghc.exe --numeric-version' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:40.3170000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:41.2350000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:41.2380000 [client] INFO Executing 'ghcup --no-verbose run --hls 2.3.0.0 --cabal 3.10.1.0 --stack 2.11.1 --install' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:42.8430000 [client] INFO Working out the project GHC version. This might take a while...
2023-09-29 22:50:42.8480000 [client] INFO Executing 'haskell-language-server-wrapper --project-ghc-version' in cwd 'c:\Pyrethrum'
2023-09-29 22:50:43.7120000 [client] ERROR Error executing 'haskell-language-server-wrapper --project-ghc-version' with error code 3221225781
2023-09-29 22:50:43.7120000 [client] ERROR stderr:
2023-09-29 22:50:43.7140000 [client] ERROR Error: haskell-language-server --project-ghc-version exited with exit code 3221225781:
2023-09-29 22:50:43.7190000 [client] INFO Executing 'ghc.exe --numeric-version' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:44.6040000 [client] INFO Platform constants: Windows, A_64
2023-09-29 22:50:44.6050000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:45.4440000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:45.4490000 [client] INFO Executing 'ghcup --no-verbose list -t hls -c installed -r' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:46.0450000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:46.8750000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:46.8780000 [client] INFO Executing 'ghcup --no-verbose whereis bindir' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:47.1920000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:48.0530000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:48.0570000 [client] INFO Executing 'ghcup --no-verbose whereis hls 2.3.0.0' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:48.3440000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:49.1950000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:49.1970000 [client] INFO Executing 'ghcup --no-verbose whereis ghc 9.6.2' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:49.4650000 [client] INFO Checking for ghcup installation
2023-09-29 22:50:50.2920000 [client] INFO found ghcup at ghcup
2023-09-29 22:50:50.2960000 [client] INFO Executing 'ghcup --no-verbose run --hls 2.3.0.0 --cabal 3.10.1.0 --stack 2.11.1 --ghc 9.6.2 --install' in cwd 'C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code'
2023-09-29 22:50:53.0400000 [client] INFO Activating the language server in working dir: c:\Pyrethrum (the workspace folder)
2023-09-29 22:50:53.0430000 [client] INFO run command: C:\ghcup\tmp\ghcup-ghc-9.6.2_cabal-3.10.1.0_hls-2.3.0.0_stack-2.11.1\haskell-language-server-wrapper.exe --lsp
2023-09-29 22:50:53.0430000 [client] INFO debug command: C:\ghcup\tmp\ghcup-ghc-9.6.2_cabal-3.10.1.0_hls-2.3.0.0_stack-2.11.1\haskell-language-server-wrapper.exe --lsp
2023-09-29 22:50:53.0430000 [client] INFO server environment variables:
2023-09-29 22:50:53.0430000 [client] INFO PATH=C:\ghcup\tmp\ghcup-ghc-9.6.2_cabal-3.10.1.0_hls-2.3.0.0_stack-2.11.1;C:\zstd-v1.5.5-win64;C:\Python39\Scripts\;C:\Python39\;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Dell\DW WLAN Card;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseHg\;C:\Users\thegh\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\scala\bin;C:\Users\thegh\AppData\Roaming\npm;C:\Program Files (x86)\Pandoc\;C:\Program Files (x86)\sbt\bin;C:\ProgramData\chocolatey\bin;C:\ProgramData\osquery;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\watchman;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;C:\Program Files\PowerShell\6\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\PuTTY\;C:\Program Files\Graphviz\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\stack2cabal;C:\hpackExe;C:\Program Files\TortoiseGit\bin;C:\ghcup\bin;C:\Users\thegh\.dotnet\tools;C:\Program Files\dotnet\;C:\Program Files\dotnet\dotnet.exe;C:\Ruby25-x64\bin;C:\Users\thegh\AppData\Roaming\local\bin\stack.exe;C:\Users\thegh\AppData\Roaming\local\bin\;C:\Users\thegh\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Program Files\gheckoWebDriver;C:\Program Files\Hasktags;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Oni;C:\Users\thegh\AppData\Local\Yarn\bin;C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\thegh\AppData\Roaming\npm;C:\Users\thegh\AppData\Roaming\npm\node_modules\typescript\bin;C:\Users\thegh\AppData\Local\GitHubDesktop\bin;C:\Users\thegh\AppData\Local\Pandoc\;;C:\Users\thegh\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\thegh\.dotnet\tools
2023-09-29 22:50:53.0730000 [client] INFO Starting language server
[Info - 8:50:53 AM] Connection to server got closed. Server will restart.
[Info - 8:50:54 AM] Connection to server got closed. Server will restart.
[Info - 8:50:54 AM] Connection to server got closed. Server will restart.
[Info - 8:50:54 AM] Connection to server got closed. Server will restart.
[Error - 8:50:54 AM] Connection to server got closed. Server will not be restarted.
Running the problematic command from powershell:
PS C:\Pyrethrum> haskell-language-server-wrapper --project-ghc-version
No 'hie.yaml' found. Try to discover the project type!
2023-09-29T22:53:50.663813Z | Debug | executing command: cabal exec -v0 -- ghc --print-libdir
2023-09-29T22:54:06.517187Z | Debug | executing command: cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2023-09-29T22:54:25.862445Z | Debug | executing command: cabal --builddir=C:\Users\thegh\AppData\Local\hie-bios\dist-Pyrethrum-6adb05f38f0b3833b2a44f0f33573aec v2-exec --with-compiler C:\Users\thegh\AppData\Local\hie-bios\wrapper-340ffcbd9b6dc8c3bed91eb5c533e4e3.exe --with-hc-pkg C:\ghcup\ghc\9.6.2\bin\ghc-pkg-9.6.2.exe ghc -v0 -- --numeric-version
9.6.2