Re: Upcoming Java 17 release will have an impact on our javadoc task
Hello Stefan, On 27/06/21 4:10 pm, Stefan Bodewig wrote: On 2021-06-17, Jaikiran Pai wrote: So right now I don't have specific proposals for fixing this but just a note that we will have to look into this one for the upcoming JDK 17 release. I guess we can simply concatenate stderr and stdout and look for the "warnings" message there. This should work for every version of Java supported by Ant. I went ahead and implemented this suggestion. It took me a while to implement this because I noticed that javadoc tool itself exposes a way to fail on warning https://bugs.openjdk.java.net/browse/JDK-8200363 (-Xwerror in JDK8 and -Werror on recent versions). I wanted to try and use it in our javadoc task, but it turned out not to be straightforward since we need to add javadoc tool version checks to get it to work in all versions of the tool. Plus, even after adding that option, if our javadoc task's "failonerror" is set to false (which is the default), the task will still not fail when it sees a warning. Considering all this, I decided looking for the warning in both stderr and stdout is the most consistent way to get this working. -Jaikiran - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Re: Upcoming Java 17 release will have an impact on our javadoc task
On 2021-06-17, Jaikiran Pai wrote: > The recently released EA version of JDK 17 has introduced a change in > the javadoc tool. Previously (JDK 8 all the way through JDK 16) used > to log certain messages from the javadoc tool to STDOUT. Our javadoc > task's implementation expects such messages of STDOUT. Starting this > JDK EA release the behaviour has changed in the javadoc tool and it > now logs those messages to STDERR. This change was discussed in the > OpenJDK mailing list[1] and it has been noted that this is an > intentional change in the tool. Who could expect that build tools try to parse output when we've never provided a Java API to run a typical build task? Sorry. > So right now I don't have specific proposals for fixing this but just > a note that we will have to look into this one for the upcoming JDK 17 > release. I guess we can simply concatenate stderr and stdout and look for the "warnings" message there. This should work for every version of Java supported by Ant. Stefan - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Upcoming Java 17 release will have an impact on our javadoc task
The recently released EA version of JDK 17 has introduced a change in the javadoc tool. Previously (JDK 8 all the way through JDK 16) used to log certain messages from the javadoc tool to STDOUT. Our javadoc task's implementation expects such messages of STDOUT. Starting this JDK EA release the behaviour has changed in the javadoc tool and it now logs those messages to STDERR. This change was discussed in the OpenJDK mailing list[1] and it has been noted that this is an intentional change in the tool. Specifically for the javadoc task in Ant project, it has a "failOnWarning" attribute which fails the task on any "warning" message (actually just the presence of that word) being seen on STDOUT. With this change in JDK, this implementation in our task will no longer work starting JDK 17 (but will still continue to work in previous JDK releases). I haven't yet had a chance to fully review our javadoc task code to see what would be a good way to fix this in a way that would try and avoid Java runtime version checks in the code. So right now I don't have specific proposals for fixing this but just a note that we will have to look into this one for the upcoming JDK 17 release. [1] https://mail.openjdk.java.net/pipermail/javadoc-dev/2021-June/003075.html -Jaikiran - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org