LuaLS / LuaLS/lua-language-server
Lsp error in logs Unknown response id!
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi. I will appreciate any help.
Sometimes my server responds incorrectly. The server gives some responses eg.
```
{
_closeMessage = "Request cancelled.",
_closeReason = -32800,
id = 35,
jsonrpc = "2.0",
method = "textDocument/semanticTokens/range",
params = {
range = {
end = {
character = 0,
line = 0
},
start = {
character = 0,
line = 0
}
},
textDocument = {
uri = "---"
}
}
}
```
but the editor shows "workspace loading 0/0" or "Loading".
Even when it responds well, the same error appears in logs
```
[14:37:50.516][error][#0:script\proto\proto.lua:67]: Unknown response id! 0
stack traceback:
script\proto\proto.lua:67: in function 'proto.proto.response'
script\proto\proto.lua:195: in local 'f'
script\utility.lua:439: in metamethod 'close'
script\proto\proto.lua:202: in function
```
the difference is that when the server responds correctly, this appears in the logs:
`[09:40:35.887][info] [#0:script\provider\diagnostic.lua:557]: Diagnostics scope ...` (and here is my workspace folder)
however, when the server is working badly, the following appears in the logs:
`[14:37:50.619][info] [#0:script\workspace\workspace.lua:282]: Scan files at:` (and here are files from log/cache, not from my workspace I don.t know why.
Maybe someone faced such a problem?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず LSP のレスポンスを再現し、script/proto/proto.lua:67、script/proto/proto.lua:195、script/workspace/workspace.lua:282 周辺のログを比較します。レスポンスが不明な ID を受け取る理由と、workspace のスキャンでログに記録されたキャッシュファイルが使用される理由を追跡します。完了条件は、失敗を再現でき、その原因と修正が検証されていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100