Provide an option to clear cache
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start in the function get_jdtls_data_path and in language_server_command, where the per-worktree JDTLS data directory is computed and launched. The issue proposes two options, a cache_key setting or a clear_cache_on_startup flag, and no decision has been recorded, so agree on one with the maintainers before editing. Done means the chosen option clears or rotates the JDTLS data directory and the change is documented in the extension's settings.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It sometimes happens that JDTLS's starts providing wrong diagnostics or suddenly doesn't give certain completions anymore. This is certainly a problem with JDTLS and it's interactions with Zed, but the remedy is usually to clear the cache and restart the language server and everything works fine again.
The problem is that there is currently no convenient way to do so.
We have get_jdtls_data_path which determines where JDTLS will store its project-level state. Currently, these are unique per worktree-root directory and stored in the system level cache folder. To manage them I see two options that we can use within the current Zed extension limitations:
- have a config option
"cache_key" : intthat we use when generating the directory hash. This way we can simply increment the key to get a fresh cache. Cleaning up the old ones remains the system's responsibility. The nice thing here is this can be project-specific config, so you can keep the cache for one project and refresh them for another one - have a config option
clear_cache_on_startupand manage the jdtls-data-paths inside our extension working directory, and just delete its contents every timelanguage_server_commandis called when the option is set.
I haven't done a lot of research if maybe JDTLS offers other ways to do this or if we should perhaps wait for/work on some Zed feature, so this is the place to discuss this.
- Ngôn ngữ chính
- Rust
- Star
- 225
- Fork
- 47
- Merge trung bình
- 3 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của zed-extensions/java
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
zed-extensions/java#325 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
zed-extensions/java#133 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
zed-extensions/java#324 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
zed-extensions/java#272 · 6 bình luận ·
-
language-server
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
zed-extensions/java#246 · 4 bình luận ·
Tất cả issue của zed-extensions/java
Issue tương tự
-
github_actions security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dekobon/big-code-analysis#1815 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: png-glitch bug P0 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
chikoski/png-glitch#45 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
nekko-labs/nekko-agent#1756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
upstream
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
yologdev/yoyo-evolve#1138 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gitbutlerapp/gitbutler#16982 ·
Maintainer thường phản hồi trong vòng 1 ngày