You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Veaceslav Chicu <cs...@infologic.fr> on 2004/09/08 17:27:57 UTC
compilation errors
hi,
I get sources from repository, I have errors, missing classes, for example:
package org.apache.derby.iapi.services.sanity.SanityManager;
line 58, 59
what is the story with SanityState.tmpl ??
why it's not a .java ??
is there somebody who has same errors?
best regards,
Slavic
P.S. I see a lot of warnings
Re: compilation errors
Posted by Andrew McIntyre <fu...@nonintuitive.com>.
Hi,
Please post the output from Ant if you are having problems. It is
easier to determine the source of the problems from the output of Ant.
As a general rule, if you've followed the setup instructions in
BUILDING.txt at the root-level of the source tree (available at
http://incubator.apache.org/derby/BUILDING.html on the web), then the
best way to get around problems caused by a previous bad compile is to
run the clobber target ('ant clobber') at the top level to remove all
generated files and rerun the build from scratch.
As for SanityState, 'sanity' was a concept introduced early in
Cloudscape as a way to have assert functionality before the language
supported it (which didn't happen until the recent 1.4.2 release). In
short, the way 'sanity' works is assertions are contained in an if
block with the value of one of the static final booleans in
SanityState.java, like so:
if (SanityState.DEBUG)
{
// assertion goes here
}
Because the value of SanityState.DEBUG is static and final, good
compilers will optimize away the block of code containing the assert.
SanityState.java is generated as the first step of the build by
replacing tokens in the template file, SanityState.tmpl, with the
proper values for the build. By default, the sanity state is 'sane,' or
a debug build, and the value of SanityState.DEBUG is true. In an
'insane,' or optimized build, the value of SanityState.DEBUG is false,
and compilation options for removing debugging information are also
turned on. See the 'init' target in the top-level build.xml to see the
mechanics of this.
To run an insane build, run the clobber target to remove all generated
files (including the generated SanityState.java and the sanity
state.properties file). Then run the insane target at the top level to
set up the sanity state.properties file. Then, running a full build
will generate an 'optimized' insane build.
best regards,
andrew
On Sep 8, 2004, at 8:27 AM, Veaceslav Chicu wrote:
> hi,
>
> I get sources from repository, I have errors, missing classes, for
> example:
> package org.apache.derby.iapi.services.sanity.SanityManager;
> line 58, 59
> what is the story with SanityState.tmpl ??
> why it's not a .java ??
>
>
> is there somebody who has same errors?
>
> best regards,
> Slavic
> P.S. I see a lot of warnings
>