[
https://issues.apache.org/jira/browse/GROOVY-12532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132230#comment-18132230
]
ASF GitHub Bot commented on GROOVY-12532:
-----------------------------------------
codecov-commenter commented on PR #3051:
URL: https://github.com/apache/groovy/pull/3051#issuecomment-6410951720
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3051?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 `85.71429%` with `2 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 73.6086%. Comparing base
([`e301e08`](https://app.codecov.io/gh/apache/groovy/commit/e301e08c4de31eb61b0805e45c7a99b879f165f9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`d9b200d`](https://app.codecov.io/gh/apache/groovy/commit/d9b200d9794a6ee90818209b54bee6481753576a?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/3051?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...a/org/codehaus/groovy/control/CompilationUnit.java](https://app.codecov.io/gh/apache/groovy/pull/3051?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FCompilationUnit.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvQ29tcGlsYXRpb25Vbml0LmphdmE=)
| 85.7143% | [2 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3051?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/3051?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3051 +/- ##
==================================================
+ Coverage 73.6073% 73.6086% +0.0013%
- Complexity 42312 42316 +4
==================================================
Files 1657 1657
Lines 145620 145631 +11
Branches 27466 27467 +1
==================================================
+ Hits 107187 107197 +10
+ Misses 28469 28468 -1
- Partials 9964 9966 +2
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3051?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...va/org/codehaus/groovy/control/ErrorCollector.java](https://app.codecov.io/gh/apache/groovy/pull/3051?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FErrorCollector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvRXJyb3JDb2xsZWN0b3IuamF2YQ==)
| `65.8537% <ø> (ø)` | |
|
[...a/org/codehaus/groovy/control/CompilationUnit.java](https://app.codecov.io/gh/apache/groovy/pull/3051?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FCompilationUnit.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvQ29tcGlsYXRpb25Vbml0LmphdmE=)
| `81.6288% <85.7143%> (+0.0040%)` | :arrow_up: |
... and [15 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3051/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>
> Parallel parsing corrupts the shared ErrorCollector's message list
> ------------------------------------------------------------------
>
> Key: GROOVY-12532
> URL: https://issues.apache.org/jira/browse/GROOVY-12532
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Assignee: Paul King
> Priority: Major
>
> {{CompilationUnit.compile}} parses the sources of a unit in parallel when
> there is more than one and the {{parallelParse}} optimization option is on,
> which it is by default ({{groovy.parallel.parse}}). All sources share the
> unit's {{ErrorCollector}}, which keeps errors and warnings in plain
> {{LinkedList}}s and adds to them without synchronization. When several
> sources report errors at once, the list gets corrupted:
> {code:groovy}
> import org.codehaus.groovy.control.*
> int corrupt = 0
> 300.times { r ->
> def unit = new CompilationUnit()
> 64.times { i -> unit.addSource("S${r}_${i}.groovy", "class S${r}_${i} {
> def m() { foo( } }") }
> try { unit.compile(Phases.CONVERSION) } catch (CompilationFailedException
> ignored) { }
> def errors = unit.errorCollector.errors
> int linked = 0
> try { for (e in errors) linked++ } catch (e) { corrupt++; return }
> if (linked != errors.size()) corrupt++
> }
> assert corrupt == 0 // fails: 85 of 300 on 6.0.0, 96 on master
> {code}
> The list's {{size()}} no longer matches its elements, so copying it can
> throw. This failed a {{groovy-lsp}} test on CI, where {{CompiledDocument}}
> copies the errors of a compile:
> {noformat}
> LanguageQualityTest > dotCompletionListsReceiverMembers() FAILED
> java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for
> length 2
> at java.base/java.util.LinkedList.toArray(LinkedList.java:1065)
> at java.base/java.util.ArrayList.<init>(ArrayList.java:182)
> at
> org.apache.groovy.lsp.internal.compile.CompiledDocument.<init>(CompiledDocument.java:66)
> at
> org.apache.groovy.lsp.internal.compile.GroovyCompiler.addCompiled(GroovyCompiler.java:278)
> {noformat}
> Which and how many errors are reported also depends on thread timing: with
> {{-Dgroovy.parallel.parse=false}} the example always reports one error and
> the assertion passes, while with parallel parsing the count varies from run
> to run. Seen in 4.0.33, 5.0.8, 6.0.0 and master.
> Expected: the collected messages stay consistent when sources are parsed in
> parallel.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)