Description
Your environment
Output of haskell-language-server --probe-tools
or haskell-language-server-wrapper --probe-tools
:
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: 2.7.3
ghc: 9.0.1
Which OS do you use:
NixOS
Which lsp-client do you use:
vscode
Describe your project (alternative: link to the project):
https://github.com/hasktorch/hasktorch/tree/flakify-nix-derivations
Contents of hie.yaml
:
https://github.com/hasktorch/hasktorch/blob/flakify-nix-derivations/hie.yaml
Build configuration of HLS:
https://github.com/hasktorch/hasktorch/blob/8697384718783151dd909809f1f79aaa3d7f1e09/flake.nix#L61-L194
Steps to reproduce
$ nix --version
nix (Nix) 2.4pre20210802_47e96bb
$ nix develop
$ code .
Expected behaviour
HLS should not crash in vscode.
Actual behaviour
HLS immediately crashes five times in vscode.
Include debug information
Execute in the root of your project the command haskell-language-server --debug .
and paste the logs here:
Too much to post here. HLS run from the command line compiles the project just fine and exits normally.
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
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "ormolu",PluginId "retrie",PluginId "callHierarchy",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
in directory: /home/tscholak/Projects/thirdParty/hasktorch
Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Info - 7:18:27 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "ormolu",PluginId "retrie",PluginId "callHierarchy",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
in directory: /home/tscholak/Projects/thirdParty/hasktorch
Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Info - 7:18:29 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "ormolu",PluginId "retrie",PluginId "callHierarchy",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
in directory: /home/tscholak/Projects/thirdParty/hasktorch
Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Info - 7:18:32 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "ormolu",PluginId "retrie",PluginId "callHierarchy",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
in directory: /home/tscholak/Projects/thirdParty/hasktorch
Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Info - 7:18:33 PM] Connection to server got closed. Server will restart.
haskell-language-server version: 1.3.0.0 (GHC: 9.0.1) (PATH: /nix/store/q3ydvvxiwj2m6c1y90n8mcqbx60ih0vp-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "ormolu",PluginId "retrie",PluginId "callHierarchy",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",PluginId "ghcide-code-actions-fill-holes",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
in directory: /home/tscholak/Projects/thirdParty/hasktorch
Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Error - 7:18:34 PM] Connection to server got closed. Server will not be restarted.