[
https://issues.apache.org/jira/browse/GROOVY-12288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106971#comment-18106971
]
ASF GitHub Bot commented on GROOVY-12288:
-----------------------------------------
testlens-app[bot] commented on PR #2825:
URL: https://github.com/apache/groovy/pull/2825#issuecomment-5381848158
## 🚨 TestLens detected 1 failed test 🚨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them
below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
#### [Build and test / lts \(21,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/32588966869/job/97069859638?pr=2825)
> :groovy-logging-test:test
| Test | Runs | Flakiness |
|---|---|--:|
| LogTest > testDefaultCategory\(\) | ❌ | 0% 🟢 |
🏷️ Commit: a308c5ca7800961d3ffc23703606ea931ef070ef
▶️ Tests: 34562 executed
🟡 Checks: 6/29 completed
### Test Failures
<details>
<summary><strong>LogTest > testDefaultCategory()</strong>
(:groovy-logging-test:test in <a
href="https://github.com/apache/groovy/actions/runs/32588966869/job/97069859638?pr=2825">Build
and test / lts (21, ubuntu-latest)</a>)</summary>
```
Assertion failed:
assert logFormatterSpy.messageReceived
| |
| false
groovy.util.logging.LogFormatterSpy@2407a36c
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:401)
at groovy.util.logging.LogTest.testDefaultCategory(LogTest.groovy:381)
```
</details>
### Rerun Controls
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 LogTest > testDefaultCategory\(\) <!
> Cache ClassWriter getCommonSuperClass lookups per class
> -------------------------------------------------------
>
> Key: GROOVY-12288
> URL: https://issues.apache.org/jira/browse/GROOVY-12288
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
>
> Bytecode generation uses an ASM {{ClassWriter}} with {{{}COMPUTE_FRAMES{}}}.
> Frame computation calls {{getCommonSuperClass}} at every control-flow merge.
> Groovy overrides that method so types still being compiled are resolved
> through {{ClassNode}} ({{{}CompileUnit{}}}, generated inner classes,
> {{{}ClassNodeResolver{}}}) rather than {{{}Class.forName{}}}.
> {{COMPUTE_FRAMES}} asks for the same binary-name pairs many times inside one
> class. Each call converts slashes to dots, resolves two \{{ClassNode}}s, and
> walks superclasses with isDerivedFrom. Class generation is about half of
> compile wall time.
> h3. Approach
> Memoize both steps on the {{ClassWriter}} created by
> {{{}CompilationUnit.createClassVisitor{}}}. One writer is allocated per
> generated class and discarded afterwards, so the maps cannot go stale across
> classes.
> ||Cache||Key||Value||
> |{{classNodeByName}}|binary name (dot form)|{{ClassNode}} (successful lookups
> only)|
> |{{commonSuperByPair}}|canonical pair of internal names|internal name of the
> common superclass|
> The key is order-independent: {{(A,B)}} and {{(B,A)}} share one entry. The
> common-superclass algorithm is unchanged.
> h3. Impact
> Compile-time only. {{getCommonSuperClass}} results and generated bytecode
> stay the same.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)