[
https://issues.apache.org/jira/browse/GROOVY-12841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152310#comment-18152310
]
ASF GitHub Bot commented on GROOVY-12841:
-----------------------------------------
codecov-commenter commented on PR #3369:
URL: https://github.com/apache/groovy/pull/3369#issuecomment-7234055522
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3369?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.9871%. Comparing base
([`d108274`](https://app.codecov.io/gh/apache/groovy/commit/d108274c11dda1f125e157d221fd0dcc27883fd8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`d7544ee`](https://app.codecov.io/gh/apache/groovy/commit/d7544ee25d9a8e31b6bd0e661690ae97bcbc154e?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>
[](https://app.codecov.io/gh/apache/groovy/pull/3369?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3369 +/- ##
==================================================
+ Coverage 74.9810% 74.9871% +0.0062%
- Complexity 48992 49002 +10
==================================================
Files 1768 1768
Lines 161397 161397
Branches 31782 31782
==================================================
+ Hits 121017 121027 +10
+ Misses 28949 28946 -3
+ Partials 11431 11424 -7
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3369?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/transform/PackedClosures.java](https://app.codecov.io/gh/apache/groovy/pull/3369?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Ftransform%2FPackedClosures.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvdHJhbnNmb3JtL1BhY2tlZENsb3N1cmVzLmphdmE=)
| `100.0000% <ø> (ø)` | |
|
[...codehaus/groovy/control/CompilerConfiguration.java](https://app.codecov.io/gh/apache/groovy/pull/3369?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FCompilerConfiguration.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvQ29tcGlsZXJDb25maWd1cmF0aW9uLmphdmE=)
| `75.6164% <ø> (ø)` | |
... and [15 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3369/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>
> Javadoc of CompilerConfiguration.CLOSURE_PACKING and @PackedClosures says the
> flag packs only @CompileStatic closures
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12841
> URL: https://issues.apache.org/jira/browse/GROOVY-12841
> Project: Groovy
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 6.0.0, 6.0.1
> Reporter: Scott Murphy Heiberg
> Priority: Blocker
>
> CompilerConfiguration.CLOSURE_PACKING is documented as
> {quote}
> System-property name for the GEP-27 incubating option that automatically
> packs provably-safe @CompileStatic closures (hoisting their bodies to a
> shared adapter instead of a class).
> {quote}
> and the Javadoc of groovy.transform.PackedClosures says "Automatic packing of
> provably-safe @CompileStatic closures — without this annotation — is
> available behind the groovy.target.closure.pack flag".
> With the property set, dynamically compiled closures are packed too when
> their body has no free name:
> {code:groovy}
> class Dyn {
> static void main(String[] args) {
> Closure c = { String s -> s.length() }
> println c.getClass().name
> }
> }
> {code}
> {noformat}
> $ java -Dgroovy.target.closure.pack=true -cp groovy-6.0.1.jar
> groovy.ui.GroovyMain Dyn.groovy
> org.codehaus.groovy.runtime.PackedClosure$Fixed1
> {noformat}
> The behaviour is intended: ClosureWriter#isPackTriggered packs a dynamic
> closure that isSyntacticallyDelegateIndependent ("GROOVY-12151 dynamic
> syntactic path"), and
> ClosurePackCapabilityTest#dynamicDelegateIndependentClosuresAutoPackBySyntax
> asserts it. The documentation is what is out of date. The first sentence of
> the Javadoc of ClosureWriter#isPackTriggered ("the only trigger is the
> @PackedClosures trust assertion") and the class comment of
> ClosurePackCapabilityTest ("dynamic closures (no static resolution) are never
> auto-packed") say the same outdated thing.
> Proposed fix (pull request to follow)
> State both subsets in the two public Javadocs: under @CompileStatic, closures
> the type checker resolved without a delegate; under dynamic compilation,
> closures whose body has no free name (no implicit-this call and no name other
> than a parameter or local variable).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)