Accept the legacy boolean form of diagnostic tag support
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design, compilers
Direzione di ricerca
Esamina la decodifica di ClientCapabilities nella codebase, probabilmente in un file che gestisce i tipi di protocollo LSP o l'inizializzazione. Il problema menziona gen-lsp-types e TagSupport::deserialize_compat. Trova dove viene analizzato tagSupport e modificarlo per accettare un booleano (true/false) come forma legacy, mappando true a un insieme di valori vuoto e false a nessun supporto. Assicurati che la modifica non interrompa la forma oggetto. Scrivi un test per initialize con entrambe le forme booleane e la forma oggetto, verificando che il server si avvii con successo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 102
- Fork
- 11
- Merge medio
- 3h 31m
- PR unite (30g)
- 134
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purefunctor/purescript-iris
-
bug language-server
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
purefunctor/purescript-iris#551 ·
-
enhancement language-server lsp-3.18
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
purefunctor/purescript-iris#548 ·
-
tooling
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
purefunctor/purescript-iris#507 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
purefunctor/purescript-iris#264 ·
-
checking semantics
purefunctor/purescript-iris#147 · 1 assegnatario ·
Tutte le issue di purefunctor/purescript-iris
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·