redhat-developer / redhat-developer/vscode-java
vscode-java tries to compile temporary files
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 547
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện sự cố trong một dự án Java dựa trên Maven bằng cách sử dụng các bước so sánh và gỡ lỗi đã nêu, sau đó kiểm tra nhật ký của extension và hành vi của bộ nhớ đệm workspace. Theo dõi cách các tệp so sánh tạm thời đi vào đường dẫn build của dự án; công việc được xem là hoàn tất khi việc gỡ lỗi thành công mà không có dependency chưa được giải quyết hoặc lỗi kiểu trùng lặp, kể cả sau khi khởi động lại VS Code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100