🐞 Language Server Requests Should Timeout
まだ誰も着手していません。
評価
調査の方向性
まず CodeEdit の language server リクエストとシャットダウンの処理箇所を特定し、次に Xcode 16 に付属する sourcekit-lsp バイナリで問題を再現します。通常のリクエスト、長時間実行されるリクエスト、即時リクエストのタイムアウト動作を定義します。完了とは、リクエストが無期限に待機しなくなり、終了ケースで終了できることを意味します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Swift
- スター
- 23k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeEditApp/CodeEdit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CodeEditApp/CodeEdit#2190 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
CodeEditApp/CodeEdit#2195 · リアクション 5 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CodeEditApp/CodeEdit#2185 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CodeEditApp/CodeEdit#2180 ·
CodeEditApp/CodeEdit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
manaflow-ai/cmux#13763 ·
-
type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-swift#1036 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
wultra/mtoken-sdk-ios#253 ·
-
area:dictation documentation P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
uttrflow/uttrflow-swift#1180 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100