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

When will @superbuilder be supported?

Open xiyang1024 opened this issue 4 years ago • 5 comments

When will @superbuilder be supported?

xiyang1024 avatar Oct 14 '21 12:10 xiyang1024

I waiting for this feature too. Without this I can't run Spring App (and debug) through vscode.

ewiggin avatar Oct 21 '21 10:10 ewiggin

@xiyang1024 @ewiggin this is an issue with the version of lombok. As a workaround you can specify the jar to use in the .vscode/settings.json file:

For example, you can add: "java.jdt.ls.vmargs": "-javaagent:/path/to/jars/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.12/48e4e5d60309ebd833bc528dcf77668eab3cd72c/lombok-1.18.12.jar"

You will get a warning from VSCodium, you just need to accept/allow the JVM configuration changes.

cool2k avatar Oct 21 '21 17:10 cool2k

image public class ContentWidget<C extends ScheduledContentInstance> implements WithUniqueID<ContentWidget<C>>, AssetUser { Still have issue after applying workaround. It works in intelijj idea. Simple class works with supper builder perfectly in VS code.

AndreySyagrovskiy avatar Mar 13 '22 10:03 AndreySyagrovskiy

As a workaround you can specify the jar to use in the .vscode/settings.json file

This workaround has not worked for me. I added as suggested:

"java.jdt.ls.vmargs": "-javaagent:/home/marco/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.22/9c08ea24c6eb714e2d6170e8122c069a0ba9aacf/lombok-1.18.22.jar"

But I am getting anyway the following errors on every @SuperBuilder annotation in my application:

Bound mismatch: The type C is not a valid substitute for the bounded parameter <C extends Redacted<B>> of the type Redacted.Redacted<B,C,B>
Bound mismatch: The type B is not a valid substitute for the bounded parameter <B extends Redacted.Redacted<B,C,B>> of the type Redacted.Redacted<B,C,B>

Is anyone considering fixing this issue? This is the only impediment for my team to start using Visual Studio Code for Java development.

lackovic avatar Oct 22 '22 14:10 lackovic

As the Language Support for Java(TM) by RedHat extension is now the prefered choice for Lombok, I have raised the @SuperBuilder annotation issue with the Red Hat Developer team, see Issue 2819 - Lombok @SuperBuilder annotation not supported by extension

zymotik avatar Nov 29 '22 10:11 zymotik