Provide an option to clear cache
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 225
- Forks
- 47
- Merge moyen
- 3 h 51 min
- PR mergées (30 j)
- 7
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de zed-extensions/java
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
zed-extensions/java#325 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
zed-extensions/java#133 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
zed-extensions/java#324 ·
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 45/100
zed-extensions/java#323 · 2 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
zed-extensions/java#272 · 6 commentaires ·
Toutes les issues de zed-extensions/java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
riverqueue/river#1576 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
stadelmanma/fitparse-rs#64 ·