// Done with a pass of the build - tell the cache its OK to cleanup
// stale cache files.
unitCache.cleanup(logger);
// Report warnings.
Type logLevelForWarnings = suppressErrors ? TreeLogger.DEBUG : TreeLogger.WARN;
int warningCount =
CompilationProblemReporter.logWarnings(logger, logLevelForWarnings, resultUnits);
if (warningCount > 0 && !logger.isLoggable(logLevelForWarnings)) {
logger.log(TreeLogger.INFO, "Ignored " + warningCount + " unit"
+ (warningCount > 1 ? "s" : "") + " with compilation errors in first pass.\n"
+ "Compile with -strict or with -logLevel set to DEBUG or WARN to see all errors.");
}
// Index errors so that error chains can be reported.
CompilationProblemReporter.indexErrors(compilerContext.getLocalCompilationErrorsIndex(),
resultUnits);
// Report error chains and hints.
Type logLevelForErrors = suppressErrors ? TreeLogger.TRACE : TreeLogger.ERROR;
int errorCount = CompilationProblemReporter.logErrorTrace(logger, logLevelForErrors,
compilerContext, resultUnits, false);
if (errorCount > 0 && !logger.isLoggable(logLevelForErrors)
&& logger.isLoggable(TreeLogger.INFO)) {
logger.log(TreeLogger.INFO, "Ignored " + errorCount + " unit" + (errorCount > 1 ? "s" : "")