microsoft/vscode-lombok

Wrong lombok.jar path on remote macOS system.

ericlogic opened this issue · 7 comments

Local: Windows 10
Remote: macOS 11.5.2

Connect via vscode Remote SSH.

vscode logged:
Error opening zip file or JAR manifest missing : /home/eric/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar

Actually, the .vscode-server folder is under /Users/eric

Met the same issue when remote to a linux machine via a local mac machine, it seems like lombok still use the local path on the remote machine.

I have similar issue for Linux remote SSH.

Local: macOS 11 and 12
Remote: SELS 15 SP2

Connect via vscode Remote SSH.
This extension installed on remote under ~/.vscode-server and the username on remote is different from local, that is, not accgeon.

log on remote:
Error opening zip file or JAR manifest missing : /Users/accgeon/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar

More severe problem is, this error seems to make crash Java Language Server on remote with following log.
log on remote:
The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.

Thnx,

I have the same problem with VsCode and remote WSL2 environment.
Lombok plugon ad a parameter to java server language specific to local or remote environment, but it doesn't work at the same time from both parts.

dsyer commented

This sucks I have to say. The offending code is here: https://github.com/GabrielBB/vscode-lombok/blob/6b3b150b5780d48368d2864876ba1856349c568d/src/lombok-installer.ts#L28. It updates the global settings.json stomping on every subsequent launch of the language server. If you use devcontainers or remote servers it makes no sense and is extremely frustrating.

the issues is also present when using a local devcontainer under wsl2 - not only a macos issue like the name may suggest

I was able to work around:

  1. open the project locally (in my case, >Reopen with WSL)
  2. open a shell/terminal (within vscode or in WSL) and navigate to the project root folder
  3. change directory to .vscode
  4. delete settings.json file
  5. in VScode >Reopen in Container

the settings file must have been produced while i had the project open in WSL since it spots a WSL path:

{
"java.configuration.updateBuildConfiguration": "automatic",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -javaagent:\"/home/avogt/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\""
}

In the latest version 1.1.0, the lombok agent in this extension is removed because RedHat Java extension has built-in lombok support by default. This lombok extension no longer injects lombok agent to 'java.jdt.ls.vmargs'.