Version 0.54 Not Using Global "java.jdt.ls.vmargs" Setting
See original GitHub issueAs of the latest 0.54
update, the java.jdt.ls.vmargs
setting, if set globally (i.e., user settings), doesn’t seem to be used. I noticed this in my project because I use Project Lombok, and the global vmargs are set accordingly:
"java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:\"/home/vagrant/.vscode-server/extensions/gabrielbb.vscode-lombok-0.9.9/server/lombok.jar\"",
If I copy this exact setting and place it in my workspace/project folder (i.e., in .vscode/settings.json
), Lombok annotations work as expected.
I’ve reverted back to 0.53.1
, and it works as expected, utilizing the global java.jdt.ls.vmargs
setting.
Environment
- Operating System: Windows 7 w/ VS Code Remote, Connecting to Ubuntu 18.04
- JDK version:
openjdk version "1.8.0_222"
- Visual Studio Code version:
- Java extension version:
1.40.2
Steps To Reproduce
- Verify version
0.54
of thevscode-java
extension is installed. - Follow the instructions on vscode-java > Lombok Support, which may be just installing the Lombok extension for VS Code. Note this will require a reload/restart of VS Code.
- Open a Java project that utilizes [Project Lombok[(https://projectlombok.org/).
- Open any class that uses Lombok annotations, errors will appear relating to them (e.g., can’t find the
log
variable if using loggers)
You can then revert the vscode-java
extension to 0.53.1
, reload/restart VS Code, and the Lombok-related errors will disappear.
Logs
When viewing the server log, it seems to be picking up the setting when it’s global…so not sure what is happening behind the scenes that it’s not actually applying the setting?
!ENTRY org.eclipse.jdt.ls.core 1 0 2019-12-04 14:56:42.050
!MESSAGE >>New configuration: {java={home=/usr/lib/jvm/java-8-openjdk-amd64, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:"/home/vagrant/.vscode-server/extensions/gabrielbb.vscode-lombok-0.9.9/server/lombok.jar"}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=false, updateBuildConfiguration=interactive, maven={userSettings=null}}, trace={server=messages}, import={maven={enabled=true}, gradle={enabled=true, wrapper={enabled=true}, version=null, arguments=null, jvmArguments=null, home=null}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, maven={downloadSources=false, updateSnapshots=false}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=true}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], filteredTypes=[java.awt.*, com.sun.*], importOrder=[java, javax, com, org]}, foldingRange={enabled=true}, progressReports={enabled=true}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false, toString={template=${object.className} [${member.name()}=${member.value}, ${otherMembers}], codeStyle=STRING_CONCATENATION, skipNullValues=false, listArrayContents=true, limitElements=0.0}}, selectionRange={enabled=true}}}
Current Result
Lombok annotations don’t work if configured globally per vscode-java > Lombok Support.
Expected Result
Lombok annotations work if configured globally, as seen version 0.53.1
of this extension.
Additional Informations
None
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
@chucknelson @ricmzn @bernardmo 0.54.1 has been pushed to the VS Code Marketplace, it should take a few minutes to be available for update in VS Code
Hi people. If you got to this issue, it’s possible that you are having the same problems that I was having. So, I’m leaving this link here and hope this can help you:
Lombok extension breaking vscode: https://github.com/GabrielBB/vscode-lombok/issues/54