redhat-developer / redhat-developer/vscode-java

"Project cannot be built until its prerequisite is built" errors each time I close & open VSCode

オープン
#4,104 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

I have a multi-module Maven project that I created using Eclipse, and now I am trying to migrate to VSCode.

I have opened the project in VSCode, and it has updated all .project and .classpath files. There is no error in the project, and everything seems to work perfectly.
But after I close VSCode and open it again, without having changed a single line, after Java builds everything, suddenly most of the modules are in red, and I see this type of error in the Problems tab:

"The project cannot be built until its prerequisite XXX is built. Cleaning and building all projects is recommended"

If I "Clean Java Language Server Workspace", the problems disappear, until I close+open VSCode again.
If I "Force Java Compilation > Full", the same. Problems disappear until the next restart.

I guess this shouldn't happen, but I don't know if it is a problem in my project (as I've said, everything works until I close the workspace), I have something configured incorrectly or it is a bug in vscode-java (and if so, if there's any workaround).

I am using JDK 8.

I have tried the pre-release version too, but I get the same problems.

Thank you in advance, please let me know if you need more info.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、VSCodeを再度開いた後にマルチモジュール Maven プロジェクトで失敗を再現し、Java ビルドの前後で .project ファイルと .classpath ファイルを比較します。Java Language Server Workspace をクリーンアップするか、Force Java Compilation > Full を使用すると結果が変わるかを確認します。再起動に関連する原因、または前提条件のエラーに対する信頼できる回避策を特定できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, vscode
領域
build-system, developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。