Open brown opened 1 year ago
This pull request should fix issue https://github.com/bazelbuild/rules_groovy/issues/64
This feels like an overly complicated workaround.
I have no experience with groovy so this might be totally off, but from https://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html it appears to support @argfile
arguments? If that's the case, it might be better to write the classpath to a file and pass it in that way.
Looking at groovy.bzl
, there is already code that is doing the same thing in the last step where the output classes are passed to the zip tool.
The groovyc command requires that the Java classpath be specified as one argument, which does not work for long classpaths, since Linux limits the length of any one command argument to 131072 characters. Work around the problem by creating symlinks with short names to classpath jars and using the symlinks instead of the original jar file name paths.