You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "paulk-asert (via GitHub)" <gi...@apache.org> on 2026/05/24 10:29:04 UTC
[PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
paulk-asert opened a new pull request, #2563:
URL: https://github.com/apache/groovy/pull/2563
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #2563:
URL: https://github.com/apache/groovy/pull/2563#issuecomment-4528653934
## 🚨 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
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [Build and test / lts \(17, ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/26361170623/job/77596763529?pr=2563) | :groovy-groovysh:test | HelpCommandTest > helpListsKnownCommands\(\) | ❌ |
🏷️ Commit: b9d579c46475f51dd3e724e7638a725c1f8cb7bc
▶️ Tests: 22174 executed
🟡 Checks: 2/28 completed
### Test Failures
<details>
<summary><strong>HelpCommandTest > helpListsKnownCommands()</strong> (:groovy-groovysh:test in <a href="https://github.com/apache/groovy/actions/runs/26361170623/job/77596763529?pr=2563">Build and test / lts (17, ubuntu-latest)</a>)</summary>
```
Assertion failed:
assert out.contains('show')
| |
| false
' System:\r\n /exit exit from app/script \r\n /help command help \r\n Console Commands:\r\n /alias create command alias \r\n /del delete console variables, methods, cl'
at org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at org.apache.groovy.groovysh.commands.HelpCommandTest.helpListsKnownCommands(HelpCommandTest.groovy:44)
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 HelpCommandTest > helpListsKnownCommands\(\) <!-- uniqueId=[engine:junit-jupiter]/[class:org.apache.groovy.groovysh.commands.HelpCommandTest]/[method:helpListsKnownCommands()] -->
Reuse successful test results:
🔲 ♻️ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
🔲 **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #2563:
URL: https://github.com/apache/groovy/pull/2563#issuecomment-4528312340
## ✅ All tests passed ✅
🏷️ Commit: 1202f33e1e3de8d1f811888c47f88e05954707fc
▶️ Tests: 39768 executed
⚪️ Checks: 28/28 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2563:
URL: https://github.com/apache/groovy/pull/2563#discussion_r3294423451
##########
subprojects/groovy-contracts/src/spec/doc/contracts-userguide.adoc:
##########
@@ -141,6 +173,44 @@ include::../test/ContractsTest.groovy[tags=loop_invariant_multiple_example,inden
* Assignment operators and state-changing postfix/prefix operators are
not supported inside the closure.
+== Loop Termination with @Decreases
+
+Where `@Invariant` on a loop asserts a condition that must hold _during_ iteration,
+`@Decreases` asserts a condition that guarantees the loop will _terminate_: a
+_loop variant_, also known as a termination measure. The closure must yield a
+`Comparable` value (typically numeric) that strictly decreases on every iteration
+and remains non-negative; if either part fails, a `LoopVariantViolation`
+(a subclass of `AssertionError`) is thrown.
Review Comment:
The new `@Decreases` docs state the closure must yield/return a `Comparable`, but the implementation also supports `List` variants with lexicographic comparison (see `LoopVariantASTTransformation.checkDecreased` handling `prev instanceof List && curr instanceof List`). Please update this section (and the rules list) to document the `List`-of-`Comparable` option, or tighten the implementation/docs so they agree.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert merged PR #2563:
URL: https://github.com/apache/groovy/pull/2563
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GROOVY-12038: Graduate groovy-contracts from incubating to stable [groovy]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2563:
URL: https://github.com/apache/groovy/pull/2563#issuecomment-4528263346
## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2563?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 68.1935%. Comparing base ([`121c860`](https://app.codecov.io/gh/apache/groovy/commit/121c8605f7994fcefb4f13f21b5a4a46b95ee84a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1202f33`](https://app.codecov.io/gh/apache/groovy/commit/1202f33e1e3de8d1f811888c47f88e05954707fc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 5 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/2563?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2563 +/- ##
==================================================
+ Coverage 68.1879% 68.1935% +0.0055%
- Complexity 33093 33097 +4
==================================================
Files 1508 1508
Lines 126147 126147
Branches 22887 22887
==================================================
+ Hits 86017 86024 +7
+ Misses 32489 32485 -4
+ Partials 7641 7638 -3
```
[see 5 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2563/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>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org