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

haskell-language-server sends lots of "dummy" progress messages with default haskell-tools config #295

Open
z-campbell opened this issue Nov 26, 2023 · 15 comments
Assignees

Comments

@z-campbell
Copy link

Neovim version (nvim -v)

v0.9.2

Operating system/version

Windows 11

Output of :checkhealth haskell-tools

OK

How to reproduce the issue

Editing any Haskell file triggers a cascade of "In progress...WARN" log entries in the bottom right hand corner of the nvim window. Nothing appears broken but its inconvenient.
image

Expected behaviour

I expect it not to show this or to be able to hide it.

Actual behaviour

see above

Log files

No response

The minimal config used to reproduce this issue.

{
'mrcjkb/haskell-tools.nvim',
version = '^3', -- Recommended
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
},

@z-campbell z-campbell added the bug Something isn't working label Nov 26, 2023
@mrcjkb
Copy link
Owner

mrcjkb commented Nov 26, 2023

Hey 👋

Those messages are shown by fidget.nvim, which recently got an update.

You can refer to its documentation for how to limit the number of LSP messages to show.

@mrcjkb mrcjkb closed this as completed Nov 26, 2023
@mrcjkb mrcjkb added upstream (other plugin) and removed bug Something isn't working labels Nov 26, 2023
@j-hui
Copy link

j-hui commented Nov 28, 2023

Hi there! Fidget maintainer here; I'm actually also encountering this bug myself: j-hui/fidget.nvim#171

I've been doing some logging and I found that haskell-tools seems to be sending some "dummy" progress messages. For instance, here's are three messages I received after making a small change and writing my buffer:



[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/poll.lua:113: Poller ( progress ) polling once at 38.376s
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/progress/lsp.lua:134: Polling messages from 1 ( haskell-tools.nvim )
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
  cancellable = false,
  done = false,
  lsp_id = 1,
  lsp_name = "haskell-tools.nvim",
  title = "Processing",
  token = "144"
}
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
  cancellable = false,
  done = false,
  lsp_id = 1,
  lsp_name = "haskell-tools.nvim",
  token = "126"
}
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/poll.lua:113: Poller ( progress ) polling once at 38.377s
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/progress/lsp.lua:134: Polling messages from 1 ( haskell-tools.nvim )
[INFO  Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
  cancellable = false,
  done = true,
  lsp_id = 1,
  lsp_name = "haskell-tools.nvim",
  title = "Processing",
  token = "144"
}

Note that haskell-tools completes the task with token "144", but doesn't follow up on the task with token "126". Each buffer write leads to another one of these stale tasks.

I also tested this HLS alone (i.e., configuring it without haskell-tools.nvim), and I don't get these stale messages.

Update: it also doesn't seem to happen on Neovim nightly (i.e., 0.10.0). It only happens with 0.9.4 for me.

@j-hui
Copy link

j-hui commented Nov 28, 2023

I wasn't able to track down where that empty message was coming from (and gave up), but I added an option to Fidget that mitigates it in j-hui/fidget.nvim@fe60ce7

@mrcjkb
Copy link
Owner

mrcjkb commented Nov 28, 2023

@j-hui 🤔 interesting.
It almost certainly has to be haskell-language-server sending those messages. My guess would be that it's something to do with the default settings set by haskell-tools, and it probably needs to be fixed upstream.

I'll reopen this issue and bisect on the config on Friday.

Thanks for the fix on your end 🙏

@mrcjkb mrcjkb reopened this Nov 28, 2023
@mrcjkb mrcjkb changed the title "In progress...WARN" notifications in bottom right corner haskell-language-server sends lots of "dummy" progress messages with default haskell-tools config Nov 28, 2023
@mrcjkb mrcjkb self-assigned this Nov 28, 2023
@mrcjkb
Copy link
Owner

mrcjkb commented Dec 1, 2023

@j-hui I have set progress.ignore_empty_message = false in my fidget config, but I can't seem to reproduce the issue in any of my projects (I'm using NixOS and haskell-language-server version: 2.4.0.0 (GHC: 9.4.8)).

Which OS and haskell-language-server version are you using? Do you have a project I can try to reproduce this with?

I found this hls issue, which seems to be related.

@j-hui
Copy link

j-hui commented Dec 7, 2023

Hey @mrcjkb thanks for taking a look into this, and sorry for not responding sooner. I'm on macOS with haskell-language-server version: 1.10.0.0 (GHC: 8.10.7). Maybe it's just because mine is so out of date.

I took a look at that issue and it does indeed look related, but I haven't had time this week to dig any deeper myself.

As for the project, it was basically just a bare project created using cabal init.

@mrcjkb
Copy link
Owner

mrcjkb commented Dec 7, 2023

No problem 😄

I'm not too sure how to approach this at the moment anyway.

Thanks for the info, it'll definitely be useful when I do get back to this.

@bwkam
Copy link

bwkam commented Jan 29, 2024

I can confirm this.

@mrcjkb
Copy link
Owner

mrcjkb commented Jan 29, 2024

@bwkam are you (or a plugin you're using) having any issues with it?

@bwkam
Copy link

bwkam commented Jan 29, 2024

@bwkam are you (or a plugin you're using) having any issues with it?

I was able to reproduce OP's issue, hls keeps sending these dummy messages
image

@mrcjkb
Copy link
Owner

mrcjkb commented Jan 29, 2024

@bwkam are you (or a plugin you're using) having any issues with it?

I was able to reproduce OP's issue, hls keeps sending these dummy messages

I understand that. 😄
I was asking if you are having issues with it, or if j-hui/fidget.nvim@fe60ce7 fixed it for you? (if there aren't any issues, this isn't very high priority right now).

@j-hui
Copy link

j-hui commented Jan 29, 2024

I don't bandwidth to dig into this just now, but for archaeological purposes: @bwkam can you please include the versions of HLS, Neovim, haskell-tools.nvim, and fidget.nvim you're using? Thanks!

@bwkam
Copy link

bwkam commented Jan 29, 2024

Neovim: 0.9.4
haskell-tools.nvim: f6a1221
HLS: 2.4.0.0
fidget.nvim: 2023-11-20

@bwkam
Copy link

bwkam commented Jan 29, 2024

@bwkam are you (or a plugin you're using) having any issues with it?

I was able to reproduce OP's issue, hls keeps sending these dummy messages

I understand that. 😄 I was asking if you are having issues with it, or if j-hui/fidget.nvim@fe60ce7 fixed it for you? (if there aren't any issues, this isn't very high priority right now).

image
They don't annoyingly stack on top of each other like before, so I'm fine with that.

@realbogart
Copy link

Hello there! I was having the same issue and managed to resolve it with the ignore_empty_message = true setting in fidget.nvim. This was really bugging me so I'm happy that it's finally resolved. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants