[ 
https://issues.apache.org/jira/browse/GROOVY-12146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18095612#comment-18095612
 ] 

ASF GitHub Bot commented on GROOVY-12146:
-----------------------------------------

codecov-commenter commented on PR #2690:
URL: https://github.com/apache/groovy/pull/2690#issuecomment-4948027810

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2690?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 67.2476%. Comparing base 
([`ff64047`](https://app.codecov.io/gh/apache/groovy/commit/ff64047145b3f9098ec344aa3efd4a228b9d861e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`c211095`](https://app.codecov.io/gh/apache/groovy/commit/c211095345e5cd94802956cf661122f74ccc3e86?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2690/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2690?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                  Coverage Diff                   @@
   ##             GROOVY_5_0_X      #2690        +/-   ##
   ======================================================
   - Coverage         67.2505%   67.2476%   -0.0029%     
   - Complexity          29569      29570         +1     
   ======================================================
     Files                1382       1382                
     Lines              116991     116999         +8     
     Branches            20551      20551                
   ======================================================
   + Hits                78677      78679         +2     
   - Misses              31787      31791         +4     
   - Partials             6527       6529         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2690?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...rg/codehaus/groovy/reflection/ReflectionUtils.java](https://app.codecov.io/gh/apache/groovy/pull/2690?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FReflectionUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vUmVmbGVjdGlvblV0aWxzLmphdmE=)
 | `46.4646% <100.0000%> (+5.3535%)` | :arrow_up: |
   | 
[...in/java/org/codehaus/groovy/vmplugin/v8/Java8.java](https://app.codecov.io/gh/apache/groovy/pull/2690?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FJava8.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0phdmE4LmphdmE=)
 | `78.4483% <100.0000%> (-0.0618%)` | :arrow_down: |
   
   ... and [4 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2690/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> Regression of GROOVY-11715  - Unordered Annotation members
> ----------------------------------------------------------
>
>                 Key: GROOVY-12146
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12146
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.7
>            Reporter: James Daugherty
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 5.0.8, 6.0.0-beta-1
>
>
> When a class is compiled against a precompiled trait (or any code path where 
> an annotation is materialized from a loaded Class rather than from source), 
> the annotation's members are written to the class file in 
> Class.getDeclaredMethods() order. That order is unspecified: HotSpot sorts 
> methods by internal Symbol address, so it varies across JDK builds — even 
> patch releases of the same vendor — and across JVM runs with different 
> class-loading histories. Identical sources therefore produce different 
> class-file bytes in different environments.
> The member map is populated in 
> org.codehaus.groovy.vmplugin.v8.Java8#configureAnnotation(AnnotationNode, 
> Annotation), which iterates type.getDeclaredMethods() (also materializing 
> default values), and AsmClassGenerator#visitAnnotationAttributes then emits 
> the members in map order.
> Observed getDeclaredMethods() orders for groovy.lang.DelegatesTo:
> - liberica 17.0.15: type,value,target,strategy,genericTypeIndex
> - liberica 17.0.16: genericTypeIndex,type,value,target,strategy
> - zulu 11.0.19: strategy,type,value,target,genericTypeIndex
> Impact: Apache Grails 8 (Groovy 5) release artifacts fail reproducible-build 
> verification because of this; every jar containing a class that implements a 
> precompiled trait carrying @DelegatesTo (controllers via the Controller 
> trait, GORM entities via GormEntity#withCriteria, @Delegated command classes, 
> ...) differs byte-for-byte between the release build and an independent 
> rebuild. Grails 7 (Groovy 4) is not affected because 4.0.x canonicalizes 
> attribute order at emission (GROOVY-11715, TreeMap in 
> visitAnnotationAttributes). That fix was reverted on master in 6e3737dd24 
> ("revert GROOVY-11715 and try a different approach") and no replacement 
> landed, so 5.x emits raw reflection order.
> *Reproducer: 
> [https://github.com/jdaugherty/groovy-annotation-order-reproducer]*
> compiles a trait whose method parameter carries @DelegatesTo(value = String, 
> strategy = Closure.DELEGATE_FIRST, genericTypeIndex = -1), then compiles an 
> implementing class against the precompiled trait. The trait's own class file 
> preserves source member order (deterministic), but the woven class contains 
> all five members (defaults materialized) in the JVM's reflection order. 
> Running it on two different JDK builds yields different bytes for identical 
> sources.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to