You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand it correctly, when an error is thrown (that is, when the callback is executed) in one of lsp--parser-on-message, the remaining messages will be lost forever.
Context: I was trying to make Razor language server work with lsp-mode, and I noticed some notifications didn't get processed in lsp-mode while I'm sure they were sent by the server.
Steps to reproduce
I wrote a simple dummy lsp server to help reproduce this problem.
Now launch lsp in an emacs lisp buffer, and execute (pp (list "Request-result: " (lsp-request "dummy/request" (list :test "test"))))
Here is the output:
("dummy/notification" #s(hash-table size 1 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("index" 1)))
("Request-result: " "request result")
We can see the first notification got correctly handled, while the second got ignored.
Also, the second notification wasn't shown in *lsp-log: dummy-lsp* buffer either.
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
Function
lsp-request
relies on throwing an error in the callback functionWhile at the end of function
lsp--create-filter-function
, we can see it processes messages one by one.If I understand it correctly, when an error is thrown (that is, when the callback is executed) in one of
lsp--parser-on-message
, the remaining messages will be lost forever.Context: I was trying to make Razor language server work with lsp-mode, and I noticed some notifications didn't get processed in lsp-mode while I'm sure they were sent by the server.
Steps to reproduce
I wrote a simple dummy lsp server to help reproduce this problem.
Put the code at
/tmp/dummy-lsp.lisp
When the dummy server receives a
dummy/request
request, it will send a response sandwiched by two notifications.Client side config:
Now launch lsp in an emacs lisp buffer, and execute
(pp (list "Request-result: " (lsp-request "dummy/request" (list :test "test"))))
Here is the output:
We can see the first notification got correctly handled, while the second got ignored.
Also, the second notification wasn't shown in
*lsp-log: dummy-lsp*
buffer either.Expected behavior
I think all notifications should get processed and the corresponding handlers should be called.
Which Language Server did you use?
shouldn't matter
OS
Linux
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: