[
https://issues.apache.org/jira/browse/GROOVY-12264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105090#comment-18105090
]
ASF GitHub Bot commented on GROOVY-12264:
-----------------------------------------
codecov-commenter commented on PR #2795:
URL: https://github.com/apache/groovy/pull/2795#issuecomment-5307421883
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2795?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 `86.84211%` with `5 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 70.1226%. Comparing base
([`31803c5`](https://app.codecov.io/gh/apache/groovy/commit/31803c59ded358c0d23b818af4d1a192327d260f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`4f5ea60`](https://app.codecov.io/gh/apache/groovy/commit/4f5ea608bcfd2ecd7a01fe80eb0d7e96ab7f78d3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2795?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...in/java/org/codehaus/groovy/classgen/Verifier.java](https://app.codecov.io/gh/apache/groovy/pull/2795?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVerifier.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZlcmlmaWVyLmphdmE=)
| 86.1111% | [1 Missing and 4 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2795?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/2795?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2795 +/- ##
==================================================
- Coverage 70.1231% 70.1226% -0.0005%
- Complexity 35799 35804 +5
==================================================
Files 1562 1562
Lines 132400 132408 +8
Branches 24345 24356 +11
==================================================
+ Hits 92843 92848 +5
+ Misses 31159 31158 -1
- Partials 8398 8402 +4
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2795?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[.../main/java/org/codehaus/groovy/ast/MethodNode.java](https://app.codecov.io/gh/apache/groovy/pull/2795?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FMethodNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9NZXRob2ROb2RlLmphdmE=)
| `97.9381% <100.0000%> (ø)` | |
|
[...in/java/org/codehaus/groovy/classgen/Verifier.java](https://app.codecov.io/gh/apache/groovy/pull/2795?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVerifier.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZlcmlmaWVyLmphdmE=)
| `89.7622% <86.1111%> (-0.3317%)` | :arrow_down: |
... and [5 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2795/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>
> Optimize the unrelated-default-method scan during class generation
> ------------------------------------------------------------------
>
> Key: GROOVY-12264
> URL: https://issues.apache.org/jira/browse/GROOVY-12264
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
>
> {{Verifier}} rejects a type that inherits two unrelated {{default}} methods
> of the same signature (GROOVY-10381, refined by GROOVY-11560). The scan runs
> in class generation for every type that lists two or more interfaces.
> Class generation is a large share of compile wall time. The scan must stay
> cheap on the common path, where there is no conflict.
> h3. Problem
> * Stream / {{flatMap}} allocation on every such type.
> * {{ClassNode.getAllDeclaredMethods()}} on the class and again on every
> interface. Each call rebuilds a full hierarchy method map and revisits
> inherited defaults.
> On a wide or deep interface DAG the second point is quadratic in the number
> of interfaces.
> h3. Approach
> * Walk each interface's own methods ({{getMethods()}}) with loops.
> {{getAllInterfaces()}} already includes super-interfaces, so each {{default}}
> is visited once.
> * Build the override-signature set only when two unrelated defaults actually
> collide, and only from the class plus its superclasses.
> * Avoid the {{Optional}} allocation in {{MethodNode.isDefault()}}.
> Before:
> {code:java}
> Set<String> declared = node.getAllDeclaredMethods().stream()
> .filter(m -> !m.isDefault())
> .map(MethodNodeUtils::methodDescriptorWithoutReturnType)
> .collect(Collectors.toSet());
> node.getAllInterfaces().stream()
> .flatMap(iface -> iface.getAllDeclaredMethods().stream())
> .filter(MethodNode::isDefault)
> .forEach(method -> {
> // conflict check
> });
> {code}
> After:
> {code:java}
> for (ClassNode iface : node.getAllInterfaces()) {
> for (MethodNode method : iface.getMethods()) { // this interface only
> if (!method.isDefault()) {
> continue;
> }
> // conflict check; collect overrides only on a real collision
> }
> }
> {code}
> Same conflict rules. No intended behaviour change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)