Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.4.7, 3.0.7
-
None
-
None
Description
Hi all,
It appears Groovyc doesn't handle javac compiler options that have space-delimited args such as -Xmaxerrs number in joint compilation mode. I discovered this in an Ant project using 2.4.7 but I see the same failure using the 3.0.7 groovyc CLI:
➜ groovyc --version Groovy compiler version 3.0.7 Copyright 2003-2020 The Apache Software Foundation. http://groovy-lang.org/ ➜ groovyc -FXmaxerrs 1000 Foo.java org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 1000: 1000 (No such file or directory) 1 error
Looks like the parser handles all javac flags as single values and doesn't allow for flag=>pairs like maxerrs, maxwarns, or stdout (javac 8 docs). This results in the flag's value being treated as a source file and failing compilation.
Should these flags be handled? Let me know if you need more info, happy to help.
Kevan