-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
How to run (de)lombok with big classpath? #1795
Comments
As far as I can see, we only call |
|
@rzwitserloot is going to implement the |
Since Java 9 the A nicer option would be a java API for invoking lombok, so I don't have to start an additional process |
I just experimented with the native |
delombok specifically now supports |
I'm developing a gradle plugin which contains a task for running delombok.
I currenty invoke delombok using a command like this:
(one argument per line for better readability)
On big project this command can exceed 32767 characters which causes errors on windows: https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553
What I've tried so far:
Classpath Manifest
A common and well known workaround for such problems when invoking java applications with a long classpath, is to create a single jar which contains the actual classpath in its
MANIFEST.MF
.Unfortunately this does'nt work for delombok's
--classpath
-optionCalling
lombok.launch.Main.main()
directlySince the gradle task from which I want to run delombok is a java process itself, i've tried to directly invoke lomboks
main()
-method. Unfortunately this isn't an option too, because lombok internally callsSystem.exit()
.Possible solutions
Support argfiles
Other java tools like
javac
,javadoc
andajc
allow you to put all your command line arguments into an file, which can be passed to the process instead of the actual arguments: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCCFGCDProvide an API
It would be great to have a java API to invoke (de)lombok directly without the need of creating an additional java process
The text was updated successfully, but these errors were encountered: