🐞 Language Server Requests Should Timeout
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
Comece localizando o tratamento de solicitações do language server e do encerramento no CodeEdit; em seguida, reproduza o problema com o binário sourcekit-lsp distribuído com o Xcode 16. Defina o comportamento de timeout para solicitações comuns, de longa duração e imediatas; está concluído quando as solicitações não aguardarem mais indefinidamente e o caso de saída permitir sair.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
There is a chance that language servers (maliciously or due to a bug) may not respond to requests made by the client (CodeEdit). This can cause problems, for example:
- Memory build up as syntax token requests pile up with no responses.
- App refusing to quit before the language server exits, but the language server does not respond to the
exitmessage. - UI hanging forever after a request (eg for a definition search).
In each of these cases one solution would be to time out the request. I think our LSP requests should have a default timeout length.
This has the caveat for requests that may take a long time. Those requests will need to be overridable so they can take longer. The same goes for requests that need immediate response (like the exit message), which will need to be shorter.
To Reproduce
The sourcekit-lsp binary that ships with Xcode 16 is bugged, and will not respond to the exit message. This leaves CodeEdit hanging when quitting the app and requires a force quit.
The same LSP does not respond to semantic token requests (despite declaring the capability, this is a bug with sourcekit-lsp). This may cause cached request handlers to build up over time.
Expected Behavior
Each language server request should have a timeout parameter. This likely means creating a new LanguageServer connection type that passes messages through to another type, but provides a timeout handler for requests. This may be something we can contribute back to the LanguageServer package.
Version Information
CodeEdit: 0.3.3
Additional Context
No response
Screenshots
No response
- Linguagem predominante
- Swift
- Estrelas
- 23k
- Forks
- 1.2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de CodeEditApp/CodeEdit
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
CodeEditApp/CodeEdit#2190 ·
-
Is this project dead? Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 15/100
CodeEditApp/CodeEdit#2195 · 7 reações ·
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
CodeEditApp/CodeEdit#2185 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting Abertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
CodeEditApp/CodeEdit#2180 ·
Todas as issues de CodeEditApp/CodeEdit
Issues semelhantes
-
task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
vsanthanam/JBird#429 ·
-
Bolus validation button text Abertaneeds-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
nightscout/Trio#1574 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
pending-maintainer-response pending-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
make notarise-dmg notarises whichever dist/ image sorts last, not the one make dmg just built Abertaarea:build bug good first issue P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
uttrflow/uttrflow-swift#1412 ·