[
https://issues.apache.org/jira/browse/GROOVY-11823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18047969#comment-18047969
]
ASF GitHub Bot commented on GROOVY-11823:
-----------------------------------------
codecov-commenter commented on PR #2360:
URL: https://github.com/apache/groovy/pull/2360#issuecomment-3695292222
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2360?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 `90.47619%` with `2 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 67.0200%. Comparing base
([`2fc8212`](https://app.codecov.io/gh/apache/groovy/commit/2fc8212069c53713f8d07742629a57ad3b1cd207?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`6b526a9`](https://app.codecov.io/gh/apache/groovy/commit/6b526a9def70971e98d22a9a1cfeb7da59a3f9ea?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2360?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/2360?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| 0.0000% | [2 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2360?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/2360?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2360 +/- ##
==================================================
+ Coverage 67.0089% 67.0200% +0.0111%
- Complexity 29381 29386 +5
==================================================
Files 1382 1382
Lines 116680 116695 +15
Branches 20466 20469 +3
==================================================
+ Hits 78186 78209 +23
+ Misses 32050 32046 -4
+ Partials 6444 6440 -4
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2360?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...s/groovy/classgen/InnerClassCompletionVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2360?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FInnerClassCompletionVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0lubmVyQ2xhc3NDb21wbGV0aW9uVmlzaXRvci5qYXZh)
| `91.6667% <100.0000%> (+1.1194%)` | :arrow_up: |
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/2360?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| `78.4994% <0.0000%> (ø)` | |
... and [5 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2360/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>
> Check whether inserted metaprogramming methods in a static nested class
> override methods in a superclass and fail, warn, or make it work
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-11823
> URL: https://issues.apache.org/jira/browse/GROOVY-11823
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 4.0.29
> Reporter: Björn Kautler
> Assignee: Eric Milles
> Priority: Major
>
> Given the following code:
> {code:groovy}@Grab('org.apache.groovy.geb:geb-spock:8.0.1')
> import geb.spock.GebSpec
> class Foo {
> static class Bar extends GebSpec {
> def bar() {
> println(browser.driver)
> println(driver)
> expect: true
> }
> }
> }{code}
> and assuming that either GROOVY-11822 was fixed or Geb changed to use
> {{void}} as return type so that the code actually compiles.
> Due to the Groovy compiler overwriting the {{propertyMissing}} and
> {{methodMissing}} methods, the {{println(driver)}} line no longer works,
> outside a static nested class it works as intended.
> This behavior is silent and at first very confusing to a user.
> One option - though an imho very bad one - would be to fail the build just
> like when you try to have any of those methods in your code directly.
> But, e.g. in this case, you might still be able to use the superclass, you
> here just have to be a bit more explicit and use {{browser}} instead of the
> meta-programming magic, so it would be sad if the solution is to fail the
> build.
> Maybe other two options would either a prominent compiler warning if those
> methods override ones from a superclass so that you at least have a chance to
> get aware of the problem,
> or maybe it could even be made in a way that the compiler-inserted methods
> consider the superclass methods by calling them at an appropriate place.
> The last solution would maybe be optimal as it would then work as expected,
> unless there are details I don't know why this cannot work.
> If some class does depend on those methods not being overwritten and not just
> provide convenience like {{GebSpec}}, they can probably also declare the
> methods {{final}} to prevent static nested subclasses being created.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)