This commit is contained in:
Simon Cruanes 2026-04-07 21:00:39 -04:00
parent d0f4b84a69
commit 046722bea8
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,12 +54,11 @@ 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); raise exn)
raise exn)
include Lsp.Types include Lsp.Types
include IO_eio include IO_eio