more debug info

This commit is contained in:
Simon Cruanes 2021-04-08 20:21:45 -04:00
parent 1710df0e7e
commit 11c4f36d02
2 changed files with 4 additions and 1 deletions

View file

@ -144,6 +144,7 @@ module Make(IO : IO)
try_ @@ fun () ->
IO.return @@ J.from_string (Bytes.unsafe_to_string buf)
in
Log.debug (fun k->k "got json %a" J.pp j);
begin match Jsonrpc.Message.either_of_yojson j with
| m -> IO.return @@ Ok m
| exception _ ->

View file

@ -297,7 +297,9 @@ module Make(IO : IO) = struct
| Lsp.Client_notification.TextDocumentDidChange {textDocument=doc; contentChanges=c} ->
let notify_back = new notify_back ~uri:doc.uri ~notify_back () in
begin match Hashtbl.find_opt docs doc.uri with
| None -> IO.failwith "unknown document"
| None ->
Log.err (fun k->k "unknown document: '%s'" doc.uri);
IO.failwith "unknown document"
| Some st ->
let old_content = st.content in
let new_doc: Lsp.Text_document.t =