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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3255?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 74.4058%. Comparing base 
([`d020012`](https://app.codecov.io/gh/apache/groovy/commit/d02001286af335c8777fb9f5770e48ec4d07119f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`135889d`](https://app.codecov.io/gh/apache/groovy/commit/135889d3ed59cb22a9cd17107696d979056b2a77?dropdown=coverage&el=desc&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/3255/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/3255?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3255        +/-   ##
   ==================================================
   + Coverage     74.4010%   74.4058%   +0.0048%     
   - Complexity      44345      44352         +7     
   ==================================================
     Files            1699       1699                
     Lines          150998     151003         +5     
     Branches        28770      28770                
   ==================================================
   + Hits           112344     112355        +11     
   + Misses          28380      28376         -4     
   + Partials        10274      10272         -2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3255?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/concurrent/Awaitable.java](https://app.codecov.io/gh/apache/groovy/pull/3255?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Fconcurrent%2FAwaitable.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvY29uY3VycmVudC9Bd2FpdGFibGUuamF2YQ==)
 | `92.8571% <ø> (ø)` | |
   | 
[.../apache/groovy/runtime/async/AwaitCombinators.java](https://app.codecov.io/gh/apache/groovy/pull/3255?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Fasync%2FAwaitCombinators.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2FzeW5jL0F3YWl0Q29tYmluYXRvcnMuamF2YQ==)
 | `93.8272% <100.0000%> (+0.4061%)` | :arrow_up: |
   
   ... and [9 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3255/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>




> Awaitable.all, any, first and allSettled should accept a single list of 
> sources
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-12721
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12721
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {{Awaitable.all}}, {{any}}, {{first}} and {{allSettled}} take {{Object... 
> sources}}. A caller holding a list of tasks, the usual shape when the tasks 
> come out of {{collect}}, has to spread it: {{Awaitable.allSettled(*tasks)}}. 
> Passing the list itself compiles and fails at run time with a message about 
> the list's class:
> {code:groovy}
> def tasks = ['a', 'b', 'c'].collect { m -> async { fetch(m) } }
> def results = await Awaitable.allSettled(tasks)
> {code}
> {noformat}
> IllegalArgumentException: No Awaitable adapter found for type: 
> java.util.ArrayList. Register an AwaitableAdapter via ServiceLoader or 
> AwaitableAdapterRegistry.register().
> {noformat}
> JavaScript's {{Promise.all}}, {{allSettled}}, {{any}} and {{race}} take an 
> iterable, so this is the form people, and the models trained on them, write 
> first. A single argument that is a {{Collection}} has no other meaning today, 
> since a collection is never awaitable, so the combinators can take it as the 
> list of sources.
> Proposal: in {{AwaitCombinators}}, when {{sources}} has one element and it is 
> a {{Collection}}, use its elements; the empty and null checks of {{any}} and 
> {{first}} then apply to those elements. {{Awaitable.all(*tasks)}} keeps 
> working. A sentence in the combinator summary of core-async-await.adoc and in 
> the {{@param sources}} Javadoc.
> Found while scoring Groovy 6.0.0 code written by a language model: with the 
> Groovy documentation available to it through a tool, GPT-6 still wrote the 
> list form.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to