[
https://issues.apache.org/jira/browse/GROOVY-12658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137430#comment-18137430
]
ASF GitHub Bot commented on GROOVY-12658:
-----------------------------------------
codecov-commenter commented on PR #3179:
URL: https://github.com/apache/groovy/pull/3179#issuecomment-6610622099
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3179?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:x: Patch coverage is `66.66667%` with `1 line` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.1697%. Comparing base
([`0941dba`](https://app.codecov.io/gh/apache/groovy/commit/0941dbacf496a1667c27681c6fe76deee59bfb57?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`4822f28`](https://app.codecov.io/gh/apache/groovy/commit/4822f28a9b59329f41775b6f19406774e9bb9ff8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 11 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3179?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/3179?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
| 66.6667% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/3179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3179 +/- ##
==================================================
+ Coverage 74.1533% 74.1697% +0.0164%
- Complexity 43751 43767 +16
==================================================
Files 1692 1692
Lines 149516 149518 +2
Branches 28366 28367 +1
==================================================
+ Hits 110871 110897 +26
+ Misses 28448 28431 -17
+ Partials 10197 10190 -7
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3179?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/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/3179?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
| `85.9075% <66.6667%> (+0.0201%)` | :arrow_up: |
... and [12 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3179/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>
> Packed closures read and write owner properties as fields, skipping getters
> and setters
> ---------------------------------------------------------------------------------------
>
> Key: GROOVY-12658
> URL: https://issues.apache.org/jira/browse/GROOVY-12658
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 7.0.0-alpha-1, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> A closure packed by closure packing (GEP-27, via {{@PackedClosures}} or
> {{-Dgroovy.target.closure.pack=true}}) has its body moved into a method of
> the owner class. There, a property of the owner compiles to direct field
> access, so the getter and setter are no longer called. The closure class it
> replaces calls them.
> {code:groovy}
> @groovy.transform.CompileStatic // or @groovy.transform.PackedClosures
> without @CompileStatic
> @groovy.transform.PackedClosures
> class Box {
> int gets, sets
> BigDecimal e = 1
> BigDecimal getE() { gets++; e }
> void setE(BigDecimal v) { sets++; e = v }
> def m() { def r = { -> e++ }(); [r, this.@e, gets, sets] }
> }
> println new Box().m()
> {code}
> *Actual:* {{[1, 2, 0, 0]}}
> *Expected:* {{[1, 2, 1, 1]}}, as without packing.
> The same happens for reads, assignments, compound assignments, prefix and
> postfix forms, and both {{e}} and {{this.e}}. It also affects a subclass
> override of a generated accessor, static properties, {{is}} getters, and
> (dynamic) an owner that overrides {{getProperty}}.
> {{AsmClassGenerator.visitPropertyExpression}} resolves {{this.name}} to the
> declared field in any method of the class; the hoisted body is such a method,
> so it bypasses the accessors.
> Verified on 6.0.0 and master.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)