This commit is contained in:
Simon Cruanes 2026-04-07 21:00:39 -04:00
parent 2e7a8f3482
commit 266b911bb3
2 changed files with 6 additions and 7 deletions

View file

@ -37,7 +37,7 @@ let diagnostics (_state : state_after_processing) : Lsp.Types.Diagnostic.t list
so that users only need to override methods that they want the server to so that users only need to override methods that they want the server to
actually meaningfully interpret and respond to. actually meaningfully interpret and respond to.
*) *)
class lsp_server ~(sw: Eio.Switch.t) = class lsp_server ~(sw : Eio.Switch.t) =
object (self) object (self)
inherit Linol_eio.Jsonrpc2.server inherit Linol_eio.Jsonrpc2.server

View file

@ -54,8 +54,7 @@ end
(** Spawn function. *) (** Spawn function. *)
let spawn ~sw f = let spawn ~sw f =
Eio.Fiber.fork ~sw (fun () -> Eio.Fiber.fork ~sw (fun () ->
try try f ()
f ()
with exn -> with exn ->
Printf.eprintf "uncaught exception in `spawn`:\n%s\n%!" Printf.eprintf "uncaught exception in `spawn`:\n%s\n%!"
(Printexc.to_string exn); (Printexc.to_string exn);