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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3083?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 73.6774%. Comparing base 
([`5b077f9`](https://app.codecov.io/gh/apache/groovy/commit/5b077f9dcf610898e3415f1f1cebbaab8eecab61?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`cc133ca`](https://app.codecov.io/gh/apache/groovy/commit/cc133ca899f92da6a36252e650ee601ce19bf6bb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3083/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/3083?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3083        +/-   ##
   ==================================================
   + Coverage     73.6711%   73.6774%   +0.0063%     
   - Complexity      42584      42590         +6     
   ==================================================
     Files            1678       1678                
     Lines          146907     146908         +1     
     Branches        27790      27790                
   ==================================================
   + Hits           108228     108238        +10     
   + Misses          28528      28522         -6     
   + Partials        10151      10148         -3     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3083?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...va/org/codehaus/groovy/classgen/asm/MopWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3083?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FMopWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9Nb3BXcml0ZXIuamF2YQ==)
 | `85.8974% <100.0000%> (+0.1831%)` | :arrow_up: |
   
   ... and [13 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3083/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>




> The order of super$ MOP methods depends on whether the superclass's 
> interfaces were built by reflection or read from bytecode
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12554
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12554
>             Project: Groovy
>          Issue Type: Bug
>          Components: class generator
>    Affects Versions: 4.0.33, 5.1.3
>            Reporter: James Daugherty
>            Priority: Major
>
> For every superclass method that a class calls through {{super}} in dynamic 
> Groovy, the class gets a synthetic {{super$N$name}} method. Groovy writes 
> these in the order in which it finds the methods, and that order follows the 
> class nodes of the superclass's interfaces. When a transformation adds an 
> interface with a class node built by reflection, as GORM does for the traits 
> of domain classes, the order comes from {{Class.getDeclaredMethods()}}, which 
> is unspecified. When the superclass is read from bytecode, it comes from the 
> class file. So the same source compiles to a different class file depending 
> on what else is compiled, and in principle on the JVM.
> {noformat}
> super$ methods of Sub, compiled together with Base:           alpha beta 
> delta gamma kappa mid omega zeta
> super$ methods of Sub, compiled against Base already compiled: zeta alpha mid 
> omega beta kappa delta gamma
> {noformat}
> Reproduced with 4.0.33, 5.1.3 and master. A reproducer with a small 
> transformation that adds an interface with {{ClassHelper.make(Class)}}, a 
> groovyc script and an incremental Gradle build: 
> https://github.com/jdaugherty/groovy-mop-method-order
> *Cause*
> {{MopWriter.visitMopMethodList}} generates the MOP methods in the order of 
> {{getDeclaredMethodsMap()}} of the superclass, which adds the methods of the 
> superclass's interfaces in the order their class nodes list them: by 
> reflection for a node made with {{ClassHelper.make(Class)}}, from the class 
> file for a node read from bytecode.
> *Proposed fix*
> Sort the MOP methods by name and type descriptor before generating them. The 
> order of methods in a class file does not matter at run time, and 
> {{MetaClassImpl}} sorts the MOP methods it finds itself.
> Found while making incremental builds of a Grails application produce the 
> same classes as a full build; see also GROOVY-12550 and GROOVY-12544.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to