Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to use flag
skipSourcesUnchanged
in a code base that generates mapping code via MapStruct, I realized the flag is overworking, in that changed source files too were skipped. The issue seems to reside inlastModified
check being polluted by file.maven-processor-source-files.txt
, that is rewritten in methodareSourceFilesSameAsPreviousRun
(which seems to be part of the problem, as you would not expect this method to be in charge of rewriting the file, which should instead be generated at the very end) : as a consequence, itslastModified
date is inevitably the most recent one, hence it comes after all source files' ones, which results in methodisSourcesUnchanged
always returningtrue
.I wonder whether another possible approach could be to compare
maxSourceDate
withminOutputDate
, instead thatmaxOutputDate
.