Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MCOMPILER-549] Improve log message in case of recompilation #201

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 src/it/MCOMPILER-500-package-info-incr/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def logFile = new File( basedir, 'build.log' )
assert logFile.exists()
content = logFile.text

assert 1 == content.count( 'Changes detected - recompiling the module!' )
assert 1 == content.count( 'Nothing to compile - all classes are up to date' )
assert 1 == content.count( "Recompiling the module because of ")
assert 1 == content.count( 'Nothing to compile - all classes are up to date.' )


Original file line number Diff line number Diff line change
Expand Up @@ -878,20 +878,22 @@ public void execute() throws MojoExecutionException, CompilationFailureException

DirectoryScanResult dsr = computeInputFileTreeChanges(incrementalBuildHelper, sources);

boolean idk = compiler.getCompilerOutputStyle()
boolean immutableOutputFile = compiler.getCompilerOutputStyle()
.equals(CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES)
&& !canUpdateTarget;
boolean dependencyChanged = isDependencyChanged();
boolean sourceChanged = isSourceChanged(compilerConfiguration, compiler);
boolean inputFileTreeChanged = hasInputFileTreeChanged(dsr);
// CHECKSTYLE_OFF: LineLength
if (idk || dependencyChanged || sourceChanged || inputFileTreeChanged)
if (immutableOutputFile || dependencyChanged || sourceChanged || inputFileTreeChanged)
// CHECKSTYLE_ON: LineLength
{
String cause = idk
? "idk"
: (dependencyChanged ? "dependency" : (sourceChanged ? "source" : "input tree"));
getLog().info("Changes detected - recompiling the module! :" + cause);
String cause = immutableOutputFile
? "immutable single output file"
: (dependencyChanged
? "changed dependency"
: (sourceChanged ? "changed source code" : "added or removed source files"));
getLog().info("Recompiling the module because of " + cause + ".");
if (showCompilationChanges) {
for (String fileAdded : dsr.getFilesAdded()) {
getLog().info("\t+ " + fileAdded);
Expand All @@ -903,7 +905,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException

compilerConfiguration.setSourceFiles(sources);
} else {
getLog().info("Nothing to compile - all classes are up to date");
getLog().info("Nothing to compile - all classes are up to date.");

return;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.