redhat-developer / redhat-developer/vscode-java
Corrupted workspace state on restart
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
Every so often, when I close VS Code and I open it again later to continue working on the project, the Java Language Server (or some part of this extension) gets a corrupted build state. All my Java files get red-lined everywhere especially with imports (which should have been resolved correctly through Maven dependencies). It makes the entire Java project riddled with errors, when there should be 0 errors reported.
The workspace log file reports:
message: The project was not built since the source file /jdt.ls-java-project/src/com/example/package/SampleClass-6b2da599__18012WV3rlaskH3xV.java could not be read;code: 0
It looks like some kind of weird diff version of the original class file (perhaps generated from all the diffing I do while I work on my project. Looks like JLS thinks the diff file is an actual project file and keeps looking for it?
I tried to look inside this jdt.ls-java-project folder but I have no idea what's wrong. The file doesn't exist. I don't know how to fix this or how to force refresh JLS cache (if there's such a thing). Any hints and pointers will be very helpful. This is the second time I am getting this problem; I don't remember how I fixed it the first time or it just fixed itself somehow.
Environment
- Operating System: Windows 10 x64
- JDK version: 1.8.0_144
- Visual Studio Code version: 1.18.1
- Java extension version: 0.15.0
Steps To Reproduce
I'm not really sure. It just randomly happens when I close VS Code and open it later again.
Current Result
Weird build errors resulting in red-lining throughout the project.
Expected Result
Successfully built project every time.
Additional Information
None.
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 l’entrée du journal du workspace et examinez le chemin jdt.ls-java-project mentionné dans le rapport, en particulier le fichier manquant SampleClass-6b2da599__18012WV3rlaskH3xV.java. Reproduisez la séquence de fermeture et de réouverture si possible, puis vérifiez que le projet est reconstruit sans erreurs de fichiers manquants ni fichiers Java signalés en rouge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, vscode
- Domaine
- devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 28/100