[ 
https://issues.apache.org/jira/browse/GROOVY-12218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100411#comment-18100411
 ] 

ASF GitHub Bot commented on GROOVY-12218:
-----------------------------------------

codecov-commenter commented on PR #2752:
URL: https://github.com/apache/groovy/pull/2752#issuecomment-5130645447

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2752?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 `50.70423%` with `35 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 69.9253%. Comparing base 
([`4c9b312`](https://app.codecov.io/gh/apache/groovy/commit/4c9b31231fcca14f217a707cf43e866328d40b89?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`cdec5bf`](https://app.codecov.io/gh/apache/groovy/commit/cdec5bfc86e25b4a449770f5ff2fe6bad1a3e789?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/2752?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2752?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FArrayGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQXJyYXlHcm9vdnlNZXRob2RzLmphdmE=)
 | 47.7612% | [24 Missing and 11 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2752?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2752/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2752        +/-   ##
   ==================================================
   + Coverage     69.9204%   69.9253%   +0.0048%     
   - Complexity      35314      35350        +36     
   ==================================================
     Files            1555       1555                
     Lines          131192     131263        +71     
     Branches        24070      24097        +27     
   ==================================================
   + Hits            91730      91786        +56     
   - Misses          31162      31171         +9     
   - Partials         8300       8306         +6     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2752?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2752?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==)
 | `75.2863% <100.0000%> (+0.2663%)` | :arrow_up: |
   | 
[...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2752?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FArrayGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQXJyYXlHcm9vdnlNZXRob2RzLmphdmE=)
 | `87.4168% <47.7612%> (-1.4720%)` | :arrow_down: |
   
   ... and [5 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2752/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>




> Complete fat-free (functional-interface) twins for the array (`T[]`) forms of 
> the GROOVY-12054 DGM methods
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12218
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12218
>             Project: Groovy
>          Issue Type: Sub-task
>            Reporter: Paul King
>            Priority: Major
>
> h3. Summary
> GROOVY-12054 added {{java.util.function}} twins beside the Closure overloads 
> of the core higher-order DGM methods, but only in {{DefaultGroovyMethods}} — 
> the array-receiver forms in {{ArrayGroovyMethods}} were left with only their 
> {{Closure}} overloads. This completes the object-array ({{T[]}}) twins so 
> array receivers reach parity with the collection receivers. Each twin simply 
> delegates to the corresponding DGM {{Iterable}}/{{Iterator}} twin (already 
> shipped in GROOVY-12054) via {{ArrayIterable}}/{{ArrayIterator}}, following 
> the array pattern established in GROOVY-12215 / GROOVY-12216.
> Already covered (not in scope): {{each}} on primitive arrays already has 
> {{Consumer}}/{{IntConsumer}}/etc. twins; {{collectEntries}} already has the 
> two-{{Function}} {{(keyTransform, valueTransform)}} forms; and the array 
> forms of 
> {{groupBy}}/{{collectMany}}/{{countBy}}/{{split}}/{{takeWhile}}/{{dropWhile}} 
> (GROOVY-12215) and {{inject}}/{{injectAll}} (GROOVY-12216) are done.
> h3. Object-array twins to add
> ||Method (array form)||Count||Functional type||
> |{{each(T[])}}|1|{{Consumer<? super T>}}|
> |{{eachWithIndex(T[])}}|1|{{ObjIntConsumer<? super T>}}|
> |{{collect(T[])}}, {{collect(T[], Collection collector)}}|2|{{Function<? 
> super E, ? extends T>}}|
> |{{collectEntries(T[])}}, {{collectEntries(T[], Map 
> collector)}}|2|{{Function<? super E, ? extends Map.Entry<K, V>>}}|
> |{{any(T[])}}|1|{{Predicate<? super T>}}|
> |{{every(T[])}}|1|{{Predicate<? super T>}}|
> |{{find(T[])}}|1|{{Predicate<? super T>}}|
> |{{findAll(T[])}}|1|{{Predicate<? super T>}}|
> |{{count(T[])}}|1|{{Predicate<? super T>}}|
> Total: 11 object-array twins.
> h3. Primitive-array predicates (decision needed)
> {{any}}/{{every}}/{{count}} on primitive arrays currently take only a 
> {{Closure}}. The JDK provides 
> {{IntPredicate}}/{{LongPredicate}}/{{DoublePredicate}} but no 
> {{Byte}}/{{Char}}/{{Short}}/{{Float}} predicate, so only 
> {{int[]}}/{{long[]}}/{{double[]}} can be covered cleanly (3 receivers x 3 
> methods = 9 twins); the other four primitive types would be inconsistent 
> (widening to {{IntPredicate}} is ugly). *Options:* (a) add the 9 
> well-supported primitive twins; (b) skip primitives for predicates and cover 
> only {{T[]}}. Recommendation: match how {{each}}'s primitive twins already 
> exist only where a JDK SAM fits — i.e. option (a) if primitive predicate 
> ergonomics are wanted, else (b).
> h3. Exclusions
> * {{eachWithIndex}} on primitive arrays — no JDK {{(primitive, int)}} SAM, so 
> only the {{T[]}} form ({{ObjIntConsumer}}) is clean.
> * The {{@Incubating}} right-curry {{(BiXxx, param)}} array forms — 
> GROOVY-12054 added these for {{Iterable}}/{{Iterator}} but not arrays; 
> deferred as a separate item.
> h3. Conventions (per GROOVY-12054)
> PECS wildcards; {{@since 6.0.0}}; javadoc {{<pre class="language-groovy 
> groovyTestCase">}} example cross-linking the {{Closure}} counterpart via 
> {{@link}}; plain SAM overloads (not {{@Incubating}}); bodies delegate to the 
> existing DGM twins.
> h3. Compatibility
> Existing closure/lambda call sites are unaffected; method references and 
> typed functional values select the new twins under {{@CompileStatic}} 
> (GROOVY-12214). The only check is an existing {{@CompileStatic}} call passing 
> a literal {{null}} to a currently-single-overload array method — rare and 
> grep-checkable, resolved with a cast if found.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to