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
[FEATURE] Expose Public API for Running Delombok #3642
Comments
The |
Below is a listing of the files in the $ unzip -l lombok-1.18.32.jar | grep class | grep -i delombok
6870 03-20-2024 01:13 lombok/delombok/ant/Tasks$Delombok.class
1387 03-20-2024 01:13 lombok/delombok/ant/Tasks$Format.class
424 03-20-2024 01:13 lombok/delombok/ant/Tasks.class
$ unzip -l lombok-1.18.32.jar | grep class | grep Delombok
6870 03-20-2024 01:13 lombok/delombok/ant/Tasks$Delombok.class |
@Rawi01 Can you re-open this ticket? As far as I can understand, I have demonstrated that the files originally mentioned are not in the JAR. |
Most class files in the If you check the link above you will find a copy pasteable example class you can use. |
The reason why it's shadowed is that Lombok's internal classes must not be found by regular class path scanning, e.g. because they should not show up in your IDE's autocompletion. |
@janrieke OK. So then my original request is a legitimate new feature request? |
The maven plugin uses the same package name and the imported Lombok is not usually used as a runtime dependency, so there is a limited amount of publicly available API. I have thought about this request again and think that there might be some value in a real public delombok API. An additional (untested) way to call delombok is to use the public main method ( |
@Rawi01 The |
I have a situation in which I need to generate Java source files that are based on files in a Java sources JAR. The issue is that this source code has Lombok annotations. I need to delombok the files in the sources JAR before I process them. I need to use Lombok API to do the delombok-ing myself programmatically.
From what I have been able to find so far, the only way to call delombok is by staring a new JVM process that is executing the Lombok JAR, passing it command line arguments. This is extremely inefficient. Basically treating the JAR as an RPC.
What is needed is to expose a public API to call the delombok functionality.
If there is already a way to do this, I have not found it. All of the related classes I have found to do this are package private.
UPDATE:
I see that the repository has these files, but they are not included in the JAR:
The text was updated successfully, but these errors were encountered: