Bug#906785: version warping patch is overly aggressive

Bdale Garbee bdale at gag.com
Tue Aug 21 02:02:52 BST 2018


Package: ant
Version: 1.10.5-1
Severity: important

The Debian ant package is built with a patch "0013-auto-adjust-target.patch"
that forces the Java target version number to 7.  The utterly breaks the
ability to use Debian ant for building Java applications that get wrapped up
in installer packages targeting other operating systems, including non-Debian 
Linux, Windows, and Mac OS X.  Specifically, many Mac OS X users apparently
are still being given Java 1.6 as the most recent version certified on their
operating system, and while in theory it's possible for them to move to 
Java 1.8 through a download from Oracle, this apparently takes most Apple
customers way outside their comfort zone.

If the javac delivered by our default-jdk actually had such a version 
restriction, we'd tell our customers to just cope with it.  But it turns out
that even openjdk-11-jdk's javac will take -source and -target assertions
of 1.6 and correctly emit compiled classes that assert major version 50, 
which is compatible with Java 1.6.  Any package built with ant, however, is
forced to version 7 which results in compiled classes that assert major
version 51, which will not run on Java 1.6!

Please fix ant to not impose a version warp that's more restrictive than
actually required by default-jdk, so that we can continue to use Debian as
a build platform supporting customers who are "stuck" on Java 1.6.

Frankly, I'm not sure having this patch in the Debian package at all is a 
good idea.  Isn't it better to let javac itself emit an error message if/when
a version actually becomes supported, and let the developer learn about
versions and how to update their ancient assertions when needed rather than
hide this problem?

Regards,

Bdale



More information about the pkg-java-maintainers mailing list