redhat-developer / redhat-developer/vscode-java

vscode-java tries to compile temporary files

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

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

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

説明

It seems like the extension automatically adds temporary files to the build path and then never removes them.

Environment
  • Operating System: Windows
  • JDK version: 1.8
  • Visual Studio Code version: 1.28.1 (and previous versions)
  • Java extension version: 0.32.0
Steps To Reproduce
  1. Create a maven (probably the same with gradle) based java project
  2. Add to git repository
  3. Compile, debug, check that everything works.
  4. Right-click a file, compare to previous version
  5. Debug the project - it will fail to compile.
  6. Check extension log, you will see a lot of errors of unable to resolve dependencies and also that the type that was in the file you compared is already defined.
    Bonus section
  7. Close VS Code
  8. Open again, with same project
  9. Try to debug - it will still fail to compile.
  10. Check the extension log, you will see a single error, something like:
    Error occured while building workspace. Details:
    message: The project was not built since the source file /jdt.ls-java-project/src/com/test/test/testfile-2dfd1f2d__202220CoCQDMrqr9JO.java could not be read;code: 0
Current Result

Whenever I compare a file to it's previous version, vscode cannot compile my project anymore

Expected Result

To only compile files that are in the path of the project, not temporary files.

Additional Informations

This will most problably also resolve #390
Workaround - close Code, delete workspace cache, open project again.

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

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

はじめの一歩

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

調査の方向性

記載された比較およびデバッグ手順を使用して、Maven ベースの Java プロジェクトで問題を再現し、その後、拡張機能のログとワークスペースキャッシュの動作を調査します。一時的な比較ファイルがプロジェクトのビルドパスに入る経路を追跡します。完了条件は、VS Code の再起動後も含め、未解決の依存関係や重複型エラーなしでデバッグが成功することです。

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

評価

技術スタック
java, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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