Semantic tokens, document links and LSP intentions hold highlighting read actions while they wait for the language server
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
Start with LSPSemanticTokensHighlightVisitor.getSemanticTokens, LSPDocumentLinkCollector.collect, and LSPIntentionCodeActionSupport.getCodeActionAt, then compare their waits with refreshWhenLoaded and pendingFuture as described in the issue. Check the referenced freezes and the existing behavior in #1871. Done means the highlighting passes do not hold a read lock while waiting for the language server, and resume when a reply arrives.
索引モデルが issue の本文から書いたものです。
説明
Three freezes of LSP4IJ 0.21.0 in #2014, all at startup with probable cause LONG_READ_ACTION and the IDE killed, have highlighting threads waiting for a language server while they hold the read lock, while the EDT waits for the write lock:
| Report | IDE | Freeze | Waiting in |
|---|---|---|---|
| 2116064504671633408 | IntelliJ IDEA 262.10968.63 | 44 s | LSPSemanticTokensHighlightVisitor.getSemanticTokens (line 203), and four more threads in LSPDocumentLinkCollector.collect (line 79) |
| 2108943541375074304 | RustRover 262.10968.75 | 41 s | LSPDocumentLinkCollector.collect (line 79) |
| 2116205187730509824 | IntelliJ IDEA 262.10968.63 | 44 s | LSPIntentionCodeActionSupport.getCodeActionAt (line 154), from LSPLazyCodeActionIntentionAction.getFamilyName in ShowIntentionsPass |
Each waits in ProgressIndicatorUtils.awaitWithCheckCanceled, inside a tryRunReadAction of the highlighting. The code relies on a write action cancelling the pass's progress, so that awaitWithCheckCanceled throws and the read lock is released, as the comments of LSPSemanticTokensHighlightVisitor.getSemanticTokens and LSPIntentionCodeActionSupport.getCodeActionAt say. In these reports that didn't happen for 40 s or more. awaitWithCheckCanceled checks the progress every few milliseconds, so the progress wasn't cancelled.
In 0.30.0: unchanged. The three waits are still there (lines 203 and 79, and line 170 in getCodeActionAt); 2a5d0420 only made them null-safe. #1871 stopped the EDT from waiting for intention code actions, but ShowIntentionsPass still waits in its read action. I haven't reproduced the freezes on 0.30.0 yet.
Possible fix: don't wait in the passes. Use the reply if it's there, and otherwise return and restart the highlighting when it arrives, as #1871 does on the EDT (refreshWhenLoaded) and as the document links already do after a cancellation (pendingFuture).
- 主要言語
- Java
- スター
- 360
- フォーク
- 125
- 平均マージ
- 14時間 13分
- マージ済み PR(30日)
- 189
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redhat-developer/lsp4ij のほかの issue
-
Start errors are easy to miss対応中かも @libirevanth364 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redhat-developer/lsp4ij#1945 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Promote LSP4IJ Getting Started in the LSP console再び着手できるかも @RehanChalana が 105 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
redhat-developer/lsp4ij#27 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug completion not reproducible performance
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
redhat-developer/lsp4ij#2018 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
redhat-developer/lsp4ij#2014 · コメント 11 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
redhat-developer/lsp4ij#2011 ·
メンテナーはふだん 1 日以内に返信
redhat-developer/lsp4ij の issue をすべて見る
似ている issue
-
needs discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openfga/openfga.dev#1436 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
jooby-project/jooby#4047 ·
メンテナーはふだん 1 日以内に返信
-
Bug feat:Syntax
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ignatov/intellij-erlang#1342 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
commons-app/apps-android-commons#7379 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Flaky EnrollmentCoordinatorTest.theNewSettingsShouldNotInheritTheFormerOnesBackoff on Windows対応中かも @NassimBtk が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MetricsHub/metricshub-community#1636 ·
メンテナーはふだん 1 日以内に返信