redhat-developer / redhat-developer/vscode-java
Corrupted workspace state on restart
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la entrada del registro del workspace e inspecciona la ruta jdt.ls-java-project mencionada en el informe, especialmente el archivo faltante SampleClass-6b2da599__18012WV3rlaskH3xV.java. Reproduce la secuencia de cerrar y volver a abrir, si es posible, y luego verifica que el proyecto se reconstruya sin errores de archivos faltantes ni archivos Java marcados en rojo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, vscode
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 28/100