[
https://issues.apache.org/jira/browse/GROOVY-12281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106134#comment-18106134
]
ASF GitHub Bot commented on GROOVY-12281:
-----------------------------------------
codecov-commenter commented on PR #2820:
URL: https://github.com/apache/groovy/pull/2820#issuecomment-5351682601
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2820?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 `52.81690%` with `134 lines` in your changes missing
coverage. Please review.
:warning: Please [upload](https://docs.codecov.com/docs/codecov-uploader)
report for BASE (`groovy12281@a429dd7`). [Learn
more](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#section-missing-base-commit)
about missing BASE report.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2820?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/grape/Grape.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Fgrape%2FGrape.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvZ3JhcGUvR3JhcGUuamF2YQ==)
| 5.4546% | [52 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...ovy/grape/maven/GrapeChecksumPolicyProvider.groovy](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-grape-maven%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fgrape%2Fmaven%2FGrapeChecksumPolicyProvider.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyYXBlLW1hdmVuL3NyYy9tYWluL2dyb292eS9ncm9vdnkvZ3JhcGUvbWF2ZW4vR3JhcGVDaGVja3N1bVBvbGljeVByb3ZpZGVyLmdyb292eQ==)
| 0.0000% | [28 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...java/org/codehaus/groovy/reflection/ClassInfo.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FClassInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2xhc3NJbmZvLmphdmE=)
| 38.7097% | [14 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...g/apache/groovy/runtime/indy/IndyInvalidation.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Findy%2FIndyInvalidation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2luZHkvSW5keUludmFsaWRhdGlvbi5qYXZh)
| 10.0000% | [9 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...roovy/control/customizers/SecureASTCustomizer.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2Fcustomizers%2FSecureASTCustomizer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvY3VzdG9taXplcnMvU2VjdXJlQVNUQ3VzdG9taXplci5qYXZh)
| 71.4286% | [3 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[src/main/java/groovy/util/ConfigObject.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Futil%2FConfigObject.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvdXRpbC9Db25maWdPYmplY3QuamF2YQ==)
| 87.5000% | [2 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...va/groovy/concurrent/AwaitableAdapterRegistry.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Fconcurrent%2FAwaitableAdapterRegistry.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvY29uY3VycmVudC9Bd2FpdGFibGVBZGFwdGVyUmVnaXN0cnkuamF2YQ==)
| 78.9474% | [3 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...dehaus/groovy/reflection/GroovyClassValueSoft.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FGroovyClassValueSoft.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vR3Jvb3Z5Q2xhc3NWYWx1ZVNvZnQuamF2YQ==)
| 89.6552% | [1 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...c/main/groovy/groovy/text/markup/BaseTemplate.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-templates%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Ftext%2Fmarkup%2FBaseTemplate.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXRlbXBsYXRlcy9zcmMvbWFpbi9ncm9vdnkvZ3Jvb3Z5L3RleHQvbWFya3VwL0Jhc2VUZW1wbGF0ZS5qYXZh)
| 83.3333% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...aus/groovy/reflection/GroovyClassValueFactory.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FGroovyClassValueFactory.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vR3Jvb3Z5Q2xhc3NWYWx1ZUZhY3RvcnkuamF2YQ==)
| 33.3333% | [1 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
| ... and [2
more](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree-more&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/2820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## groovy12281 #2820 +/- ##
================================================
Coverage ? 70.1641%
Complexity ? 35920
================================================
Files ? 1566
Lines ? 132803
Branches ? 24447
================================================
Hits ? 93180
Misses ? 31200
Partials ? 8423
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2820?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[src/main/java/groovy/lang/Closure.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9DbG9zdXJlLmphdmE=)
| `85.0877% <100.0000%> (ø)` | |
|
[src/main/java/groovy/lang/TrampolineClosure.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FTrampolineClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9UcmFtcG9saW5lQ2xvc3VyZS5qYXZh)
| `76.4706% <100.0000%> (ø)` | |
|
[...va/org/codehaus/groovy/reflection/CachedClass.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FCachedClass.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2FjaGVkQ2xhc3MuamF2YQ==)
| `71.2500% <100.0000%> (ø)` | |
|
[...a/org/codehaus/groovy/runtime/ComposedClosure.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FComposedClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQ29tcG9zZWRDbG9zdXJlLmphdmE=)
| `77.2727% <100.0000%> (ø)` | |
|
[...s/groovy/tools/groovydoc/SimpleGroovyClassDoc.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-groovydoc%2Fsrc%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftools%2Fgroovydoc%2FSimpleGroovyClassDoc.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyb292eWRvYy9zcmMvbWFpbi9qYXZhL29yZy9jb2RlaGF1cy9ncm9vdnkvdG9vbHMvZ3Jvb3Z5ZG9jL1NpbXBsZUdyb292eUNsYXNzRG9jLmphdmE=)
| `83.4615% <100.0000%> (ø)` | |
|
[...roovy/jmx/builder/JmxServerConnectorFactory.groovy](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-jmx%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fjmx%2Fbuilder%2FJmxServerConnectorFactory.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWpteC9zcmMvbWFpbi9ncm9vdnkvZ3Jvb3Z5L2pteC9idWlsZGVyL0pteFNlcnZlckNvbm5lY3RvckZhY3RvcnkuZ3Jvb3Z5)
| `59.2593% <87.5000%> (ø)` | |
|
[...aus/groovy/reflection/GroovyClassValueFactory.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FGroovyClassValueFactory.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vR3Jvb3Z5Q2xhc3NWYWx1ZUZhY3RvcnkuamF2YQ==)
| `30.0000% <33.3333%> (ø)` | |
|
[...c/main/groovy/groovy/grape/maven/GrapeMaven.groovy](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-grape-maven%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fgrape%2Fmaven%2FGrapeMaven.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyYXBlLW1hdmVuL3NyYy9tYWluL2dyb292eS9ncm9vdnkvZ3JhcGUvbWF2ZW4vR3JhcGVNYXZlbi5ncm9vdnk=)
| `0.0000% <0.0000%> (ø)` | |
|
[...dehaus/groovy/reflection/GroovyClassValueSoft.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FGroovyClassValueSoft.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vR3Jvb3Z5Q2xhc3NWYWx1ZVNvZnQuamF2YQ==)
| `89.6552% <89.6552%> (ø)` | |
|
[...c/main/groovy/groovy/text/markup/BaseTemplate.java](https://app.codecov.io/gh/apache/groovy/pull/2820?src=pr&el=tree&filepath=subprojects%2Fgroovy-templates%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Ftext%2Fmarkup%2FBaseTemplate.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXRlbXBsYXRlcy9zcmMvbWFpbi9ncm9vdnkvZ3Jvb3Z5L3RleHQvbWFya3VwL0Jhc2VUZW1wbGF0ZS5qYXZh)
| `90.0524% <83.3333%> (ø)` | |
| ... and [7
more](https://app.codecov.io/gh/apache/groovy/pull/2820?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>
> Investigate mitigating class-loader pinning by ClassInfo.globalClassValue
> under the default ClassValue implementation
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12281
> URL: https://issues.apache.org/jira/browse/GROOVY-12281
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Priority: Major
> Attachments: GROOVY-12281-Assessment.pdf
>
>
> Follow-up from review discussion on [PR
> #2798|https://github.com/apache/groovy/pull/2798] (GROOVY-12142), preserving
> the analysis from that review. A {{ClassValue}} realizes the chain _key class
> → association → value → everything reachable from it_, and the association
> lives as long as the key class
> ([JDK-8136353|https://bugs.openjdk.org/browse/JDK-8136353], working as
> intended). The {{ClassValue}} implementation class itself prevents no
> unloading; what matters is the key's origin: a Groovy-loaded key class dies
> with Groovy's loader (fine), but a JDK/platform key class is effectively
> immortal, so any value reachable from it that was loaded by Groovy's loader
> pins that loader forever. Indirection counts — a JDK-typed value (e.g. an
> {{ArrayList}}) whose _elements_ are Groovy-loaded re-creates the pin one
> level down.
> {{ClassInfo.globalClassValue}} is static with unknown keys, including
> platform classes ({{String}} receives a {{ClassInfo}} in essentially every
> Groovy program), so the default {{ClassValue}} path pins the loader; today's
> only remedy is the global {{groovy.use.classvalue=false}} escape hatch, which
> trades away the per-class fast path for all keys.
> The general mitigation — {{SoftReference}}-wrapped values with a
> check-remove-recompute protocol — requires that recomputation be legal, and
> for {{ClassInfo}} it is not in general: a {{ClassInfo}} can carry
> non-recomputable state (modified metaclasses, category state), so a
> softly-collected value could silently discard user metaclass customizations.
> Approaches to investigate:
> * soft values while a {{ClassInfo}} is pristine, hardening the reference on
> first mutation — only classes with customized metaclasses would then pin, a
> far smaller set;
> * per-key policy: platform-loader keys get soft/map treatment, Groovy-loader
> keys stay strong (the key-origin rule applied mechanically);
> * splitting {{ClassInfo}} into recomputable and stateful parts;
> * revisiting whether the map-based implementation should become the default,
> with {{ClassValue}} as the opt-in fast path.
> Recompute cost and dispatch-path performance need measurement for any
> candidate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)