ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 1011] - <javac debug="false"> does not disable debug info generation
Date Tue, 23 Oct 2001 11:27:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1011>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1011

<javac debug="false"> does not disable debug info generation





------- Additional Comments From jesse.glick@netbeans.com  2001-10-23 04:27 -------
This fix is causing problems for the NetBeans build process. We use JDK 1.3
only, and currently use Ant 1.3. If you turn on debugging for the build, all
works in 1.4 as it did in 1.3. However, by default debug=false. In Ant 1.3, this
passed no -gXXX argument to the compiler, resulting in line and source debugging
info: exactly the default we wanted. In Ant 1.4, there is no apparent way to get
back this default.

You can turn on debugging, but then you get local var info, which is copious and
causes your JARs to become bloated, increasing download size and perhaps startup
time. This extra information is useless unless you are actually running a
debugger on the code (which an end-user would not be doing).

You can turn off debugging, but this is not really a good idea: errors reported
against the product will come back with stack traces without any line number
information. This makes bugfixing based on user bug reports much more difficult;
in practice when a report is received of a NullPointerException or other generic
exception from some largish method, it must be discarded as hopeless unless a
line number is included.

We could produce a special compiler adapter with the 1.3 behavior and set this
as the default, however it would need to be in the startup classpath of the Ant
tool (otherwise adapters cannot be loaded in Ant 1.x), adding an extra
complication to the process of building from sources (which is otherwise just
"run ant"). Ditto for producing a patch to DefaultCompilerAdapter.

I'm not yet sure if this problem would prevent us from upgrading from 1.3 to 1.4
entirely, but it is significant. There is no apparent mention of the change in
the WHATSNEW file; it was discovered accidentally because the size of the
complete default build is noticeably different between 1.3 and 1.4.

Please consider for 1.4.2/1.5 having a compatibility property that would restore
the 1.3 behavior if set, until some future version where <javac> switches are
handled in a more flexible manner and defaults are not the only options.

Mime
View raw message