A proposal to import custom JsonRpc implementation based on System.Text.Json
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- fsharp
- Ambito
- api, backend-api-design
Direzione di ricerca
Inizia leggendo le implementazioni collegate in JsonRpc.fs e JsonRpcTests.fs, quindi esamina come StreamJsonRpc è integrato in Ionide.LSP. Decidi quale alternativa di integrazione o packaging è richiesta, considera la serializzazione dei gestori delle richieste e l'annullamento di F# Async, e aggiungi test che coprano il comportamento importato e la gestione delle richieste sensibile alle race condition.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently Ionide.LanguageServerProtocol is using StreamJsonRpc which is somewhat cumbersome to use and has several deficiencies in the context of Ionide.LSP:
- Uses Newtonsoft.Json (instead of STJ)
- Request serialization is achieved by holding onto Task and not returning from handler until proper measures are taken (i.e. req # generated, pushed to request queue, etc)
- Is a C# library and does not meld into F# Async contexts (e.g. ambient cancellation) nicely
I propose importing JsonRpc.fs from csharp-ls which has been actually tested in the field and provides Ordinal # in request context where the user of the library can implement custom scheduler to serialize read/write ops, for example.
Please note, that replacing StreamJsonRpc with JsonRpc.fs may not be trivial as it does not do Task-based serialization, like StreamJsonRpc does and may open servers using Ionide.LSP to more races unless we change some of the logic in Ionide.LSP to expose JsonRpcRequestContext.Ordinal and/or wrap JsonRpc.fs to enforce request handler serialization.
The alternatives are:
- I keep it in csharp-ls
- Ship it is as a separate nuget/library, outside of Ionide.LanguageServerProtocol
There are also tests, that could be included with the import (mostly Claude-written, may need restructuring):
- Lingua principale
- F#
- Stelle
- 58
- Fork
- 21
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 ionide/LanguageServerProtocol
-
Please add a documentation Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ionide/LanguageServerProtocol#68 · 2 commenti ·
Tutte le issue di ionide/LanguageServerProtocol
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
microsoft/magentic-ui#588 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
alexgorbatchev/simple-ptt#3 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
CorrelAid/formtransform#44 ·