-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Possible Lombok Incompatibility #4224
Comments
This does seem like a real Quarkus bug. If I had to spitball some ideas, I'd say maybe inconsistent TCCL contents might be a possible culprit, or maybe an error in how we assemble the app's class loader which is probably also inconsistent with how we do it in regular mode. Maybe it varies from run to run or something. |
@aelfric Is there a project you can share, perhaps as a github repo, which helps reproduce this issue? |
Unfortunately, the project is closed source, but I'll see if I can make a
minimal example with a similar structure that has the same unexpected
behavior.
…On Sun, Sep 29, 2019, 12:08 AM Jaikiran ***@***.***> wrote:
@aelfric <https://github.com/aelfric> Is there a project you can share,
perhaps as a github repo, which helps reproduce this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4224?email_source=notifications&email_token=AAZTRYHKSPSQ5EXX6JDG6Y3QMAS3JA5CNFSM4I24D6YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD73HWJA#issuecomment-536247076>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZTRYFMPVK3FY5E3IUWAR3QMAS3JANCNFSM4I24D6YA>
.
|
Its probably related to #1502. |
This issue/pullrequest has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any luck with this as we are hitting the same issue? |
No luck on my side. As a (albeit poor) workaround, we've resorted to minimizing use of Lombok in new code, but we have just been restarting maven whenever we make changes to older code with Lombok annotations. |
Hello @tobad357, Any chance you can share a reproducer for this (maybe as a github repo with the source)? |
@jaikiran please see https://github.com/tobad357/quarkus-lombok-test
This will give you the error if using the following JVM
It will work without issue using the following JVM |
Sorry I was never able to contribute a minimal reproducer, but this one from tobad357 is behaving the same for me as the issue we're encountering in our project. We are not using GraalVM, though. I'm running on Windows 10 with the following JVM.
|
I have the same behavior with gradle on Windows. The missing Class is part of the Java Compiler. I noticed that lombok trys to use the JRE as compiler because "Java.home" is set to the jre folder inside the jdk:
I can't find a way to change it to the root of the JDK. Outside the lombok + Quarkus combination everything works fine and the correct path is used. |
Sorry, I have been a bit busy and wasn't able to look into this sooner. I will try and find some time this weekend and see what's going on and if I can help. |
Had the same problem on OpenJDK 8 but it's gone after switching to GraalVM. |
i've the same issue |
I´m running into issues with Lombok too. @builder annotation for example works really unreliable, Builder classes are sometimes not created when I´m running quarkusBuild ( quarkusDev works). Example: The decompiled code below is one entity that uses the Builder annotation. It produces the static builder() method, but not the MyClassBuilder class, which is why I´m running into
*What seems weird is that MyClass contains an empty static MyClass . Other entity classes that are not annotated with @builder won´t have this static class. Getters and setters on the other hand are created as expected. |
having the same issue, with Stack Trace
|
Also tried to use the delombok maven plugin with no success http://anthonywhitford.com/lombok.maven/lombok-maven-plugin/usage.html |
Hi, It appears that including the com.sun:tools artifact as a system scoped dependency allows lombok to function with dev mode, e.g.: <dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8</version>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
<scope>system</scope>
</dependency> hiding it in a dedicated profile seems like a reasonable workaround for now, e.g.: <profile>
<id>dev</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<debug>false</debug>
</properties>
<build>
<defaultGoal>quarkus:dev</defaultGoal>
</build>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8</version>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
<scope>system</scope>
</dependency>
</dependencies>
</profile> |
@garyhodgson |
I know it's been over a year but did you ever manage to have a look at it? |
Hello @famod, in my last attempt I couldn't reproduce this. Even today I just gave this a try with 1.12.2.Final of Quarkus and used the steps below:
It works fine, no errors and the changes to the file are reflected. Of course, I used the latest Graal VM JDK 11 instead of 19.2.1 |
@jaikiran Thanks for checking! In fact, a colleague of mine just tested Lombok with Quarkus 1.12.2 dev mode and constructor related changes seem to be working fine. Dev mode does a full reload for most changes though, but it works in general. We are using AdoptOpenJDK 11.0.10. |
So I think we can close this now. Please report back (or even better: create a new issue) if soemthing isn't working as expected with Lombok. |
Sorry if this is not really a Quarkus bug. I'm a newcommer to Quarkus working on a proof of concept. I have a project that is making some minimal use of Lombok annotations. When running
mvn quarkus:dev
, occasionally after modifying one of the Lombok-annotated classes and trying to refresh the browser, I get a an error with the below stacktrace.Expected behavior
Code recompiles successfully.
Actual behavior
To Reproduce
Steps to reproduce the behavior:
@Data
Environment (please complete the following information):
uname -a
orver
: This is on Windows 10 version 1903,java -version
:Additional context
If it matters, this is a multi-module maven project with two modules
web
andservice
.web
is the quarkus module. Bothweb
andservice
have a few classes using Lombok.The text was updated successfully, but these errors were encountered: