-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 and stops working when a file contains "\r" in a comment #1158
Comments
I suspect you can disable the Eval plugin to work around this. |
Thanks for the swift reply. Any pointer (to documentation about) how to disable the plugin? |
It looks like the Eval plugin parser does not work well with files containing |
\r
.
\r
.
I send a quick fix for this issue first, but I still think a full-power parser library might be better for parsing. |
* Update the style for Token.hs in eval plugin * Fix haskell#1158
Your environment
haskell-language-server version: 0.8.0.0 (GHC: 8.8.4) (PATH: /home/xxx/.config/Code - OSS/User/globalStorage/haskell.haskell/haskell-language-server-0.8.0-linux-8.8.4) (GIT hash: eb58f13f7b8e4f9bc771af30ff9fd82dc4309ff5) Tool versions found on the $PATH cabal: 2.4.1.0 stack: 2.5.1 ghc: Not found
Which lsp-client do you use: VS Code (Code OSS) 1.51.1
Contents of
hie.yaml
:Steps to reproduce
It seems there is a problem with parsing comments like
{----------------}
. The contents between the "braces" does not seem to matter (see below). I use these as "section separators" in long modules and after Haskell language server auto-updated I almost immediately got instability problems. The following message appears in logging output:This output is based on the following input module with nothing but a comment in it:
I tried changing the contents of the comment with similar results.
Strangely enough, this does not happen in every module, while I have such separators in many files of the project.
Expected behaviour
Comments of the form
{-
-}
are handled normally.Actual behaviour
HLS repeatedly crashes and restarts. A message like above repeatedly appears in logging. Sometimes an "unmatched {-" (or something like this) appears in the editor as a problem pop-up, even after closing the comment.
The text was updated successfully, but these errors were encountered: