How did Lombok access jdk.compiler

44 views
Skip to first unread message

denny yao

unread,
Jul 9, 2024, 3:34:32 PM (13 days ago) Jul 9
to Project Lombok
I have created a feature similar to Lombok based on the JSR-269 specification, which inserts new method declarations into the interface through specified annotations. It works fine in jdk1.8, but after upgrading to jdk17, an error message "module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module xxx" appears during compilation. Based on the solution found online, I added the --add-exports parameter during compilation, but the problem still persists. I have noticed that lower versions of Lombok (such as 1.18.14) also have the same issue in jdk17. But it was resolved in a higher version (such as 1.18.20). I have checked the latest Lombok source code, but I do not understand which part solved the problem. I hope someone can help me clarify this. Thanks

Mat Jaggard

unread,
Jul 10, 2024, 2:00:42 AM (13 days ago) Jul 10
to project-lombok
The main implementation of opening modules was done here, although there have been fixes after that. 


On Tue, 9 Jul 2024, 20:34 denny yao, <yaod...@gmail.com> wrote:
I have created a feature similar to Lombok based on the JSR-269 specification, which inserts new method declarations into the interface through specified annotations. It works fine in jdk1.8, but after upgrading to jdk17, an error message "module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module xxx" appears during compilation. Based on the solution found online, I added the --add-exports parameter during compilation, but the problem still persists. I have noticed that lower versions of Lombok (such as 1.18.14) also have the same issue in jdk17. But it was resolved in a higher version (such as 1.18.20). I have checked the latest Lombok source code, but I do not understand which part solved the problem. I hope someone can help me clarify this. Thanks

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/10a2b668-681c-48d1-bd0a-5b4f5a171442n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages