From 998c4bfd8039d6ae64975b46624c8c05788c08c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 18 Sep 2026 07:16:45 +0000 Subject: [PATCH] :memo: Document the protocol-backed LSP helper Note that the autocomplete helper drives the server through vscode-languageserver-protocol, cross-link the tooling decision, and replace the obsolete string-id known issue with the benign context-canceled stderr the Go server emits on shutdown. --- development/testing.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/development/testing.md b/development/testing.md index edcd407..0c42c77 100644 --- a/development/testing.md +++ b/development/testing.md @@ -134,7 +134,10 @@ The script prints the labels the server offers at a `/*COMPLETE*/` marker inside is imported by `src/util/__tests__/lsp-completion.test.ts` — which tests the helper itself against inline documents, never the library's code — and by `src/primitive.test.ts`, where the same probe asserts the matcher's popup; -the CLI is for manual inspection. +the CLI is for manual inspection. It speaks to the server through +`vscode-languageserver-protocol`'s message connection and typed requests, so the +transport and protocol plumbing are not hand-rolled (see +[tooling.md § `vscode-languageserver-protocol` backs the autocomplete helper](./tooling.md#vscode-languageserver-protocol-backs-the-autocomplete-helper)). #### Why @@ -162,8 +165,10 @@ the CLI is for manual inspection. any order; the file is an integration test (~1.6 s) that needs `node_modules`. `didOpen` is handled in order before the completion request, so no settle delay is needed. -- The server answers some requests with a string id (`client/registerCapability`); - the client must tolerate `string | number` ids or the server stalls. +- The Go server logs `context canceled` on stderr once per server as it shuts + down (nine lines per `test:unit` run). It is benign and predates the protocol + client — the hand-rolled client produced the same line — so it is left as is + rather than filtered out of the server's stderr. ## Known issues