Accept the legacy boolean form of diagnostic tag support
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design, compilers
Research direction
Look at the ClientCapabilities decoding in the codebase, likely in a file handling LSP protocol types or initialization. The issue mentions gen-lsp-types and TagSupport::deserialize_compat. Find where tagSupport is parsed and modify it to accept a boolean (true/false) as a legacy form, mapping true to an empty value set and false to no support. Ensure the change doesn't break the object form. Write a test for initialize with both boolean forms and the object form, verifying the server starts successfully.
Written by the indexing model from the issue text.
Description
Context
Since #549, ClientCapabilities comes from gen-lsp-types, which types textDocument.publishDiagnostics.tagSupport as the ClientDiagnosticsTagOptions object defined by the current specification. lsp-types 0.95 decoded it through TagSupport::deserialize_compat, which also accepted the legacy boolean form: true as tag support with an empty value set, and false as no tag support.
A client that still sends the boolean now has initialize rejected with InvalidParams (invalid type: boolean 'true', expected struct ClientDiagnosticsTagOptions), for both true and false, so the language server cannot start. The protocol actor's Session::negotiate silently falls back to default capabilities in the same case, but that does not help once the workspace rejects initialize.
The server does not read tagSupport. It is unknown which clients still send the boolean form; lsp-types kept the compatibility path because some did.
Goal
A client that sends the legacy boolean tagSupport can initialize the server, as it could with lsp-types 0.95.
Scope
- Accept or ignore the boolean form rather than failing capability decoding. Decoding only the capabilities the server uses would also resolve this, and could share a solution with #551.
- Avoid the protocol actor and the workspace interpreting the same capabilities differently.
Tests
initializewithtagSupport: trueand withtagSupport: falsesucceeds and returns the usual server capabilities.- The object form keeps working.
- Dominant language
- Rust
- Stars
- 102
- Forks
- 11
- Avg merge
- 3h 31m
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purefunctor/purescript-iris
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#551 ·
-
enhancement language-server lsp-3.18
Difficulty 3/5 1-2 days Newbie friendliness 65/100
purefunctor/purescript-iris#548 ·
-
tooling
Difficulty 4/5 3-5 days Newbie friendliness 58/100
purefunctor/purescript-iris#507 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
purefunctor/purescript-iris#264 ·
-
checking semantics
purefunctor/purescript-iris#147 · 1 assignee ·
All issues in purefunctor/purescript-iris
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
todo:ticket
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
taikoxyz/taiko-mono#22168 · 1 comment ·