jdaugherty opened a new issue, #14679:
URL: https://github.com/apache/grails-core/issues/14679

   ### Issue description
   
   To begin releasing under the ASF, the Grails project must adhere to it's 
release policies.  The requirements of [Automated Release 
Signing](https://infra.apache.org/release-signing.html#automated-release-signing)
 that require a reproducible build.  
   
   Grails makes heavy use of:
   1. AST transforms
   2. properties files
   3. custom xml metadata files 
   
   Historically, these transforms were unordered, and up until Groovy 4 it was 
not possible to order them.   There were a set of transforms where order did 
matter.  They were grouped by function - the grails-core framework transforms & 
the grails-data-mapping transforms.  To work around the Groovy limitation, 
Grails introduced both a `GlobalGrailsClassInjectorTransformation` (for 
grails-core) and `OrderedGormTransformation` (for grails-data-mapping).  These 
AST transformations would then call other transformers in their defined order.  
   
   The problem with the Grails implementation is that as each annotated node 
was processed by the Groovy transform, it would call all of the Grails 
transformers.  This mean that the order of processing would often be:  Class 
Node (apply all transformers), Method Node (apply all transformers), etc.  
While the Groovy 4 `TransformWithPriority` interface processes all nodes under 
a single transform, and then moves to the next highest priority transformer. 
   
   So far, we have worked towards reproducible builds by moving as many 
transforms out of the custom grails & data-mapping transformers.  We've adopted 
the Groovy TransformWithPriority interface where possible.  We've switched our 
method iterations & various caches to use collections with determined sort 
orders.  We also have changed our xml files & properties files to write 
consistent dates based on the presence of a `SOURCE_DATE_EPOCH` environment 
variable that is set in CI based on the last commit date.
   
   Initial PRs of this work are: 
   1. https://github.com/apache/grails-core/pull/14670
   2. https://github.com/apache/grails-core/pull/14677
   3. https://github.com/apache/grails-core/pull/14675
   4. (tangentially related) https://github.com/apache/grails-core/pull/14674
   
   This ticket is to track the remaining work for reproducible builds.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to