Skip to content

HLS version 0.8.0 frequently stuck when saving files #1214

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

Closed
poscat0x04 opened this issue Jan 16, 2021 · 7 comments · Fixed by #1232
Closed

HLS version 0.8.0 frequently stuck when saving files #1214

poscat0x04 opened this issue Jan 16, 2021 · 7 comments · Fixed by #1232
Labels
component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@poscat0x04
Copy link

Your environment

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

haskell-language-server version: 0.8.0.0 (GHC: 8.10.3) (PATH: /nix/store/px0cwk7xl79yq4b1pvkwaxfkwaswhis1-haskell-language-server-0.8.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		Not found
ghc:		8.10.3

Which lsp-client do you use:
vscode
Describe your project (alternative: link to the project):
cabal project
Contents of hie.yaml:
implicit hie

Steps to reproduce

I'm not sure how to reproduce this issue reliably, but it seems that this issue comes up a lot more frequently when I'm editing a file that has errors (type errors/parse errors, etc.) in it.

Expected behaviour

HLS should not stuck

Include debug information

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

Debug output:
<paste your logs here>

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

LSP logs:
<paste your logs here>
@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs repro labels Jan 16, 2021
@poscat0x04
Copy link
Author

update: I can reliably reproduce this issue just by commenting out code

@jneira
Copy link
Member

jneira commented Jan 16, 2021

@poscat0x04 that definitely can help to debug the issue, please, could you give the instructions to reproduce it (linking to the source code if possible)?

@poscat0x04
Copy link
Author

poscat0x04 commented Jan 16, 2021

Oh right, sorry. To reproduce:

  1. Open any Haskell file
  2. type {-
  3. type enter
  4. type -}
  5. save file
  6. delete the lines containing comments you just entered
  7. save file
  8. repeat 2-7 for a few times, HLS will then stuck

@konn
Copy link
Collaborator

konn commented Jan 16, 2021

I have encountered this bug these days, too.
I suspect Eval plugin's comment parser, but no evidence.
If so, it can be addressed by using getParsedModuelWithComments instead of the custom comment parser to detect doctests.

@berberman
Copy link
Collaborator

I could repro following above steps.

@Ailrun
Copy link
Member

Ailrun commented Jan 16, 2021

That probably comes from Eval plugin. @poscat0x04 and @berberman, could you check whether your log messages contain something like "Parser error" or so?

@konn
Copy link
Collaborator

konn commented Jan 18, 2021

If there is no other people to do with, I will try to rewrite doctest parser in Eval Plugin with getParsedModuleWithComments to see how this can affect this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants