[lsp] Accept legacy boolean diagnostic tag support - #625
Conversation
Ignore boolean tagSupport before capability decoding in either actor, preserving object-form support and other negotiated capabilities. Amp-Thread-ID: https://ampcode.com/threads/T-01a0fb04-e03a-7329-9c0d-fa7571238921 Co-authored-by: Amp <amp@ampcode.com>
|
Review against AGENTS.md: no issues found. The protocol actor is the only place that receives Checks run:
Not verified: I didn't revert the fix locally to confirm the new test fails without it. The PR description reports reproducing |
Granite ReviewCouncil
FindingsNo actionable findings. |
Compatibility regression reportPackage set ✅ The candidate introduces no compatibility errors.
Introduced errorsNone. Fixed errors (0)None. Warning changes (0 introduced, 0 fixed)Introduced None. Fixed None. Candidate errors (0)None. Candidate warnings (36)
|
Fixes #552.
Legacy clients can send a boolean for
textDocument.publishDiagnostics.tagSupport. Since the switch togen-lsp-types, that makes the workspace rejectinitializeand the protocol actor silently discard client capabilities.Ignore this unused boolean field before either actor decodes capabilities. Leave object-form tag support unchanged. This restores initialization compatibility without introducing a second capability model or separate normalization paths.
The regression test runs both actors and covers
true,false, and the object form. It also checks UTF-8 negotiation and the outgoingworkspace/configurationrequest so accepting initialization cannot hide a fallback to default capabilities.Verification
InvalidParamswith the regression test before the fix.cargo check -p iris-lsp-server -p iris-lsp --testspassed.cargo nextest run -p iris-lsp-server -p iris-lsp-workspace -p iris-lsp: 89 passed.cargo check -p iris-lsp --testsand all 4iris-lsptests passed.just formatandgit diff --checkpassed.just licensescompleted with license-discovery warnings and leftTHIRDPARTY.tomlunchanged.Amp thread: https://ampcode.com/threads/T-01a0fb04-e03a-7329-9c0d-fa7571238921