redhat-developer / redhat-developer/vscode-java
Gradle multi-module project breaks on reload, requires cleaning Java Language Server workspace every time
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il malfunzionamento in VS Code con un progetto Java multi-modulo Gradle, utilizzando l’estensione Gradle for Java e il Java Language Server. Confronta il caricamento iniziale con il ricaricamento o la riapertura dopo aver eseguito "Java: Clean Java Language Server Workspace"; l’attività è completata quando il progetto rimane coerente senza pulire nuovamente l’area di lavoro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, vscode
- Ambito
- build-system, developer-experience, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 50/100