Summary: | Ant regression breaks javac openjfx build | ||
---|---|---|---|
Product: | Ant | Reporter: | Ilya Lipnitskiy <ilya.lipnitskiy> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED FIXED | ||
Severity: | regression | ||
Priority: | P2 | ||
Version: | 1.10.7 | ||
Target Milestone: | 1.10.8 | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: |
Error log from ant 1.10.7
Success log with ant 1.10.6 build.xml excerpt |
Description
Ilya Lipnitskiy
2019-10-22 18:51:38 UTC
Created attachment 36853 [details]
Success log with ant 1.10.6
I remember there was a change in Ant, with code involving this. Let me see if we caused some unexpected regression there. Is there a build.xml file to quickly reproduce this? Created attachment 36854 [details]
build.xml excerpt
I don't have the time to minimize the build.xml at this point. However, if it helps, the problematic invocation of javac is described by the attached excerpt. The variables should be evident in the attached log.
By examining the code in src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java, it looks like prior to commit 15fcc941e01, executeExternalCompile() was called with cmd.size(), but in current code it is called with the index of the first non J option after reshuffling the command line arguments, not cmd.size(). Seems like a problem. Moreover, the logic that looks at firstFileName in executeExternalCompile() is only triggered when the length of the command like is greater than COMMAND_LINE_LIMIT, which is 4KB on POSIX systems. Sounds like a test case is needed for long command lines to cover this logic. Also based on https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html#commandlineargfile: "Use of the '@' character to recursively interpret files is not supported." So the whole changeset from https://github.com/apache/ant/pull/98 probably needs to be reworked to make sure arguments that start with '@' don't get put into commandline arg files. Should be fixed by https://github.com/apache/ant/pull/105! The patch has been applied upstream. This fix will be available in 1.10.8 of Ant. In the meantime, the Ant nightly build containing this fix can be used for testing this change https://builds.apache.org/job/Ant_Nightly/lastSuccessfulBuild/artifact/distribution/. |