Semantic tokens, document links and LSP intentions hold highlighting read actions while they wait for the language server
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Java
- Stelle
- 360
- Fork
- 125
- Merge medio
- 14h 13m
- PR unite (30g)
- 189
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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 redhat-developer/lsp4ij
-
Start errors are easy to missForse già presa @libirevanth364 l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
redhat-developer/lsp4ij#1945 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Promote LSP4IJ Getting Started in the LSP consoleForse di nuovo libera @RehanChalana l’ha presa 105 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
redhat-developer/lsp4ij#27 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug completion not reproducible performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
redhat-developer/lsp4ij#2018 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Some freeze report of 0.20.1Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
redhat-developer/lsp4ij#2014 · 11 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
redhat-developer/lsp4ij#2011 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di redhat-developer/lsp4ij
Issue simili
-
needs discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openfga/openfga.dev#1436 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
jooby-project/jooby#4047 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug feat:Syntax
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ignatov/intellij-erlang#1342 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
commons-app/apps-android-commons#7379 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Flaky EnrollmentCoordinatorTest.theNewSettingsShouldNotInheritTheFormerOnesBackoff on WindowsForse già presa @NassimBtk l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MetricsHub/metricshub-community#1636 ·
I maintainer di solito rispondono entro 1 giorno