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

HLS crashes immediately in vscode #2117

Closed
tscholak opened this issue Aug 20, 2021 · 7 comments
Closed

HLS crashes immediately in vscode #2117

tscholak opened this issue Aug 20, 2021 · 7 comments
Labels
status: needs info Not actionable, because there's missing information

Comments

@tscholak
Copy link
Contributor

tscholak commented Aug 20, 2021

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.
@isovector
Copy link
Collaborator

Probably a duplicate of #2087

@isovector isovector added status: fixed in master status: needs info Not actionable, because there's missing information labels Aug 21, 2021
@tscholak
Copy link
Contributor Author

tscholak commented Aug 21, 2021

Hmm, I've built hls from rev 790afc6 which was head in master yesterday.

What strikes me here is that I don't get any useful debug output at all, the log is almost empty.

Something else to note is that I'm building hls with dynamic linking, see the linked "build configuration" above for more details.

@pepeiborra
Copy link
Collaborator

#2087 was fixed in the Haskell vscode extension, are you on the latest version?

@tscholak
Copy link
Contributor Author

@pepeiborra I'm on 790afc6 which was the latest version until 5 minutes ago.

@pepeiborra
Copy link
Collaborator

@pepeiborra I'm on 790afc6 which was the latest version until 5 minutes ago.

I am talking about the vscode extension

@tscholak
Copy link
Contributor Author

tscholak commented Aug 21, 2021

I'm on v1.6.0

@tscholak
Copy link
Contributor Author

I was on v1.4.0 on the machine where I observed the problem. When I updated to v1.6.0, the problem went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs info Not actionable, because there's missing information
Projects
None yet
Development

No branches or pull requests

3 participants