redhat-developer / redhat-developer/vscode-java
Corrupted workspace state on restart
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
Every so often, when I close VS Code and I open it again later to continue working on the project, the Java Language Server (or some part of this extension) gets a corrupted build state. All my Java files get red-lined everywhere especially with imports (which should have been resolved correctly through Maven dependencies). It makes the entire Java project riddled with errors, when there should be 0 errors reported.
The workspace log file reports:
message: The project was not built since the source file /jdt.ls-java-project/src/com/example/package/SampleClass-6b2da599__18012WV3rlaskH3xV.java could not be read;code: 0
It looks like some kind of weird diff version of the original class file (perhaps generated from all the diffing I do while I work on my project. Looks like JLS thinks the diff file is an actual project file and keeps looking for it?
I tried to look inside this jdt.ls-java-project folder but I have no idea what's wrong. The file doesn't exist. I don't know how to fix this or how to force refresh JLS cache (if there's such a thing). Any hints and pointers will be very helpful. This is the second time I am getting this problem; I don't remember how I fixed it the first time or it just fixed itself somehow.
Environment
- Operating System: Windows 10 x64
- JDK version: 1.8.0_144
- Visual Studio Code version: 1.18.1
- Java extension version: 0.15.0
Steps To Reproduce
I'm not really sure. It just randomly happens when I close VS Code and open it later again.
Current Result
Weird build errors resulting in red-lining throughout the project.
Expected Result
Successfully built project every time.
Additional Information
None.
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
Bắt đầu với mục nhật ký workspace và kiểm tra đường dẫn jdt.ls-java-project được đề cập trong báo cáo, đặc biệt là tệp SampleClass-6b2da599__18012WV3rlaskH3xV.java bị thiếu. Nếu có thể, hãy tái hiện chuỗi thao tác đóng và mở lại, sau đó xác minh rằng dự án được xây dựng lại mà không có lỗi thiếu tệp hoặc các tệp Java bị đánh dấu màu đỏ.
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
- devtools
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 28/100