Change addGeneratedAnnotationDate default to false - #123
Merged
Merged
Conversation
Non-deterministic timestamps in @generated annotations break build reproducibility and cacheability, so the opt-in should be the other way around for the next major version. GeneratedInformation now reads the flag from the mapping config lazily instead of capturing it at construction time, so the value set by default initialization and by merged external configs is honored when templates render. Closes #44
The without-date case now relies on the new default instead of setting the flag explicitly, so a regression of the default value fails here.
Owner
Author
|
Checkstyle is failing only because: "the diff exceeded the maximum number of files (300)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Generated
@Generatedannotations no longer include adateattribute unlessaddGeneratedAnnotationDate = trueis set explicitly. Timestamps in generated sources make builds non-reproducible and poison the build cache, so the opt-in should be the other way around for 6.3.0.Breaking change: projects that rely on the date being present must now set
addGeneratedAnnotationDate: true.One non-obvious part:
GeneratedInformationused to capture the flag at construction time, which ran before default initialization and before external mapping configs were merged - so the effective value could differ from what the config ends up holding. It now reads the flag from the config lazily at render time.Unblocks #45 (marking Gradle codegen tasks as
@CacheableTask).Closes #44