redhat-developer / redhat-developer/vscode-java
vscode-java tries to compile temporary files
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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
- Create a maven (probably the same with gradle) based java project
- Add to git repository
- Compile, debug, check that everything works.
- Right-click a file, compare to previous version
- Debug the project - it will fail to compile.
- 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 - Close VS Code
- Open again, with same project
- Try to debug - it will still fail to compile.
- 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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem in einem Maven-basierten Java-Projekt anhand der aufgeführten Vergleichs- und Debug-Schritte und untersuche anschließend das Verhalten des Erweiterungsprotokolls und des Workspace-Caches. Verfolge, wie temporäre Vergleichsdateien in den Build-Pfad des Projekts gelangen; als abgeschlossen gilt die Aufgabe, wenn das Debugging ohne ungelöste Abhängigkeiten oder Fehler aufgrund doppelter Typen erfolgreich ist, auch nach einem Neustart von VS Code.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100