As 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.
openjdk version "1.8.0_222"1.40.20.54 of the vscode-java extension is installed.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.
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}}}
Lombok annotations don't work if configured globally per vscode-java > Lombok Support.
Lombok annotations work if configured globally, as seen version 0.53.1 of this extension.
None
Yeah we seem to have broken vmargs support. We'll fix it and release a new version ASAP
@fbricon or @snjeza - Related to this issue and the Lombok Support wiki page, is the -Xbootclasspath/a:/path/to/lombok.jar portion still needed?
The Lombok extension only sets the -javaagent:/path/to/lombok.jar portion and things seem to work fine.
@chucknelson @ricmzn @bernardmo can you please try https://download.jboss.org/jbosstools/jdt.ls/staging/java-0.54.1-1952.vsix, see if it fixes your issue?
Yes, I can confirm that the new version fixes the issue. Thanks a lot!
@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
Most helpful comment
@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