[MCOMPILER-205] fixes incremental compilation#3
[MCOMPILER-205] fixes incremental compilation#3monperrus wants to merge 3 commits intoapache:masterfrom
Conversation
When useIncrementalCompilation=false, always recompile all source files.
| if ( useIncrementalCompilation ) | ||
| if ( !useIncrementalCompilation ) | ||
| { | ||
| getLog().debug( "useIncrementalCompilation enabled" ); |
|
What needs to be done to move this forward? |
|
Hi mvn verify -Prun-its Btw actually in 3.8.0 you just have to turn incremental compilation off in order to build only stale sources. With you fix it seems that you are dropping the part that is detecting stale files and inverting the meaning of the flag. |
|
the fix does not drop anything, it indeed inverts the flag so that the behavior or the flag does what the meaning suggests, https://issues.apache.org/jira/browse/MCOMPILER-205 |
| incrementalBuildHelperRequest = new IncrementalBuildHelperRequest().inputFiles( sources ); | ||
|
|
||
| // CHECKSTYLE_OFF: LineLength | ||
| if ( ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget ) |
There was a problem hiding this comment.
It seems to me that here we are losing this test.
There was a problem hiding this comment.
this simplification is on purpose for regular behavior and maintainability: we are not using incremental compilation, so we consider all sources.
the else branch is responsible for detecting stale changes.
Did you read the comments of https://issues.apache.org/jira/browse/MCOMPILER-205 ? So in general it works as designed. |
|
@rfscholte Thanks for the update. There's quite a bit of conflicting information on the ticket so for an outsider it's difficult to discern what's correct and what isn't. That said, I scanned through the ticket again and couldn't find a reference to a missing feature in the compiler. Can you elaborate on that or post a link to the relevant ticket for that? |
|
@yeroc nobody created an issue for it yet, but you might conclude it based on some comments. Both this PR and MCOMPILER-205 have a huge amount of comments, which makes it kind of hard to see the whole picture. https://stackoverflow.com/questions/16963012/maven-compiler-recompile-all-files-instead-modified/49700942#49700942 is the best summary (and the accepted answer in incorrect) |
|
Who will create the new issue? (I don't have a good enough understanding of this topic so I can't do it) Please link the new issue to this one so we can follow. Thanks! |
Fixes https://issues.apache.org/jira/browse/MCOMPILER-205.