Hi,
A few JIRAs have been logged where users are requesting that the Derby
community provide debug artifacts for Maven (links at the end):
o DERBY-5668: Derby does not publish source artifacts to Maven Central
o DERBY-5543: include debug info in derby builds uploaded to maven
o DERBY-3910: debug artifacts should be available in maven repositories
Regarding the source artifacts, I think we should just do it! Does
anyone see a reason why we don't want to do it?
The debug artifacts requires a little more consideration. There are two
requests at play here:
a) include line numbers
b) include the extra checks guarded by the SanityManager blocks
(what's called a sane build)
I think many of the users would want to use artifacts (a). In fact I'd
say they should probably be the default. I imagine artifacts (b) to be
used during development and when you debug a problem. What we are
currently proving is more along the lines of (c):
c) reduced disk-footprint JARs for small devices
(a) and (c) are suitable for production, (b) isn't because of the
performance degradation caused by the extra sanity checks.
A recent build of trunk shows the following increases in size when
including line numbers [1]:
o derby.jar: 2.6 MB -> 3.5 MB
o derbyclient.jar: 523 KB -> 686 KB
o derbynet.jar: 237 KB -> 302 KB
Not compiling away the extra checks only adds a little more. The growth
is most significant for derby.jar, where it ends up at 3.7 MB.
They way I see it, adding line numbers has the following potential benefits:
o make it easier for users to debug/investigate a problem where they
get a stack trace
o make it easier for the Derby community to start debugging a problem
when they have a stack trace
The only downside I see is the increase in size. This probably isn't a
big deal for most users, but I expect there will be some users that want
to keep things as small as possible. As a note to this, there has been
some speculation (?) that the increased size may slow down class
loading. Again I assume this is a concern to only a subset of our users.
Together with source artifacts, I believe adding debug information will
make it easier for people using Maven as their build tool to get
involved with Derby. I think providing these artifacts can benefit both
these users and the Derby community.
I can't see how providing these artifacts would hurt.
What do others think?
Links to the issues mentioned:
https://issues.apache.org/jira/browse/DERBY-5668
https://issues.apache.org/jira/browse/DERBY-5543
https://issues.apache.org/jira/browse/DERBY-3910
Regards,
--
Kristian
[1] We're only specifying debug=true, which I assume has the same effect
as debug=on. This again I'm assuming causes -g to be passed to the
compiler, since we're not specifying debuglevel, and -g means all debug
information (-g:lines,vars,source).