redhat-developer / redhat-developer/vscode-java

vscode-java tries to compile temporary files

Đang mở
#676 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug compile priority/P1
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
  1. Create a maven (probably the same with gradle) based java project
  2. Add to git repository
  3. Compile, debug, check that everything works.
  4. Right-click a file, compare to previous version
  5. Debug the project - it will fail to compile.
  6. 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
  7. Close VS Code
  8. Open again, with same project
  9. Try to debug - it will still fail to compile.
  10. 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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.