mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 11:15:46 -05:00
Disable batch processing
Problem: There was a misunderstanding when implementing this: batch processing should not return responses individually, but rather return a list with batch responses. This will require some further logic to group such responses in order to process them in sequence. Solution: We return those methods to being unhandled.
This commit is contained in:
parent
5388f58530
commit
431f3ea126
1 changed files with 5 additions and 21 deletions
|
|
@ -214,33 +214,17 @@ module Make (IO : IO) : S with module IO = IO = struct
|
|||
let r = Lsp.Server_request.response_of_json req json in
|
||||
with_error_handler self (fun () -> handler @@ Ok r))
|
||||
|
||||
let handle_batch_response (self : t) (rs : Jsonrpc.Response.t list) :
|
||||
let handle_batch_response (_self : t) (_rs : Jsonrpc.Response.t list) :
|
||||
unit IO.t =
|
||||
let rec go = function
|
||||
| [] -> IO.return ()
|
||||
| r :: rs ->
|
||||
let* () = handle_response self r in
|
||||
go rs
|
||||
in
|
||||
go rs
|
||||
IO.failwith "Unhandled: jsonrpc batch response"
|
||||
|
||||
let handle_batch_call (self : t)
|
||||
(cs :
|
||||
let handle_batch_call (_self : t)
|
||||
(_cs :
|
||||
[ `Notification of Jsonrpc.Notification.t
|
||||
| `Request of Jsonrpc.Request.t
|
||||
]
|
||||
list) : unit IO.t =
|
||||
let rec go = function
|
||||
| [] -> IO.return ()
|
||||
| c :: cs ->
|
||||
let* () =
|
||||
match c with
|
||||
| `Notification n -> handle_notification self n
|
||||
| `Request r -> handle_request self r
|
||||
in
|
||||
go cs
|
||||
in
|
||||
go cs
|
||||
IO.failwith "Unhandled: jsonrpc batch call"
|
||||
|
||||
(* read a full message *)
|
||||
let read_msg (self : t) : (Jsonrpc.Packet.t, exn) result IO.t =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue