Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lombok extension updates User level setting in Remote Container mode #49

Closed
navneetkarnani opened this issue Dec 24, 2020 · 4 comments
Closed

Comments

@navneetkarnani
Copy link

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.

@svenefftinge
Copy link

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.

@navneetkarnani
Copy link
Author

navneetkarnani commented Jan 9, 2021

Here is a reply I got from the VS Code folks. This should help:
microsoft/vscode-remote-release#4230 (comment)

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.

@Zoomink
Copy link

Zoomink commented Jan 29, 2021

Any progress on this?

@testforstephen
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants