Skip to content

[lsp] Accept legacy boolean diagnostic tag support - #625

Merged
purefunctor merged 1 commit into
mainfrom
lsp/legacy-diagnostic-tags
Oct 2, 2026
Merged

purefunctor merged 1 commit into
mainfrom
lsp/legacy-diagnostic-tags

Conversation

@purefunctor

Copy link
Copy Markdown
Owner

Fixes #552.

Legacy clients can send a boolean for textDocument.publishDiagnostics.tagSupport. Since the switch to gen-lsp-types, that makes the workspace reject initialize and 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 outgoing workspace/configuration request so accepting initialization cannot hide a fallback to default capabilities.

Verification

  • Reproduced InvalidParams with the regression test before the fix.
  • cargo check -p iris-lsp-server -p iris-lsp --tests passed.
  • cargo nextest run -p iris-lsp-server -p iris-lsp-workspace -p iris-lsp: 89 passed.
  • After the tuple-destructuring review change, cargo check -p iris-lsp --tests and all 4 iris-lsp tests passed.
  • just format and git diff --check passed.
  • just licenses completed with license-discovery warnings and left THIRDPARTY.toml unchanged.

Amp thread: https://ampcode.com/threads/T-01a0fb04-e03a-7329-9c0d-fa7571238921

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>
@claude

claude Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review against AGENTS.md: no issues found.

The protocol actor is the only place that receives initialize before handing it to both decoders: Session::negotiate, which falls back to default capabilities on a decode error, and the workspace's InitializeParams decode, which rejects with InvalidParams. So rewriting the boolean there fixes it in the layer that owns it, with a single normalization path. Nothing in the server reads diagnostic tag support (grep finds no DiagnosticTag/tag_support uses), so dropping the legacy boolean loses no behavior. The regression test drives both actors through the existing iris-lsp session harness. It checks UTF-8 negotiation and the workspace/configuration request, so a fallback to default capabilities would fail it. That fits the test-ownership rules.

Checks run:

  • cargo check -p iris-lsp-server -p iris-lsp --tests: passed
  • cargo nextest run -p iris-lsp-server -p iris-lsp: 41 passed, 0 failed
  • just format --check: clean
  • just licenses: only license-confidence warnings; git status clean afterwards, so THIRDPARTY.toml is unchanged
  • No integration categories are affected, so I didn't run just t; no .snap.new files are present

Not verified: I didn't revert the fix locally to confirm the new test fails without it. The PR description reports reproducing InvalidParams before the fix.

@purefunctor

purefunctor Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Granite Review

Council

Role Mode Status Attempt Amp thread
Council member review-gpt-6-luna completed 1 T-01a0fb10-379b-72c8-958c-39fef28824fd
Council member review-gpt-6-sol completed 1 T-01a0fb10-36f6-725f-a317-d77860c52414
Synthesis review-astra-synthesis completed 1 T-01a0fb15-0241-7328-9e0e-a5609c51a965

Findings

No actionable findings.

Open this run in Granite

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Compatibility regression report

Package set 81.1.0 for PureScript 0.15.15.

✅ The candidate introduces no compatibility errors.

Diagnostic class Base Candidate Introduced Fixed
Compiler errors 0 0 0 0
Compiler warnings 36 36 0 0
Verifier errors 0 0 0 0

Introduced errors

None.

Fixed errors (0)

None.

Warning changes (0 introduced, 0 fixed)

Introduced

None.

Fixed

None.

Candidate errors (0)

None.

Candidate warnings (36)
  • deno@0.0.5/src/Deno.purs:38:17 — CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Dotenv.purs:41:20 — CustomWarning (checking) × 2: Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Http/Request.purs:47:25 — CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • literals@1.0.2/src/Literals/Null.purs:11:1 — UnparseableFFIModule (javascript): Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Unexpected token
  • react-basic-dom-beta@0.1.1/src/Beta/DOM.purs:33:31 — DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • sparse-polynomials@3.0.1/src/Data/Sparse/Polynomial.purs:1048:1 — MissingPatterns (checking) × 2: Pattern match is not exhaustive. Missing: _
  • text-formatting@0.1.0/src/Data/Text/Format/Dodo/Printer.purs:64:25 — CustomWarning (checking) × 23: Debug function usage
  • trivial-unfold@0.5.0/src/Data/Unfoldable1/Trivial1.purs:150:17 — MissingPatterns (checking): Pattern match is not exhaustive. Missing: Right _
  • xterm@1.0.0/src/XTerm/UnicodeHandling.purs:15:1 — UnparseableFFIModule (javascript) × 2: Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Expected a semicolon or an implicit semicolon after a statement, but found none
  • yoga-react-dom@2.0.1/src/Yoga/React/DOM.purs:34:31 — DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • yoga-tree-utils@1.0.0/src/Yoga/Tree/Extended/Path.purs:20:72 — DuplicateImport (indexing): Import list contains multiple references to 'snoc'

View workflow run

@purefunctor
purefunctor merged commit 759b941 into main Oct 2, 2026
44 checks passed
@purefunctor
purefunctor deleted the lsp/legacy-diagnostic-tags branch October 2, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept the legacy boolean form of diagnostic tag support

1 participant