vscode-lombok icon indicating copy to clipboard operation
vscode-lombok copied to clipboard

Wrong lombok.jar path on remote macOS system.

Open ericlogic opened this issue 3 years ago • 6 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

ericlogic avatar Sep 09 '21 02:09 ericlogic

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.

ExiaHan avatar Oct 11 '21 08:10 ExiaHan

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,

accgeon avatar Nov 23 '21 07:11 accgeon

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.

gianluca-sabena avatar Dec 15 '21 15:12 gianluca-sabena

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.

dsyer avatar Feb 25 '22 09:02 dsyer

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

avogt-sundn avatar Mar 24 '22 18:03 avogt-sundn

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\""
}

avogt-sundn avatar Mar 24 '22 21:03 avogt-sundn

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'.

testforstephen avatar Sep 26 '22 04:09 testforstephen