redhat-developer / redhat-developer/vscode-java
Gradle multi-module project breaks on reload, requires cleaning Java Language Server workspace every time
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
Description
I am working with a Java Gradle multi-module project in VS Code.
On the first load, the project fails with an error like:
The project was not built due to "xxx does not exist". Fix the problem, then try refreshing this project and building it since it may be inconsistent.
The suggested workaround is:
- Disable Gradle for Java extension
- Run "Java: Clean Java Language Server Workspace"
- Reload the project
This workaround does fix the problem, but only temporarily.
Problem
Every time I:
- reload the window, or
- close and reopen the project
I have to run "Java: Clean Java Language Server Workspace" again, otherwise the same error appears.
This makes working with the project very inconvenient.
Expected behavior
Once the project is cleaned and loaded successfully:
- It should stay in a consistent state
- Reloading or reopening the project should not require cleaning the Java Language Server workspace again
Actual behavior
- Project breaks again after reload
- Same error repeats
- Manual workspace cleaning is required every time
Environment
- VS Code
- Java multi-module Gradle project
- Java Language Server
- Gradle for Java extension enabled
Additional notes
This looks like a workspace cache or Gradle project import inconsistency issue.
It seems the Java Language Server does not correctly persist the resolved multi-module Gradle state across reloads.
Guide de contribution
Ouvrir le guide de contribution
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.
Piste de recherche
Commencez par reproduire l’échec dans VS Code avec un projet Java Gradle multi-module, en utilisant l’extension Gradle for Java et le Java Language Server. Comparez le chargement initial avec le rechargement ou la réouverture après avoir exécuté "Java: Clean Java Language Server Workspace" ; c’est terminé lorsque le projet reste cohérent sans nettoyer à nouveau l’espace de travail.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, vscode
- Domaine
- build-system, developer-experience, tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 50/100