
Kirill BulatovandPiotr Osiewicz
95c045ad93
Fix LSP violation when dismissing server notifications (#23531)
Part of https://github.com/zed-industries/zed/issues/22606
Closes https://github.com/zed-industries/zed/issues/23509
When a user sees an odd notification from the language server like
<img width="508" alt="image"
src="https://github.com/user-attachments/assets/6f5ef1aa-0f09-4705-a02a-aaf81dd8620c"
/>
they usually dismiss that.
Zed uses channels to wait and handle user interactions with such
notifications, and, due to `?`, sends back
```json
{"jsonrpc":"2.0","id":1,"error":{"message":"receiving from an empty and closed channel"}}
```
which is not spec-compliant:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showMessageRequest
> Response:
>
> * result: the selected
[MessageActionItem](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#messageActionItem)
| null if none got selected.
> * error: code and message set in case an exception happens during
showing a message.
Unfortunately, vtsls (and, potentially, others) crash if receive such
non-compliant requests, and do not get back.
After the fix, the message is correct:
```json
{"jsonrpc":"2.0","id":1,"result":null}
```
Release Notes:
- Fixed vtsls crashing on notification dismiss
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2025-01-23 13:30:35 +00:00
..
2025-01-17 17:39:22 +01:00
2025-01-20 13:19:15 -05:00
2025-01-17 17:39:22 +01:00
2025-01-22 22:53:54 +00:00
2025-01-22 23:47:56 +00:00
2025-01-22 01:32:24 +00:00
2025-01-17 17:39:22 +01:00
2025-01-21 21:22:59 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-18 22:57:17 +02:00
2025-01-18 22:57:17 +02:00
2025-01-17 17:39:22 +01:00
2025-01-20 11:48:49 -03:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-18 22:57:17 +02:00
2025-01-17 17:39:22 +01:00
2025-01-18 22:27:08 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-20 23:20:15 +00:00
2025-01-22 21:19:02 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 23:02:53 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-21 17:09:16 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 15:28:25 -05:00
2025-01-17 17:39:22 +01:00
2025-01-23 07:56:49 -05:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 10:00:43 -03:00
2025-01-22 21:19:02 +01:00
2025-01-17 17:57:13 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 13:19:18 -03:00
2025-01-20 19:11:13 -03:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-23 11:17:32 +00:00
2025-01-23 11:17:32 +00:00
2025-01-21 15:05:21 -05:00
2025-01-17 17:39:22 +01:00
2025-01-21 15:05:21 -05:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-23 11:17:32 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-17 17:39:22 +01:00
2025-01-18 22:27:08 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-21 18:31:15 +00:00
2025-01-21 15:05:21 -05:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-23 13:30:35 +00:00
2025-01-21 11:13:46 -03:00
2025-01-17 17:39:22 +01:00
2025-01-22 22:17:36 +00:00
2025-01-22 21:19:02 +01:00
2025-01-18 17:36:41 +01:00
2025-01-22 21:19:02 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-21 12:48:40 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-21 07:14:46 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-18 22:27:08 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-20 14:15:25 +02:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-18 17:36:41 +01:00
2025-01-22 02:56:42 +00:00
2025-01-17 17:39:22 +01:00
2025-01-23 07:56:49 -05:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 17:28:47 +00:00
2025-01-17 17:39:22 +01:00
2025-01-21 19:33:08 +00:00
2025-01-17 17:39:22 +01:00
2025-01-22 21:19:02 +01:00
2025-01-21 18:11:53 -05:00
2025-01-17 17:39:22 +01:00
2025-01-22 17:39:11 +01:00
2025-01-17 17:39:22 +01:00
2025-01-22 16:24:39 +00:00
2025-01-22 05:39:04 +00:00
2025-01-22 15:28:25 -05:00
2025-01-22 22:17:36 +00:00
2025-01-22 22:53:54 +00:00
2025-01-20 11:48:49 -03:00
2025-01-22 13:19:18 -03:00