redhat-developer / redhat-developer/vscode-java

Gradle project infinitely rebuilds after launching a project

Aperta
#4,307 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug Gradle
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

jls_before_run.log
jls_after_run.log

I have a multi-project Gradle project. It is not using any Eclipse settings (meaning no .project, .classpath, etc. files). The projects uses annotation processors to generate source files (they are generated under build/generated/sources/annotationProcessor/java/main by Gradle).

When the workspace is initially loaded, it works fine. The problems start after you launch a Java main class. It appears that the language server is constantly detecting changes in source files and somehow falls into an infinite loop where it continuously builds itself. It gets so bad that the workspace starts reporting compiler errors, even though there are none.

I'm not sure which factors are causing this issue to happen, so I can't provide a project that reproduces the issue. It might be a combination of Gradle with sub-projects, annotation processors, and the sheer size of the codebase. I tried changing some settings that I thought might be related to this issue with no success. I tried the current and pre-release Java Language Pack versions and the behavior is the same.

Attached are the language server logs. jls_before_run.log are the logs before I launched a main class. jls_after_run.log are the logs after I launched a main class. jls_after_run.log would have run into infinity, so I had to eventually manually stop it, so I hope there's enough information to get a clue on what's happening.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia confrontando i file jls_before_run.log e jls_after_run.log allegati, concentrandoti sui cambiamenti successivi all’avvio di una Java main class nel multi-project Gradle workspace. Riproduci l’annotation-processor setup, se possibile, e traccia gli eventi ripetuti di source-change e build; il lavoro è concluso quando il workspace smette di eseguire il rebuild e non segnala più false compiler errors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system, developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.