Guys,

I'd suggest that it would be worthwhile compiling releases with debugging symbols turned on. This will make the compiled classes (only slightly?) larger, but should not have an impact on perfomance. Obviously, this buys us useable stack traces when people report problems, instead of having "(Unknown Source)" reported for the line number of a stack frame, which is pretty useless. If anyone really does not want debugging on, they can always recompile it with this off.

The patch enclosed turns debugging support on by default, but allows this to be overridden as needed. I've also included a few other tuneables as well, which all default to off for now: optimization, nowarn, deprecation, verbose.

To change these tuneables at compile time, invoke ant with a "-D[propertyname]={on|off}" argument. For example, to turn debugging off, and invoke the "clean" and "compile" targets, you'd do:

  ./bin/ant -Dcompile.debug=off clean compile

I've got a much more convenient, and persistant mechanism for setting Ant tuneables on a per-developer basis. I'll post the patch after this gets comitted. I'll also write up some docs on this as well.

Mike.

--
Mike Gratton <[EMAIL PROTECTED]>, <http://web.vee.net/>
"Every motive escalate."
Index: build.xml
===================================================================
RCS file: /home/cvspublic/xml-xindice/build.xml,v
retrieving revision 1.8
diff -u -r1.8 build.xml
--- build.xml   26 Feb 2002 08:22:49 -0000      1.8
+++ build.xml   2 Mar 2002 00:11:55 -0000
@@ -38,6 +38,12 @@
   <property name="docs.dir" value="docs"/>
   <property name="docbook.style" 
value="${docs.dir}/src/docbook/html/docbook.xsl"/>
   
+  <property name="compile.debug" value="on"/>
+  <property name="compile.optimize" value="off"/>
+  <property name="compile.nowarn" value="off"/>
+  <property name="compile.deprecation" value="off"/>
+  <property name="compile.verbose" value="off"/>
+
   <!-- classpath to use within project -->
   <path id="project.class.path">
     <!-- compiled classes directory -->
@@ -108,6 +114,11 @@
     <javac srcdir="${src.dir}"
            destdir="${build.dir}"
            classpathref="project.class.path"
+           debug="${compile.debug}"
+           optimize="${compile.optimize}"
+           nowarn="${compile.nowarn}"
+           deprecation="${compile.deprecation}"
+           verbose="${compile.verbose}"
            />
   </target>
 
@@ -151,12 +162,22 @@
      <javac srcdir="${examples.dir}/api/src/"
             destdir="${examples.build.dir}"
             classpathref="project.class.path"
+            debug="${compile.debug}"
+            optimize="${compile.optimize}"
+            nowarn="${compile.nowarn}"
+            deprecation="${compile.deprecation}"
+            verbose="${compile.verbose}"
      />
 
      <echo message="Compiling Developers Guide Examples"/>
      <javac srcdir="${examples.dir}/guide/src/"
             destdir="${examples.build.dir}"
             classpathref="project.class.path"
+            debug="${compile.debug}"
+            optimize="${compile.optimize}"
+            nowarn="${compile.nowarn}"
+            deprecation="${compile.deprecation}"
+            verbose="${compile.verbose}"
      />
   </target>
   

Reply via email to