]> git.eshelyaron.com Git - emacs.git/commit
Jsonrpc: rework fix for bug#60088
authorJoão Távora <joaotavora@gmail.com>
Mon, 11 Dec 2023 00:01:03 +0000 (00:01 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 14 Dec 2023 12:11:27 +0000 (13:11 +0100)
commit70c8cab0e811f23be370d7e2f7c3dd4c7834c47f
tree341c3c61e075b688b4855ee3588b966a0f96c894
parent5e832653f02341e98e69e339c058d46ab21428b6
Jsonrpc: rework fix for bug#60088

Try to decouple receiving text and processing messages in the event
loop.  This should allow for requests within requests in both Eglot
and the Dape extension (https://github.com/svaante/dape).

jsonrpc-connection-receive is now called from timers after the process
filter finished.  Because of this, a detail is that any serialization
errors are now thrown from timers instead of the synchronous process
filter, and there's no good way to test this in ert, so a test has
been deleted.

* lisp/jsonrpc.el (jsonrpc--process-filter): Rework.

* test/lisp/jsonrpc-tests.el (json-el-cant-serialize-this): Delete test.

(cherry picked from commit 60473c4d90a6cdce3f06e183809f5be440dd8797)
lisp/jsonrpc.el
test/lisp/jsonrpc-tests.el