Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-28 Thread tony mancill
On Wed, Mar 28, 2018 at 09:21:45AM +0200, Emmanuel Bourg wrote:
> Le 20/03/2018 à 05:20, tony mancill a écrit :
> 
> > I'm in the midst of preparing an update for ant.  Is there any context
> > in which we want to add "--ignore-source-errors" to the ant javadoc
> > task, or should this patch [1] be removed entirely?
> 
> It looks like the --ignore-source-errors only works with the default
> doclet. The patch should be refined such that --ignore-source-errors is
> only added if the doclet attribute is null.
> 
> Tony I prepared an upgrade of Ant to the version 1.10.3 before noticing
> you were also working on the package. May I proceed with the upload or
> do you want to upload your changes first?
> 
> Here is my changelog so far:
> 
>   * New upstream release
> - Refreshed the patches
> - Changed the source/target level to 1.8 when building Ant
> - Build the new optional ant-xz module
> - Require Java 8 or higher to run Ant
>   * Adjust the source/target level to 1.7 in anticipation
> of the 1.6 removal in Java 11
>   * Added activation.jar to the build classpath to fix
> the empty ant-javamail jar with Java 9
> 
> Emmanuel Bourg

Hi Emmanuel,

That's great!  Please go ahead with your upload.

Thank you,
tony


signature.asc
Description: PGP signature
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-28 Thread Emmanuel Bourg
Le 20/03/2018 à 05:20, tony mancill a écrit :

> I'm in the midst of preparing an update for ant.  Is there any context
> in which we want to add "--ignore-source-errors" to the ant javadoc
> task, or should this patch [1] be removed entirely?

It looks like the --ignore-source-errors only works with the default
doclet. The patch should be refined such that --ignore-source-errors is
only added if the doclet attribute is null.

Tony I prepared an upgrade of Ant to the version 1.10.3 before noticing
you were also working on the package. May I proceed with the upload or
do you want to upload your changes first?

Here is my changelog so far:

  * New upstream release
- Refreshed the patches
- Changed the source/target level to 1.8 when building Ant
- Build the new optional ant-xz module
- Require Java 8 or higher to run Ant
  * Adjust the source/target level to 1.7 in anticipation
of the 1.6 removal in Java 11
  * Added activation.jar to the build classpath to fix
the empty ant-javamail jar with Java 9

Emmanuel Bourg

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-20 Thread tony mancill
On Tue, Mar 20, 2018 at 08:51:32AM +0100, Ole Streicher wrote:

Hello Ole,

> On 20.03.2018 05:20, tony mancill wrote:
> > I'm in the midst of preparing an update for ant.  Is there any context
> > in which we want to add "--ignore-source-errors" to the ant javadoc
> > task, or should this patch [1] be removed entirely?
> >
> 
> I am not familar with ant, so I can't recommend here. The failure seems
> to not generally appear, but only on specific targets.
> 
> This is the snippet that produces the error:
> 
>       docletpathref="classpath"
>  failonerror="true"
>  public="true"
>  additionalparam="-headings"
>  destdir="${build.javadocs}"
>  sourcepath="${java.dir}"
>  packagenames="uk.ac.starlink.ttools.func"
>  classpathref="classpath"
>  encoding="cp1252"/>
> 
> while this one (from another package, starjava-pal) works fine:
> 
>       destdir="${dist.javadocs}"
>  author="true"
>  version="true"
>  locale="en"
>  windowtitle="${Name} API"
>  doctitle="${Name}"
>  defaultexcludes="yes"
>  source="${source.version}"
>  classpathref="classpath">
> 
> So, it may have something to do with the doclet.

You're definitely onto something here - thank you for the research.  I
enabled debug logging for maven and built checkstyle to get the full
invocation of javadoc command that fails, and it also uses doclet.

If I run those same command arguments sans the options related to doclet
(-doclet, -docletpath, and -destfile), but still including
--ignore-source-errors, and the javadoc invocation is successful.

So, the bug seems to belong to the JDK and not to ant, very possibly in
here [1].  I haven't tracked it down entirely yet, but I can reproduce
the same behavior with --dump-on-error, which is another "HIDDEN"
option.  I think ToolOption.get() [2] probably returns null (because the
option is hidden) and so we end up here [3], passing false for
isToolOption to handleDocletOptions() when we need for it to be true.
Perhaps the developer who added --ignore-source-errors and
--dump-on-error didn't realize that the parser can't handle hidden
options that don't start with '-XD'?

In any event, that's all based on static analysis of the code.  It'll
take me a bit of time to verify and come up with a patch for the JDK.

In the meantime, I don't know how many FTBFS problems it might cause if
we reverted the --ignore-source-errors patch from ant, so I'm not sure
whether we should change the current behavior or not.

Cheers,
tony

[1] 
https://github.com/dmlloyd/openjdk/blob/zlib-bytebuffer-v9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java#L795-L820

[2] 
https://github.com/dmlloyd/openjdk/blob/zlib-bytebuffer-v9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java#L795-L796

[3] 
https://github.com/dmlloyd/openjdk/blob/zlib-bytebuffer-v9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java#L819-L820


signature.asc
Description: PGP signature
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-20 Thread Ole Streicher
Hi Tony,


On 20.03.2018 05:20, tony mancill wrote:
> I'm in the midst of preparing an update for ant.  Is there any context
> in which we want to add "--ignore-source-errors" to the ant javadoc
> task, or should this patch [1] be removed entirely?
>

I am not familar with ant, so I can't recommend here. The failure seems
to not generally appear, but only on specific targets.

This is the snippet that produces the error:

    

while this one (from another package, starjava-pal) works fine:

    

So, it may have something to do with the doclet.

Best

Ole

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-19 Thread tony mancill
On Mon, Mar 19, 2018 at 09:16:24PM +0100, Ole Streicher wrote:
> Package: ant
> Version: 1.9.9-6
> Severity: serious
> 
> Dear maintainer,
> 
> to fix #884187, ant added the option "--ignore-source-errors" to
> javadoc. This option is however not available on Java 9, which leads to
> FTBFS on some packages: starjava-topcat, starjava-tools. I will merge
> the relevant bug reports.

Ah, this is also the cause for the current FTBFS state of checkstyle.

I'm in the midst of preparing an update for ant.  Is there any context
in which we want to add "--ignore-source-errors" to the ant javadoc
task, or should this patch [1] be removed entirely?

Thanks,
tony

[1] 
https://anonscm.debian.org/cgit/pkg-java/ant.git/commit/debian/patches/0013-auto-adjust-target.patch?id=2897cc4feed5a7d5bb431096602efecd143c0a78


signature.asc
Description: PGP signature
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#893547: ant: please do not emit --ignore-source-errors on Java 9

2018-03-19 Thread Ole Streicher
Package: ant
Version: 1.9.9-6
Severity: serious

Dear maintainer,

to fix #884187, ant added the option "--ignore-source-errors" to
javadoc. This option is however not available on Java 9, which leads to
FTBFS on some packages: starjava-topcat, starjava-tools. I will merge
the relevant bug reports.

Best regards

Ole

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.