Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDT warnings are described as if they are ignored compilation errors #10053

Open
niloc132 opened this issue Dec 10, 2024 · 0 comments
Open

JDT warnings are described as if they are ignored compilation errors #10053

niloc132 opened this issue Dec 10, 2024 · 0 comments

Comments

@niloc132
Copy link
Member

GWT version: 2.12.1
Browser (with version): any
Operating System: any


Description

Compilation warnings without enabling -strict/-failOnError are not logged, but instead a misleading message is printed:

[INFO]    Ignored 1 unit with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to DEBUG or WARN to see all errors.

As the source indicates this is not a compilation error, and adding that flag or changing log level will not print additional errors, only warnings:

// 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.getCompilationErrorsIndex(),
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" : "")
+ " with compilation errors in first pass.\n"
+ "Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.");
}

This message should be made more clear.

Links to further discussions

https://groups.google.com/g/google-web-toolkit/c/Uf8Rj_5pm2E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant