[
https://issues.apache.org/jira/browse/GROOVY-12490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131615#comment-18131615
]
ASF GitHub Bot commented on GROOVY-12490:
-----------------------------------------
codecov-commenter commented on PR #3024:
URL: https://github.com/apache/groovy/pull/3024#issuecomment-6390349758
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3024?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 `86.41975%` with `11 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 72.5321%. Comparing base
([`98c2f9f`](https://app.codecov.io/gh/apache/groovy/commit/98c2f9f106d2ee368278ca33d105e540bf23baf0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`a0819ff`](https://app.codecov.io/gh/apache/groovy/commit/a0819ff9855128940e7dbf057aef716ae3d042f3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 4 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3024?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...org/codehaus/groovy/classgen/EnumConstantInit.java](https://app.codecov.io/gh/apache/groovy/pull/3024?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FEnumConstantInit.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0VudW1Db25zdGFudEluaXQuamF2YQ==)
| 85.1351% | [1 Missing and 10 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3024?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/3024?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3024 +/- ##
==================================================
+ Coverage 72.5157% 72.5321% +0.0164%
- Complexity 40761 40813 +52
==================================================
Files 1644 1644
Lines 143027 143109 +82
Branches 26899 26929 +30
==================================================
+ Hits 103717 103800 +83
+ Misses 29759 29749 -10
- Partials 9551 9560 +9
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3024?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...java/org/codehaus/groovy/classgen/EnumVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3024?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FEnumVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0VudW1WaXNpdG9yLmphdmE=)
| `92.5466% <100.0000%> (+0.1415%)` | :arrow_up: |
|
[...org/codehaus/groovy/classgen/EnumConstantInit.java](https://app.codecov.io/gh/apache/groovy/pull/3024?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FEnumConstantInit.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0VudW1Db25zdGFudEluaXQuamF2YQ==)
| `87.7778% <85.1351%> (-12.2222%)` | :arrow_down: |
... and [21 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3024/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>
> Enum constants with literal arguments still select their constructor
> reflectively through $INIT
> -----------------------------------------------------------------------------------------------
>
> Key: GROOVY-12490
> URL: https://issues.apache.org/jira/browse/GROOVY-12490
> Project: Groovy
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> GROOVY-12240 made enum constants without arguments call the {{(String,int)}}
> constructor directly. Every constant with arguments still goes through the
> synthetic {{$INIT(Object[])}} helper, whose body is a spread {{this(*para)}}:
> {{MetaClassImpl}} selects the constructor by reflecting over the declared
> constructors. {{@CompileStatic}} does not change that, since {{$INIT}}'s own
> body stays dynamic.
> As a result, an ordinary enum fails to initialize in a GraalVM native image
> built without reflection metadata for it:
> {code:groovy}
> enum AccessModifier {
> PRIVATE('private'), PROTECTED('protected'), PUBLIC('public')
> final String keyword
> AccessModifier(String keyword) { this.keyword = keyword }
> }
> {code}
> {noformat}
> groovy.lang.GroovyRuntimeException: Could not find matching constructor for:
> AccessModifier(String, Integer, String)
> {noformat}
> Proposed fix: call the constructor directly when the compiler can prove what
> the runtime would do: every argument is a literal, exactly one non-synthetic
> constructor has the arity and none could take the arguments as varargs, and
> each literal reaches its parameter unchanged ({{Boolean}} parameters
> excluded). Everything else keeps {{$INIT}}, and the decision stays per enum,
> as in GROOVY-12240.
> PR: https://github.com/apache/groovy/pull/3024
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)