[
https://issues.apache.org/jira/browse/GROOVY-11878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18067447#comment-18067447
] ASF GitHub Bot commented on GROOVY-11878: ----------------------------------------- codecov-commenter commented on PR #2400: URL: https://github.com/apache/groovy/pull/2400#issuecomment-4105792478 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2400?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 `52.13675%` with `56 lines` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 66.6569%. Comparing base ([`2cb02e9`](https://app.codecov.io/gh/apache/groovy/commit/2cb02e9b4e76fb06cdb57521be7ccb7c7036d2f2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ab272e7`](https://app.codecov.io/gh/apache/groovy/commit/ab272e70bb827435af30ce9ceb6de5017a96b6ef?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/2400?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [...us/groovy/transform/ParallelASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FParallelASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9QYXJhbGxlbEFTVFRyYW5zZm9ybWF0aW9uLmphdmE=) | 0.0000% | [34 Missing :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...oovy/transform/LoopInvariantASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FLoopInvariantASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9Mb29wSW52YXJpYW50QVNUVHJhbnNmb3JtYXRpb24uamF2YQ==) | 42.3077% | [9 Missing and 6 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...pache/groovy/parser/antlr4/SemanticPredicates.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FSemanticPredicates.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L1NlbWFudGljUHJlZGljYXRlcy5qYXZh) | 82.3529% | [0 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...aus/groovy/transform/ASTTransformationVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FASTTransformationVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9BU1RUcmFuc2Zvcm1hdGlvblZpc2l0b3IuamF2YQ==) | 66.6667% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...n/java/org/codehaus/groovy/ast/AnnotationNode.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FAnnotationNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9Bbm5vdGF0aW9uTm9kZS5qYXZh) | 0.0000% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...n/java/org/codehaus/groovy/ast/stmt/Statement.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Fstmt%2FStatement.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9zdG10L1N0YXRlbWVudC5qYXZh) | 88.8889% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2400?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/2400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2400 +/- ## ================================================== - Coverage 66.6767% 66.6569% -0.0198% - Complexity 29855 29877 +22 ================================================== Files 1382 1384 +2 Lines 116144 116258 +114 Branches 20481 20504 +23 ================================================== + Hits 77441 77494 +53 - Misses 32358 32408 +50 - Partials 6345 6356 +11 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2400?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/apache/groovy/parser/antlr4/AstBuilder.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FAstBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L0FzdEJ1aWxkZXIuamF2YQ==) | `86.5436% <100.0000%> (+0.0364%)` | :arrow_up: | | [...aus/groovy/ast/ClassCodeExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FClassCodeExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9DbGFzc0NvZGVFeHByZXNzaW9uVHJhbnNmb3JtZXIuamF2YQ==) | `100.0000% <100.0000%> (ø)` | | | [...g/codehaus/groovy/ast/ClassCodeVisitorSupport.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FClassCodeVisitorSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9DbGFzc0NvZGVWaXNpdG9yU3VwcG9ydC5qYXZh) | `100.0000% <100.0000%> (ø)` | | | [...va/org/codehaus/groovy/control/ResolveVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FResolveVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvUmVzb2x2ZVZpc2l0b3IuamF2YQ==) | `89.6334% <100.0000%> (+0.0527%)` | :arrow_up: | | [...ansform/ASTTransformationCollectorCodeVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FASTTransformationCollectorCodeVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9BU1RUcmFuc2Zvcm1hdGlvbkNvbGxlY3RvckNvZGVWaXNpdG9yLmphdmE=) | `91.1392% <100.0000%> (+0.2301%)` | :arrow_up: | | [...n/java/org/codehaus/groovy/ast/AnnotationNode.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FAnnotationNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9Bbm5vdGF0aW9uTm9kZS5qYXZh) | `69.2308% <0.0000%> (-0.6721%)` | :arrow_down: | | [...n/java/org/codehaus/groovy/ast/stmt/Statement.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Fstmt%2FStatement.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9zdG10L1N0YXRlbWVudC5qYXZh) | `95.4546% <88.8889%> (-4.5455%)` | :arrow_down: | | [...aus/groovy/transform/ASTTransformationVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FASTTransformationVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9BU1RUcmFuc2Zvcm1hdGlvblZpc2l0b3IuamF2YQ==) | `81.3187% <66.6667%> (-0.4995%)` | :arrow_down: | | [...pache/groovy/parser/antlr4/SemanticPredicates.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FSemanticPredicates.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L1NlbWFudGljUHJlZGljYXRlcy5qYXZh) | `83.5294% <82.3529%> (-0.2941%)` | :arrow_down: | | [...oovy/transform/LoopInvariantASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FLoopInvariantASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9Mb29wSW52YXJpYW50QVNUVHJhbnNmb3JtYXRpb24uamF2YQ==) | `42.3077% <42.3077%> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/apache/groovy/pull/2400?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2400/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> > Allow AST transforms to be applicable in more places, initially loop > statements > ------------------------------------------------------------------------------- > > Key: GROOVY-11878 > URL: https://issues.apache.org/jira/browse/GROOVY-11878 > Project: Groovy > Issue Type: New Feature > Reporter: Paul King > Priority: Major > > The JVM doesn't support adding annotations in the bytecode for statements and > expressions. That doesn't mean that Groovy couldn't support source-level AST > transforms in those places. Code injection can happen in the normal way, and > the transform will be "forgotten" after compilation. > Examples might be: > {code} > @Parallel > for (int i in 1..4) { > println i ** 2 > } > {code} > which might have this output: > {noformat} > 1 > 16 > 9 > 4 > {noformat} > Or these: > {code} > int sum = 0 > @Invariant({ 0 <= i && i <= 4 }) > for (int i in 0..4) { > sum += i > } > assert sum == 10 > {code} > {code} > int i = 10 > @Invariant({ i >= 0 }) > @Ensures({ i > old.i }) // i decreases > while (i > 0) { > i = i - 1 > } > assert i == 0 > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
