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 @Singular cause Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failure #3561

Closed
lamplification opened this issue Apr 3, 2024 · 28 comments
Assignees
Labels
Milestone

Comments

@lamplification
Copy link

lamplification commented Apr 3, 2024

Lombok @Singular cause Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed

Environment
  • Operating System: Ubuntu x86_64 x86_64 x86_64 GNU/Linux
  • JDK version: 17
  • Visual Studio Code version: 1.87.2
  • Java extension version: Language Support for Java(TM) RedHat 1.29.0
Steps To Reproduce
  1. create a demo java project
  2. create a simple POJO with use of @Singular and @builder
  3. see Problem tab - Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed - See error log.
    image

demo.zip

Current Result

Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed - See error log.

Expected Result

No issue

Additional Informations

Comment @Singular in the Domain.java, everything work as expected. It is working in Intellij.

@lamplification lamplification changed the title ombok @Singular cause Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failure lombok @Singular cause Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failure Apr 3, 2024
@snjeza snjeza added the upstream label Apr 4, 2024
@snjeza
Copy link
Contributor

snjeza commented Apr 4, 2024

This is an upstream lombok issue caused by eclipse-jdt/eclipse.jdt.core@cb6774f

@lamplification
Copy link
Author

Thank you @snjeza , I rolled back to v1.27.0 for Language Support for Java(TM) by Red Hat. That version is working.

@sashirestela
Copy link

Thank you @snjeza , I rolled back to v1.27.0 for Language Support for Java(TM) by Red Hat. That version is working.

Rolling back to v1.28.1 is working too.

@sashirestela
Copy link

@snjeza Please, could you tell us if you have any estimated time for a fixing here?

@snjeza
Copy link
Contributor

snjeza commented Apr 9, 2024

@sashirestela This is a lombok issue. You could ask at projectlombok/lombok#3648

@ekeric13
Copy link

how do you rollback a vscode extension version?

@azriel-healthpoint
Copy link

@ekeric13 Click on the drop down next to Uninstall:

image

Then this list appears:

image

Pick the version you want.

I think you have to restart VS code + Clean Java Language Workspace after.

enjoy ✌️

@sashirestela
Copy link

Does anyone know if the last version (1.30.0) is fixing the bug?

@takashi-nakakido
Copy link

@sashirestela
I could not see the bug fix on my PC which has been upgraded (1.30.0).

@skozitzki
Copy link

The same on my machine. No bug fix, neither with version 1.30.0 nor with 1.31.2024050208.

@matt-locker
Copy link

This should be fixed with the current edge release 1.18.33 https://projectlombok.org/download-edge

@fbricon
Is it possible to upgrade to 1.18.33 until 1.8.34 is released or alternatively downgrade to 1.18.30 again? At least for a snapshot?
projectlombok/lombok#3648 (comment)

Downgrading is no option for me. If I do so I can't run/debug unit tests with covereage in VS Code anymore...
Only fix I have is to remove @Singular usages in my projects temporarily.

@ll01
Copy link

ll01 commented May 27, 2024

@ekeric13 Click on the drop down next to Uninstall:
image

Then this list appears:
image

Pick the version you want.

I think you have to restart VS code + Clean Java Language Workspace after.

enjoy ✌️

when I roll back to that version, none of my tests can be discovered

@azriel-healthpoint
Copy link

azriel-healthpoint commented May 27, 2024

If anyone wants to "just get things working", these commands should get you there:

git clone [email protected]:redhat-developer/vscode-java.git
cd vscode-java
mkdir -p lombok
curl -L https://projectlombok.org/lombok-edge.jar -o lombok/lombok-1.18.32.jar
npm install -g @vscode/vsce
npm install
npm run build
vsce package
code --install-extension java-1.31.0.vsix # I don't think the version number matters

You might have to close vscode first, and/or uninstall the existing redhat vscode-java extension. Note that that will disable some other Java extensions, which you can re-enable by going Cmd Shift X, search for @disabled, and re-enable them.

when I roll back to that version, none of my tests can be discovered

Rolling back worked at the time, something changed since then (JDT LSP?).
Anyway, using edge lombok and HEAD vscode-java plugin is what works currently.

edit: added -L to curl command

@daniel-belonio
Copy link

If anyone wants to "just get things working", these commands should get you there:

git clone [email protected]:redhat-developer/vscode-java.git
cd vscode-java
mkdir -p lombok
curl https://projectlombok.org/lombok-edge.jar -o lombok/lombok-1.18.32.jar
npm install -g @vscode/vsce
npm install
npm run build
vsce package
code --install-extension java-1.31.0.vsix # I don't think the version number matters

You might have to close vscode first, and/or uninstall the existing redhat vscode-java extension. Note that that will disable some other Java extensions, which you can re-enable by going Cmd Shift X, search for @disabled, and re-enable them.

when I roll back to that version, none of my tests can be discovered

Rolling back worked at the time, something changed since then (JDT LSP?). Anyway, using edge lombok and HEAD vscode-java plugin is what works currently.

Nice this works, could you use the following curl command, because there is a redirect:

curl -L https://projectlombok.org/lombok-edge.jar -o lombok/lombok-1.18.32.jar

Thanks

@marco-belonio
Copy link
Contributor

Can it be, that the master is not the branch for releasing? Using the manual steps from @azriel-healthpoint and @daniel-belonio 's improvement works, but the v1.31 doesnt.

If anyone wants to "just get things working", these commands should get you there:

git clone [email protected]:redhat-developer/vscode-java.git
cd vscode-java
mkdir -p lombok
curl -L https://projectlombok.org/lombok-edge.jar -o lombok/lombok-1.18.32.jar
npm install -g @vscode/vsce
npm install
npm run build
vsce package
code --install-extension java-1.31.0.vsix # I don't think the version number matters

You might have to close vscode first, and/or uninstall the existing redhat vscode-java extension. Note that that will disable some other Java extensions, which you can re-enable by going Cmd Shift X, search for @disabled, and re-enable them.

when I roll back to that version, none of my tests can be discovered

Rolling back worked at the time, something changed since then (JDT LSP?). Anyway, using edge lombok and HEAD vscode-java plugin is what works currently.

edit: added -L to curl command

@marco-belonio
Copy link
Contributor

Missed @daniel-belonio's comment. He already pointed out what the problem indeed is - It's an older lombok version delivered with the extension.

@marco-belonio
Copy link
Contributor

See #3674 :)

If you agree, please merge it :)

@rgrunber rgrunber added this to the End June 2024 milestone Jun 12, 2024
@rgrunber
Copy link
Member

Pre-releases since v1.32.2024061408 should have included the 1.18.33 edge release which fixed this. It will make our upcoming 1.32 release.

@Kogs
Copy link

Kogs commented Jun 27, 2024

Can confirm new version 1.32.0 seems to fix the issue. 🚀

@Kogs
Copy link

Kogs commented Aug 14, 2024

It seems the problem reappeared in the new 1.33.0 release.

@rgrunber
Copy link
Member

This is being tracked at #3733 .

The upstream issue is projectlombok/lombok#3706 .

@luccahuguet
Copy link

  • with v1.35.1 I had this same bug
  • but downgrading to v1.32.0 worked for me
  • And better yet, downgrading to v1.34.0 also worked for me
  • I am currently using this version of java
java --version
openjdk 11.0.25 2024-10-15
OpenJDK Runtime Environment Temurin-11.0.25+9 (build 11.0.25+9)
OpenJDK 64-Bit Server VM Temurin-11.0.25+9 (build 11.0.25+9, mixed mode)

@rgrunber
Copy link
Member

Could you try the latest vscode-java from the pre-release stream and see if that resolves the issue ? As far as I can tell, we've been pulling from the latest lombok builds for some time, so if the issue was solved upstream, then it should be there.

@luccahuguet
Copy link

Could you try the latest vscode-java from the pre-release stream and see if that resolves the issue ? As far as I can tell, we've been pulling from the latest lombok builds for some time, so if the issue was solved upstream, then it should be there.

Ok, I tried it and it didn't work, back to 1.34.0 then

@rgrunber
Copy link
Member

@luccahuguet what's the error that you're seeing ? i just tried the sample project in #3733, and it works just fine. No errors.

@foxpluto
Copy link

foxpluto commented Dec 4, 2024

Just tested with v1.38.2024120308 and still not working, reverted back to 1.34.0 worked again.

@rgrunber
Copy link
Member

rgrunber commented Dec 4, 2024

Seems to be working with v1.38.2024120308 for me. Does language server status bar say you're using the extension's version of Lombok, or the project's version ?

Image

@foxpluto
Copy link

foxpluto commented Dec 4, 2024

For me that menu is:

Image

Image

Image

Unfortunately it doesn't work.

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

No branches or pull requests