[
https://issues.apache.org/jira/browse/GROOVY-11831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050986#comment-18050986
]
ASF GitHub Bot commented on GROOVY-11831:
-----------------------------------------
codecov-commenter commented on PR #2363:
URL: https://github.com/apache/groovy/pull/2363#issuecomment-3731859749
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2363?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.0032%. Comparing base
([`abae08b`](https://app.codecov.io/gh/apache/groovy/commit/abae08bc3645afa4ed3f1835238bed46899506b7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`9cd14c6`](https://app.codecov.io/gh/apache/groovy/commit/9cd14c6d7dc00bdaafe47bb941f95221a722e535?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>
[](https://app.codecov.io/gh/apache/groovy/pull/2363?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2363 +/- ##
==================================================
+ Coverage 66.9944% 67.0032% +0.0088%
- Complexity 29374 29379 +5
==================================================
Files 1382 1382
Lines 116674 116675 +1
Branches 20462 20463 +1
==================================================
+ Hits 78165 78176 +11
+ Misses 32057 32049 -8
+ Partials 6452 6450 -2
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2363?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...org/codehaus/groovy/classgen/ExtendedVerifier.java](https://app.codecov.io/gh/apache/groovy/pull/2363?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FExtendedVerifier.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0V4dGVuZGVkVmVyaWZpZXIuamF2YQ==)
| `92.4303% <100.0000%> (+0.0303%)` | :arrow_up: |
... and [5 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2363/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>
> Compiler crash with TYPE_USE annotation on void method during AST
> transformation
> --------------------------------------------------------------------------------
>
> Key: GROOVY-11831
> URL: https://issues.apache.org/jira/browse/GROOVY-11831
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 5.0.0, 5.0.3
> Reporter: Ayoub Ait Abdellah
> Priority: Blocker
> Labels: ast, compiler
>
> h2. Summary
> Groovy 5 compiler crashes during class generation when an AST transformation
> adds an annotation (without explicit {{{}@Target{}}}) to a method that
> returns {{{}void{}}}.
> h2. Error Message
> {code:java}
> BUG! exception in phase 'class generation' in source unit '...'
> Adding type annotation @MyAnnotation to non-redirect node: void
> {code}
> h2. Affected Versions
> Tested and confirmed on 5.0.0 and 5.0.3 (latest). Bug is present in all
> Groovy 5.x releases.
> h2. Minimal Reproduction
> {code:bash}
> git clone https://github.com/ayoube-ait/groovy-bug-repro.git
> cd groovy-bug-repro
> ./gradlew clean :groovy-app:compileGroovy
> {code}
> Repository: [https://github.com/ayoube-ait/groovy-bug-repro]
> h2. Root Cause
> # An annotation is defined without explicit {{@Target}} (defaults to all
> targets including {{{}TYPE_USE{}}})
> # An AST transformation creates a method with {{ClassHelper.VOID_TYPE}}
> return type
> # The transformation adds the annotation to this void method
> # During class generation, {{ExtendedVerifier.extractTypeUseAnnotations()}}
> attempts to process the annotation as {{TYPE_USE}}
> # It tries to call {{addTypeAnnotations()}} on the {{void}} return type
> # {{void}} is a "non-redirect node" causing the crash
> h2. Expected Behavior
> The compiler should skip TYPE_USE annotation processing for {{void}} return
> types instead of crashing.
> h2. Related Issues
> GROOVY-11479 - Similar crash with TYPE_USE annotations on lambda parameters
> (fixed in 5.0.0-alpha-11). That fix addressed lambda parameters but not void
> return types in AST-generated methods.
> h2. Impact
> This bug affects Micronaut Framework's Groovy support. The {{@Internal}}
> annotation in micronaut-core has no explicit {{@Target}} and is used in AST
> transformations that generate void methods, preventing Groovy function
> scripts from compiling with Micronaut 5 + Groovy 5.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)