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

Warning (lsp-mode): Unknown request method: workspace/diagnostic/refresh #4570

Closed
3 tasks done
vikigenius opened this issue Sep 30, 2024 · 4 comments · Fixed by #4600
Closed
3 tasks done

Warning (lsp-mode): Unknown request method: workspace/diagnostic/refresh #4570

vikigenius opened this issue Sep 30, 2024 · 4 comments · Fixed by #4600
Labels

Comments

@vikigenius
Copy link

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Working on a Python project with two servers (basedpyright and ruff).
Lately after leaving Emacs idle for a few minutes, I always come back to this warning:

Warning (lsp-mode): Unknown request method: workspace/diagnostic/refresh

This only started happening after the switch from ruff-lsp to ruff server in this PR
#4543

Steps to reproduce

Start a python project with two servers after leaving Emacs idle for a while you get the warning

Expected behavior

No warnings since it seems like workspace/diagnostic/refresh should be a supported function

Which Language Server did you use?

pyright, ruff

OS

Linux

Error callstack

No response

Anything else?

No response

@vikigenius vikigenius added the bug label Sep 30, 2024
@vikigenius
Copy link
Author

I am able to consistently reproduce this if I make changes to pyproject.toml

@lassemaatta
Copy link

I'm experiencing the same issue with a few LSP servers (clojure-lsp, lsp-tailwindcss).

@zechs01
Copy link

zechs01 commented Oct 25, 2024

I'm experiencing the same issue with (ts-ls) and (omnisharp) LSP servers and it gets reproduced every time I open emacs.

@Dushistov
Copy link

The same issue with rust-analyzer

alanz added a commit to alanz/lsp-mode that referenced this issue Oct 28, 2024
lsp-mode does not currently support pull diagnostics.

There is a recent change to the spec where the server can notify the
client to request diagnostics, when the pull mode is being used.

This is implemented incorrectly in a number of servers, which do not
first check the relevant client capability.

Mitigate this problem by
a. Sending client capabilities to day that this is not supported
b. Putting a null handler in for the server request message.

Closes emacs-lsp#4570
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants