Assertion in Document_symbols.compute is triggered #16

Closed kento.tngl.sh
Closed opened by and assigned to kento.tngl.sh

I have been working on a Visual Studio Code language client for Forester, and it is actually triggering this assertion:

let compute ({textDocument = {uri; _}; _} : L.DocumentSymbolParams.t) :
    [> `DocumentSymbol of L.DocumentSymbol.t list] option =
  let Lsp_state.{forest; _} = Lsp_state.get () in
  let uri = URI.of_lsp_uri ~base:forest.config.url uri in
  match State.get_code ~forest uri with
  | None -> assert false

It was extremely difficult to detect that this was happening, because I don't yet have a good way to debug forester while the language server is running.

I really need to improve the logging output for the lsp...

For debugging, it would be really nice if we could make it just go to a file or something... Every editor has a different way of dealing with the logs, and it's really hard to get everything to line up perfectly.

Sign up or Sign in to add to the discussion.