[
https://issues.apache.org/jira/browse/GROOVY-11443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17866684#comment-17866684
] ASF GitHub Bot commented on GROOVY-11443: ----------------------------------------- codecov-commenter commented on PR #2100: URL: https://github.com/apache/groovy/pull/2100#issuecomment-2232957518 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2100?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report Attention: Patch coverage is `90.16393%` with `12 lines` in your changes missing coverage. Please review. > Project coverage is 68.6593%. Comparing base [(`6cd477b`)](https://app.codecov.io/gh/apache/groovy/commit/6cd477b3157675f0ceee9fbd62e3efd0cc9bdb3e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`85b8dcf`)](https://app.codecov.io/gh/apache/groovy/commit/85b8dcf38d66a59f1d6691d0148dfdb4b881a563?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). > Report is 183 commits behind head on master. <details><summary>Additional details and impacted files</summary> [](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2100 +/- ## ================================================== + Coverage 68.5957% 68.6593% +0.0636% - Complexity 29233 29386 +153 ================================================== Files 1426 1426 Lines 113494 113635 +141 Branches 19548 19596 +48 ================================================== + Hits 77852 78021 +169 + Misses 29088 29062 -26 + Partials 6554 6552 -2 ``` | [Files](https://app.codecov.io/gh/apache/groovy/pull/2100?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/ast/tools/GeneralUtils.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Ftools%2FGeneralUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC90b29scy9HZW5lcmFsVXRpbHMuamF2YQ==) | `85.6132% <100.0000%> (+1.0699%)` | :arrow_up: | | [.../ClosureExpressionEvaluationASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fast%2FClosureExpressionEvaluationASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9hc3QvQ2xvc3VyZUV4cHJlc3Npb25FdmFsdWF0aW9uQVNUVHJhbnNmb3JtYXRpb24uamF2YQ==) | `95.8333% <100.0000%> (+0.3788%)` | :arrow_up: | | [...ontracts/ast/visitor/AnnotationClosureVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fast%2Fvisitor%2FAnnotationClosureVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9hc3QvdmlzaXRvci9Bbm5vdGF0aW9uQ2xvc3VyZVZpc2l0b3IuamF2YQ==) | `90.9483% <100.0000%> (ø)` | | | [...ache/groovy/contracts/ast/visitor/BaseVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fast%2Fvisitor%2FBaseVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9hc3QvdmlzaXRvci9CYXNlVmlzaXRvci5qYXZh) | `85.7143% <ø> (ø)` | | | [.../contracts/classgen/asm/ContractClosureWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fclassgen%2Fasm%2FContractClosureWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9jbGFzc2dlbi9hc20vQ29udHJhY3RDbG9zdXJlV3JpdGVyLmphdmE=) | `86.3014% <100.0000%> (ø)` | | | [...tracts/common/impl/EnsuresAnnotationProcessor.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fcommon%2Fimpl%2FEnsuresAnnotationProcessor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9jb21tb24vaW1wbC9FbnN1cmVzQW5ub3RhdGlvblByb2Nlc3Nvci5qYXZh) | `66.6667% <100.0000%> (ø)` | | | [...ntracts/common/impl/lc/PostconditionLifecycle.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fcommon%2Fimpl%2Flc%2FPostconditionLifecycle.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9jb21tb24vaW1wbC9sYy9Qb3N0Y29uZGl0aW9uTGlmZWN5Y2xlLmphdmE=) | `92.8571% <100.0000%> (-0.4762%)` | :arrow_down: | | [...racts/common/spi/ProcessingContextInformation.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fcommon%2Fspi%2FProcessingContextInformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9jb21tb24vc3BpL1Byb2Nlc3NpbmdDb250ZXh0SW5mb3JtYXRpb24uamF2YQ==) | `56.6667% <100.0000%> (ø)` | | | [...g/apache/groovy/contracts/domain/AssertionMap.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fdomain%2FAssertionMap.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9kb21haW4vQXNzZXJ0aW9uTWFwLmphdmE=) | `100.0000% <100.0000%> (ø)` | | | [...apache/groovy/contracts/domain/ClassInvariant.java](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fdomain%2FClassInvariant.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9kb21haW4vQ2xhc3NJbnZhcmlhbnQuamF2YQ==) | `60.0000% <100.0000%> (ø)` | | | ... and [15 more](https://app.codecov.io/gh/apache/groovy/pull/2100?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | ... and [45 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2100/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) </details> > Support multiple Requires/Ensures/Invariant annotations in groovy-contracts > --------------------------------------------------------------------------- > > Key: GROOVY-11443 > URL: https://issues.apache.org/jira/browse/GROOVY-11443 > Project: Groovy > Issue Type: Improvement > Reporter: Paul King > Assignee: Paul King > Priority: Major > > Languages like Dafny support having multiple pre/post condition clauses. They > are just and'd together. > A contrived example (with boring constants as the conditions - but you'll get > the idea): > {code} > import groovy.contracts.* > @Invariant({ 1 }) > @Invariant({ 2 }) > interface F { > @Ensures({ 1 }) > @Ensures({ 2 }) > @Requires({ 1 }) > @Requires({ 2 }) > def foo() > } > @Invariant({ 3 }) > @Invariant({ 4 }) > abstract class P { > @Requires({ 3 }) > @Requires({ 4 }) > @Ensures({ 3 }) > @Ensures({ 4 }) > abstract def foo() > } > @Invariant({ 5 }) > @Invariant({ 6 }) > class C extends P implements F { > def d() { println new Date() } > @Requires({ 5 }) > @Requires({ 6 }) > @Ensures({ 5 }) > @Ensures({ 6 }) > def foo() { println true } > } > new C().d() > {code} > The invariant for class C is "1 && 2 && 3 && 4 && 5 && 6" as is the > postcondition. > The precondition is "(1 && 2) || (3 && 4) || (5 && 6)". Preconditions are > typically or'd like this to handle the weaker pre rule - no change in > behavior was made, just and'ing together the terms in the one class/interface. -- This message was sent by Atlassian Jira (v8.20.10#820010)
