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

Lsp progress notofication leaks #6955

Open
kurnevsky opened this issue Nov 21, 2024 · 2 comments
Open

Lsp progress notofication leaks #6955

kurnevsky opened this issue Nov 21, 2024 · 2 comments
Labels
bug Something that is making a piece of functionality unusable

Comments

@kurnevsky
Copy link
Contributor

Describe the bug

Metals doesn't always send "kind": "end" for $/progress notification which results in a leak in emacs:

image

E.g. here I had a notification without an end (this is the last notification with this token):

[Trace - 12:32:56 PM] Received notification '$/progress'.
Params: {
  "token": "783ead62-37f8-4951-9d13-c0e457af51cf",
  "value": {
    "kind": "report",
    "message": "4s (100%)",
    "percentage": 100
  }
}

Also it seems it can get stuck infinitely reporting 0% progress (looks like when there was a compilation error):

[Trace - 12:36:00 PM] Received notification '$/progress'.
Params: {
  "token": "33705175-ff86-4eb7-9e4a-f22fb0fd2569",
  "value": {
    "kind": "report",
    "message": "3m4s (0%)",
    "percentage": 0
  }
}

Expected behavior

No response

Operating system

None

Editor/Extension

Emacs (lsp-metals)

Version of Metals

v1.4.0

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Nov 21, 2024

Thanks for reporting! I hoped I fixed that 🤔 I will have to add some more logs to debug. It should send end for all tasks that have finished, not sure where it might get lost. I might need to more safeguards there.

@kurnevsky
Copy link
Contributor Author

Might be related with this warning I constantly get now with the only option to open doctor:
image

@tgodzik tgodzik added the bug Something that is making a piece of functionality unusable label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable
Projects
Status: Triage
Development

No branches or pull requests

2 participants