-
-
Notifications
You must be signed in to change notification settings - Fork 915
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
Apt Problem MapStruct - Eclipse with Java 17 Records #2628
Comments
Thanks for reporting this and providing an example project @blitzionian. In 1.5.0.Beta1 we have done some changes in the area around Eclipse. Can you please try out your project with MapStruct 1.5.0.Beta1? |
@filiphr Have tried it with MapStruct 1.5.0.Beta1 in the example project. The APT Problem changed a little with the following stack trace:
|
Thanks for giving it a go @blitzionian. This is actually a bug in the Eclipse compiler itself. I have logged this bug with the eclipse JDT team. I'll wait and see what they do before we do something about it |
Thanks so far. Have pushed the example project with 1.5.0.Beta1. |
Are there any known workarounds? Nothing happened on the eclipse bug so far. |
I haven't looked for a workaround, just don't using this feature. |
@eiswind Yeah well... there is the "classic" workaround: You can delete the Error from the Problems view... until the file is edited again. But at least you should only see the real errors then. |
I have created a pull request for this bug at the eclipse.jdt project (eclipse-jdt/eclipse.jdt.core#199 ). |
That is great open source work @raouldh. Thanks for doing that work on the JDT plugin |
I hope the fix gets added to JDT in a timely manner. I'm having the exact same problem in VSCode, which uses JDT as well. The projects works well using maven, but not in VS Code due to the JDT error (I'm using mapstruct to map between Dtos, which are records, and JPA entities, which are lombok'ed). Greatly appreciate the effort to fix JDT. |
My PR to fix this eventually got merged in the eclipse.jdt project. I just downloaded the latest eclipse version and can confirm that my errors related to this issue are now resolved. |
That's great news @raouldh. Thanks a lot for your work on the fix for the eclipse.jdt project. I am going to go ahead and close this issue now |
Using Mapstruct to map a simple record Record1 to a simple record Record2 in Eclipse throws APT Error.
If using maven directly, everything seems to work. So this seems to be a Problem of the combination of eclipse and mapstruct.
Not sure if iam try to using MapStruct in a way it doesn't support currently (or something else).
Example Project: https://github.com/blitzionian/mapstruct-eclipse-records
Java Version: 17
Eclipse Version: 2021-09 (4.21.0) Build id: 20210910-1417
Installed Plugins: Mapstruct, Java 17 Support, m2e-apt
JDK:
The text was updated successfully, but these errors were encountered: