microsoft / microsoft/vscode-java-pack

Opening project as workspace causes language server to ignore java.jdt.ls.vmargs

Abierto
#988 5 comentarios 0 reacciones 1 asignado Ver en GitHub

@testforstephen ya está trabajando en esto.

Desde el 5/5/2022.

ai-triaged bug lombok settings
Lenguaje dominante
TypeScript
Estrellas
352
Forks
166
Merge medio
17 h 47 min
PR fusionados (30 d)
32

Descripción

I can't reproduce this on all workspaces, but for a strange reason some projects have issues with Lombok auto-generated methods when using the Java Extension Pack where the language server fails to recognize Lombok auto-generated methods.

The root cause appears to be that the java.jdt.ls.vmargs global setting is ignored, and the language server JVM is launched without the -javaagent:/path/to/lombok.jar that the VS Code Lombok extension injects. When opening the same affected project as a folder instead of as a workspace, the vmargs are injected correctly.

Environment:

  • VS Code Version: v1.66.2
  • Extension Version: v0.22.4
  • JDK Type & Version: Termurin 18
  • OS Type & Version: Mac

Step to Reproduce:

  1. Open project as workspace
  2. Enable/install Java Extension Pack and Lombok extensions
  3. Write a POJO making use of @Getter and @Setter Lombok annotations
  4. Try to call the getters of said POJO from another class

Expected Behavior:
Code intellisense/autocomplete shows Lombok-generated getters and setters, and code written calling the getters and setters has no errors.

Actual Behavior:
VS Code claims the getters and setters are undefined methods, and will not build or compile the project. Maven can compile the code with a mvn clean compile normally.

Related Issues:
Possibly related to https://github.com/redhat-developer/vscode-java/issues/1802

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.