[
https://issues.apache.org/jira/browse/GROOVY-12185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098311#comment-18098311
]
ASF GitHub Bot commented on GROOVY-12185:
-----------------------------------------
codecov-commenter commented on PR #2730:
URL: https://github.com/apache/groovy/pull/2730#issuecomment-5051342530
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2730?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 `67.15328%` with `45 lines` in your changes missing
coverage. Please review.
:warning: Please [upload](https://docs.codecov.com/docs/codecov-uploader)
report for BASE (`master@cd405cf`). [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/2730?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...us/groovy/runtime/callsite/MetaClassCallSites.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=subprojects%2Fgroovy-callsite%2Fsrc%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fcallsite%2FMetaClassCallSites.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNhbGxzaXRlL3NyYy9tYWluL2phdmEvb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL2NhbGxzaXRlL01ldGFDbGFzc0NhbGxTaXRlcy5qYXZh)
| 44.6154% | [22 Missing and 14 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...groovy/runtime/callsite/CachedMethodCallSites.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=subprojects%2Fgroovy-callsite%2Fsrc%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fcallsite%2FCachedMethodCallSites.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNhbGxzaXRlL3NyYy9tYWluL2phdmEvb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL2NhbGxzaXRlL0NhY2hlZE1ldGhvZENhbGxTaXRlcy5qYXZh)
| 83.7838% | [5 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/2730?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=)
| 50.0000% | [2 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...codehaus/groovy/classgen/asm/WriterController.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FWriterController.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9Xcml0ZXJDb250cm9sbGVyLmphdmE=)
| 88.8889% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2730?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/2730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2730 +/- ##
===========================================
Coverage ? 69.7248%
Complexity ? 34614
===========================================
Files ? 1542
Lines ? 129231
Branches ? 23561
===========================================
Hits ? 90106
Misses ? 31049
Partials ? 8076
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2730?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/ExpandoMetaClass.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FExpandoMetaClass.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9FeHBhbmRvTWV0YUNsYXNzLmphdmE=)
| `79.0787% <100.0000%> (ø)` | |
|
[...g/codehaus/groovy/classgen/asm/CallSiteWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FCallSiteWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9DYWxsU2l0ZVdyaXRlci5qYXZh)
| `86.6667% <100.0000%> (ø)` | |
|
[...codehaus/groovy/control/CompilerConfiguration.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FCompilerConfiguration.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvQ29tcGlsZXJDb25maWd1cmF0aW9uLmphdmE=)
| `72.6351% <ø> (ø)` | |
|
[...va/org/codehaus/groovy/reflection/CachedClass.java](https://app.codecov.io/gh/apache/groovy/pull/2730?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.0084% <ø> (ø)` | |
|
[...a/org/codehaus/groovy/reflection/CachedMethod.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FCachedMethod.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2FjaGVkTWV0aG9kLmphdmE=)
| `80.3738% <ø> (ø)` | |
|
[...roovy/reflection/ClassLoaderForClassArtifacts.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FClassLoaderForClassArtifacts.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2xhc3NMb2FkZXJGb3JDbGFzc0FydGlmYWN0cy5qYXZh)
| `75.0000% <100.0000%> (ø)` | |
|
[...dehaus/groovy/runtime/dgmimpl/NumberNumberDiv.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fdgmimpl%2FNumberNumberDiv.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvZGdtaW1wbC9OdW1iZXJOdW1iZXJEaXYuamF2YQ==)
| `100.0000% <ø> (ø)` | |
|
[...groovy/runtime/dgmimpl/NumberNumberMetaMethod.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fdgmimpl%2FNumberNumberMetaMethod.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvZGdtaW1wbC9OdW1iZXJOdW1iZXJNZXRhTWV0aG9kLmphdmE=)
| `87.5000% <ø> (ø)` | |
|
[...haus/groovy/runtime/dgmimpl/NumberNumberMinus.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fdgmimpl%2FNumberNumberMinus.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvZGdtaW1wbC9OdW1iZXJOdW1iZXJNaW51cy5qYXZh)
| `100.0000% <ø> (ø)` | |
|
[...s/groovy/runtime/dgmimpl/NumberNumberMultiply.java](https://app.codecov.io/gh/apache/groovy/pull/2730?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fdgmimpl%2FNumberNumberMultiply.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvZGdtaW1wbC9OdW1iZXJOdW1iZXJNdWx0aXBseS5qYXZh)
| `100.0000% <ø> (ø)` | |
| ... and [57
more](https://app.codecov.io/gh/apache/groovy/pull/2730?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>
> Move classic call-site caching into optional groovy-callsite module
> -------------------------------------------------------------------
>
> Key: GROOVY-12185
> URL: https://issues.apache.org/jira/browse/GROOVY-12185
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
>
> h2. Background
> Since Groovy 4, invokedynamic is the default call-dispatch path. The classic
> (pre-indy) call-site cache under {{org.codehaus.groovy.runtime.callsite}}
> still lived in groovy-core, so every runtime paid for types that default
> compilation no longer needs.
> The *primary purpose* of extracting this code is *runtime binary
> compatibility* for classes compiled by *Groovy 4 and Groovy 5* (and earlier
> releases that always used classic call sites). Those classes embed
> {{$getCallSiteArray}} / {{CallSiteArray}} / {{CallSite}} linkage. On Groovy 6
> they must still *load and execute* when {{org.apache.groovy:groovy-callsite}}
> is on the classpath.
> Secondary use: compiling with {{indy}} disabled
> ({{{}groovy.target.indy=false{}}} or optimization option {{{}indy: false{}}}).
> This implements the direction from the PR #1934 / GROOVY-11158: isolate
> classic call-site caching into an optional, deprecated module.
> h2. Goal
> * *Compatibility first:* preserve the public linkage surface of {{CallSite}}
> and {{CallSiteArray}} so Groovy 4/5 classic bytecode runs on Groovy 6 +
> {{{}groovy-callsite{}}}.
> * Move classic call-site runtime into optional module
> {{org.apache.groovy:groovy-callsite}} (not part of {{{}groovy-all{}}}).
> * Keep groovy-core free of a dependency on that module; default path stays
> invokedynamic-only.
> * Expose enough public MetaClass selection API so the optional module can
> build sites without package-private coupling into core.
> * When {{indy}} is off and the classic runtime is missing, *fail at compile
> time* with a clear error instead of emitting unloadable bytecode.
> h2. Design
> h3. Module boundary
> * New subproject: {{subprojects/groovy-callsite}}
> * Depends on groovy-core ({{{}api{}}}); core never depends on
> {{groovy-callsite}}
> * {{optionalModule()}} — not shipped in {{groovy-all}}
> * Entire package {{org.codehaus.groovy.runtime.callsite}} is {{@Deprecated}}
> (removal planned in a later major)
> h3. What moves where
> ||Former location (core)||New location ({{{}groovy-callsite{}}})||
> |{{MetaClassImpl}} / {{ExpandoMetaClass}} / {{ClosureMetaClass}}
> {{create…CallSite}} factories|{{MetaClassCallSites}}|
> |{{CachedMethod}} {{create…MetaMethodSite}} (+ SoftReference compile
> cache)|{{CachedMethodCallSites}} (side map of per-method state)|
> |{{CallSiteArray}} hooks into those MetaClass factories|{{CallSiteArray}} →
> {{MetaClassCallSites}}|
> |{{{}CallSite{}}}, {{{}AbstractCallSite{}}}, specialized sites,
> {{{}CallSiteGenerator{}}}, …|same package names under the module|
> h3. Core API kept for optional consumers (since 6.0.0)
> * {{MetaClassImpl#getMethodWithCaching(Class, String, Class[])}}
> * {{MetaClassImpl#chooseConstructor(Class[])}}
> * {{MetaClassImpl#chooseNamedArgCompatibleConstructor(Class[], Object[])}}
> * {{ExpandoMetaClass#hasCustomInvokeMethod()}}
> h3. Core clean-up (major-version break)
> Removed from groovy-core:
> * {{create…CallSite}} methods on {{MetaClassImpl}} / {{ExpandoMetaClass}} /
> {{ClosureMetaClass}}
> * {{CachedMethod}} {{create…MetaMethodSite}} and related SoftReference fields
> * {{CachedClass#getCallSiteLoader()}}
> * {{CallSiteAwareMetaMethod}} and DGM/array call-site specializations
> Retained in core:
> * DGM {{invoke()}} paths (numbers, arrays) for MOP / indy
> * Helpers under {{org.codehaus.groovy.runtime}} (e.g.
> {{{}BooleanClosureWrapper{}}})
> * Classic *bytecode emission* ({{{}CallSiteWriter{}}}) only when {{indy}} is
> disabled
> h3. Compiler guard
> When {{indy}} is off, {{WriterController}} requires {{CallSiteArray}} on the
> compilation class loader before emitting classic call-site bytecode. Missing
> module → clear error pointing at {{groovy-callsite}} / GROOVY-11158.
> h2. Migration
> h4. Default users (indy on — default since Groovy 4)
> No action. Core jar no longer ships classic call-site classes.
> h4. Run classes compiled by Groovy 4/5 classic mode (or older)
> Add the optional module to the *runtime* classpath:
> {code:xml}
> <dependency>
> <groupId>org.apache.groovy</groupId>
> <artifactId>groovy-callsite</artifactId>
> <version>${groovy.version}</version>
> </dependency>
> {code}
> {code:groovy}
> // Gradle
> runtimeOnly "org.apache.groovy:groovy-callsite:${groovyVersion}"
> {code}
> Use the published (jarjar) artifact together with groovy-core so shaded ASM
> ({{{}groovyjarjarasm{}}}) resolves for {{{}CallSiteGenerator{}}}.
> h4. Compile with indy disabled
> Same module on the *compile* classpath. Without it, compilation fails fast
> rather than producing unloadable classes.
> h4. Code that called removed core factory APIs
> * Prefer invokedynamic (default), or
> * Depend on {{groovy-callsite}} and use {{MetaClassCallSites}} /
> {{CachedMethodCallSites}} instead of removed {{MetaClassImpl}} /
> {{CachedMethod}} factories.
> h2. Compatibility contract
> Stable for precompiled classic bytecode:
> * Package: {{org.codehaus.groovy.runtime.callsite}}
> * {{{}CallSiteArray(Class, String[]){}}}, public fields {{array}} /
> {{{}owner{}}}, {{NOPARAM}}
> * Full {{CallSite}} method set ({{{}call{}}}, {{{}callCurrent{}}},
> {{{}callStatic{}}}, {{{}callConstructor{}}}, {{{}callGetProperty{}}},
> {{{}callSafe{}}}, …)
> Binary break in core is intentional for a major version. japicmp against 5.x
> is disabled for the new module ({{{}withoutBinaryCompatibilityChecks(){}}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)