Provide an option to clear cache
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 225
- 派生
- 47
- 平均合并
- 3 小时 51 分钟
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
zed-extensions/java 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
zed-extensions/java#325 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
zed-extensions/java#133 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
zed-extensions/java#324 ·
-
难度 3/5 半天 新手友好度 45/100
zed-extensions/java#323 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
zed-extensions/java#272 · 6 条评论 ·
查看 zed-extensions/java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
riverqueue/river#1576 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
stadelmanma/fitparse-rs#64 ·