redhat-developer / redhat-developer/vscode-java
vscode-java tries to compile temporary files
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a Maven-based Java project using the listed compare and debug steps, then inspect the extension log and workspace cache behavior. Trace how temporary comparison files enter the project build path; done means debugging succeeds without unresolved dependencies or duplicate-type errors, including after restarting VS Code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100