redhat-developer / redhat-developer/vscode-java
Problems with (I think) the language server and maven cross-project dependencies
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ả
This is possibly a PEBCAK or user-ignorance issue.
I work with several Maven projects.
I have project A and project B open in separate VSCOde workspaces. Project B has multiple sub-projects
A subproject of Project B builds a JAR that is a maven dependency in project A.
Project B is quite large. Project A is small (but all are spring boot so there's quite a lot of cruft around).
If in project B I make some change (say, add a method to a class) and "mvn install", then the VSCode doesn't pick up the change in project A. The new method isn't visible.
Java: refresh, Java: force compilation, java: update project configuration don't fix this.
Java: clean the language server workspace sometimes fixes it, but not always. And takes an age so I don't want to be doing this.
The dependencies are all correct as far as Maven is concerned, as a command-line "mvn install" (for example) of Project A succeeds, including the code that calls the new method
Existing the VSCode for Project A and restarting does seem to work, so it looks like some sort of refresh/caching issue
How am I supposed to set things up for this case? (one maven project depending on the artefact of another)?
I've tried adding Project B as a folder to the workspace of Project A - but the LSP seems to have issues with that (I previously reported a non-reproducable bug were @Test run/debug no longer appeared, and when I tried it as a work around for this, I lost the semantic highlighting etc, (I think - the import statements weren't green but white, as they are while the LSP workspace is loading when first opening the workspace).
If I can provide more info/logs etc, please let me know what is needed.
Environment
- Operating System: Windows 10
- JDK version: VSCode says current version is JDK11
- Visual Studio Code version: 1.47
- Java extension version: MS Java 0.9.1, Redhat 0.65.0
Steps To Reproduce
Please see description above, I don't have a small test case. Sorry
[Please attach a sample project reproducing the error]
Proprietary code. I can't.
Please attach logs
Current Result
Expected Result
Additional Informations
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
Không có tệp nguồn, bài kiểm thử hoặc bản tái hiện nhỏ nào được cung cấp. Trước tiên, hãy làm theo kịch bản Maven với hai workspace của issue trên Windows, sử dụng các phiên bản Java và extension được liệt kê, sau đó bật language-server logs bằng hướng dẫn troubleshooting được liên kết. Được coi là hoàn tất khi các thay đổi được cài đặt từ Project B hiển thị trong Project A mà không cần khởi động lại VS Code hoặc dọn dẹp workspace của language server.
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
- build-system, 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100