redhat-developer / redhat-developer/vscode-java
Gradle project infinitely rebuilds after launching a project
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
添付された jls_before_run.log と jls_after_run.log を比較することから始め、multi-project Gradle workspace で Java main class を起動した後の変更に注目してください。可能であれば annotation-processor setup を再現し、繰り返される source-change および build イベントを追跡してください。workspace の再ビルドが停止し、false compiler errors が報告されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- build-system, developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100