You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/04/03 06:32:00 UTC
[jira] [Commented] (GROOVY-11746) Specific method call failing static compile in Groovy5 but not Groovy4
[ https://issues.apache.org/jira/browse/GROOVY-11746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070770#comment-18070770 ]
ASF GitHub Bot commented on GROOVY-11746:
-----------------------------------------
codecov-commenter commented on PR #2286:
URL: https://github.com/apache/groovy/pull/2286#issuecomment-4182135410
## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2286?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 `84.61538%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 67.0267%. Comparing base ([`c05793f`](https://app.codecov.io/gh/apache/groovy/commit/c05793f64eaac776452c1c21223f63703ce276c4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`64240e4`](https://app.codecov.io/gh/apache/groovy/commit/64240e42bc65e5d2b94d954e0abc588f69335bb7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 440 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2286?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...inq/provider/collection/runtime/NamedRecord.groovy](https://app.codecov.io/gh/apache/groovy/pull/2286?src=pr&el=tree&filepath=subprojects%2Fgroovy-ginq%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fginq%2Fprovider%2Fcollection%2Fruntime%2FNamedRecord.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdpbnEvc3JjL21haW4vZ3Jvb3Z5L29yZy9hcGFjaGUvZ3Jvb3Z5L2dpbnEvcHJvdmlkZXIvY29sbGVjdGlvbi9ydW50aW1lL05hbWVkUmVjb3JkLmdyb292eQ==) | 60.0000% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2286?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/2286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2286 +/- ##
==================================================
+ Coverage 67.0036% 67.0267% +0.0231%
- Complexity 29285 29315 +30
==================================================
Files 1382 1382
Lines 116525 116655 +130
Branches 20398 20474 +76
==================================================
+ Hits 78076 78190 +114
- Misses 32039 32051 +12
- Partials 6410 6414 +4
```
| [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2286?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/2286?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nU3VwcG9ydC5qYXZh) | `81.7204% <100.0000%> (+0.1226%)` | :arrow_up: |
| [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2286?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.7345% <100.0000%> (+0.0034%)` | :arrow_up: |
| [...ginq/provider/collection/runtime/NamedTuple.groovy](https://app.codecov.io/gh/apache/groovy/pull/2286?src=pr&el=tree&filepath=subprojects%2Fgroovy-ginq%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fginq%2Fprovider%2Fcollection%2Fruntime%2FNamedTuple.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdpbnEvc3JjL21haW4vZ3Jvb3Z5L29yZy9hcGFjaGUvZ3Jvb3Z5L2dpbnEvcHJvdmlkZXIvY29sbGVjdGlvbi9ydW50aW1lL05hbWVkVHVwbGUuZ3Jvb3Z5) | `94.7368% <100.0000%> (ø)` | |
| [...inq/provider/collection/runtime/NamedRecord.groovy](https://app.codecov.io/gh/apache/groovy/pull/2286?src=pr&el=tree&filepath=subprojects%2Fgroovy-ginq%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fginq%2Fprovider%2Fcollection%2Fruntime%2FNamedRecord.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdpbnEvc3JjL21haW4vZ3Jvb3Z5L29yZy9hcGFjaGUvZ3Jvb3Z5L2dpbnEvcHJvdmlkZXIvY29sbGVjdGlvbi9ydW50aW1lL05hbWVkUmVjb3JkLmdyb292eQ==) | `81.8182% <60.0000%> (-8.1818%)` | :arrow_down: |
... and [3 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2286/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>
> Specific method call failing static compile in Groovy5 but not Groovy4
> ----------------------------------------------------------------------
>
> Key: GROOVY-11746
> URL: https://issues.apache.org/jira/browse/GROOVY-11746
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 5.0.0
> Reporter: Aleks Tamarkin
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.1
>
>
> The following code works on Groovy4 but not Groovy5
> {code:java}
> @Grab('org.apache.pdfbox:pdfbox:3.0.5')
> import org.apache.pdfbox.pdmodel.PDPageContentStream
> import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject
> import groovy.transform.CompileStatic
> @CompileStatic
> def doesNotCompile(PDPageContentStream stream, PDImageXObject pdImage, float x, float y, float width, float height) {
> stream.drawImage(pdImage, x, y, width, height)
> }{code}
> It fails with the error
> {code:java}
> [Static type checking] - Cannot find matching method org.apache.pdfbox.pdmodel.PDPageContentStream#drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject, float, float, float, float). Please check if the declared type is correct and if the method exists.
> at line: 9, column: 5 {code}
> I cannot reproduce this specific issue outside Apache PdfBox
--
This message was sent by Atlassian Jira
(v8.20.10#820010)