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

Lombok extension updates User level setting in Remote Container mode

Open navneetkarnani opened this issue 4 years ago • 3 comments
trafficstars

I am using the "Remote Containers" extension to connect to a Docker container where I do my development for a project.

When I install the Lombok extension on the host machine, it updates the "User" settings to have the "javaagent" with the path of the jar from the user home directory.

When I am working inside a "Remote Container" hosted on my local Docker machine, I have the option to install extensions that are relevant to that container. But, at this time, when I install the extension, the "User" setting already has the "javaagent" entry from the host, and hence the Java language server fails to start. The host user directory is not available on the Container.

The work around is to open the user settings.json file and remove the "javaagent" entry from there. But then, that means I cannot use the extension on my host machine.

When running inside a container, the extension settings should be added to the "Remote" settings instead of the "User" settings.

navneetkarnani avatar Dec 24 '20 12:12 navneetkarnani

This same issue happens with Gitpod where vs code extensions are installed per repository. I.e. after starting a workspace on a repo that includes Lombok, the user settings will be updated automatically. Starting any Java repo without the lombok extension afterward will break the Java language server.

svenefftinge avatar Dec 25 '20 21:12 svenefftinge

Here is a reply I got from the VS Code folks. This should help: https://github.com/microsoft/vscode-remote-release/issues/4230#issuecomment-755371108

Reproducing the comment: the extension needs to change the scope of the setting to machine or machine-overridable so that its value from user settings is ignored when opened in remote window.

navneetkarnani avatar Jan 09 '21 07:01 navneetkarnani

Any progress on this?

Zoomink avatar Jan 29 '21 14:01 Zoomink

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