redhat-developer / redhat-developer/vscode-java
vscode-java tries to compile temporary files
未关闭
还没有人认领这个 Issue。
bug
compile
priority/P1
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 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
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在基于 Maven 的 Java 项目中,按照列出的比较和调试步骤重现该问题,然后检查扩展日志和工作区缓存的行为。跟踪临时比较文件如何进入项目构建路径;完成标准是调试成功且没有未解决的依赖项或重复类型错误,包括重启 VS Code 后仍然如此。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100