// If runtime version check fails, warn or fail? (unset?)
static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false;
- // support for producing .class files containing errors and maintaining 'state' even when the
- // project is broken (meaning all builds after the first are incremental)
- public static boolean continueWhenErrors = true;
private static final FileFilter binarySourceFilter =
new FileFilter() {
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
performCompilation(buildConfig.getFiles());
state.clearBinarySourceFiles(); // we don't want these hanging around...
- if (!continueWhenErrors && handler.hasErrors()) {
+ if (!proceedOnError() && handler.hasErrors()) {
CompilationAndWeavingContext.leavingPhase(ct);
if (AsmManager.isReporting())
AsmManager.getDefault().reportModelInfo("After a batch build");
// System.err.println("XXXX inc: " + files);
performCompilation(files);
- if ((!continueWhenErrors && handler.hasErrors()) || (progressListener!=null && progressListener.isCancelledRequested())) {
+ if ((!proceedOnError() && handler.hasErrors()) || (progressListener!=null && progressListener.isCancelledRequested())) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
public void acceptResult(CompilationResult unitResult) {
// end of compile, must now write the results to the output destination
// this is either a jar file or a file in a directory
- if (!((unitResult.hasErrors() && !continueWhenErrors) && !proceedOnError())) {
+ if (!unitResult.hasErrors() || proceedOnError()) {
Collection classFiles = unitResult.compiledTypes.values();
boolean shouldAddAspectName = (buildConfig.getOutxmlName() != null);
for (Iterator iter = classFiles.iterator(); iter.hasNext();) {
* C2.java.
*/
public void testNoProceedOnError() throws IOException {
- try {
- AjBuildManager.continueWhenErrors=false;
+// try {
+// AjBuildManager.continueWhenErrors=false;
checkCompile("src1/C1.java", NO_ERRORS);
File f =new File(getSandboxName(),"C.class");
long oldmodtime = f.lastModified();
assertTrue("The .class file should not have been modified as '-proceedOnError' was not supplied (old="+
new Date(oldmodtime).toString()+")(new="+new Date(newmodtime).toString()+")",
oldmodtime==newmodtime);
- } finally {
- AjBuildManager.continueWhenErrors=true;
- }
+// } finally {
+// AjBuildManager.continueWhenErrors=true;
+// }
}
public void testProceedOnError() throws IOException {