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/06/29 06:31:40 UTC
[PR] GROOVY-9848: Allow membership operator to work on maps [groovy]
paulk-asert opened a new pull request, #2642:
URL: https://github.com/apache/groovy/pull/2642
(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-9848: Change map membership (in) from value-truthy to key-based [groovy]
Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert merged PR #2642:
URL: https://github.com/apache/groovy/pull/2642
--
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-9848: Allow membership operator to work on maps [groovy]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2642:
URL: https://github.com/apache/groovy/pull/2642#discussion_r3489775209
##########
src/main/java/groovy/transform/OperatorRename.java:
##########
@@ -152,6 +152,28 @@
* @return the replacement method name
*/
String compareTo() default Undefined.STRING;
+ /**
+ * Returns the replacement method name for the {@code in} membership operator
+ * (whose default method is {@code isIn}). Defaults to {@link Undefined#STRING},
+ * meaning no rename. The receiver is the right operand (the container), so
+ * {@code a in b} dispatches to {@code b.name(a)}. Setting this to {@code 'isCase'}
+ * restores the pre-GROOVY-9848 value-based membership for maps and char sequences
+ * within the annotated scope.
+ *
Review Comment:
The new `@OperatorRename(isIn=...)` Javadoc suggests setting `isIn='isCase'` restores legacy semantics, but it doesn’t mention that `!in` will keep using the default behavior unless `isNotIn` is also set. That omission can easily lead to inconsistent `in` vs `!in` semantics within the annotated scope.
--
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-9848: Change map membership (in) from value-truthy to key-based [groovy]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #2642:
URL: https://github.com/apache/groovy/pull/2642#issuecomment-4830342220
## ✅ All tests passed ✅
🏷️ Commit: ea95f98ede9a9034e57c5ee86b70909f6ba9d743
▶️ Tests: 102181 executed
⚪️ Checks: 31/31 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-9848: Allow membership operator to work on maps [groovy]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2642:
URL: https://github.com/apache/groovy/pull/2642#issuecomment-4829829812
## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2642?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 `96.55172%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 68.5462%. Comparing base ([`a7d75a5`](https://app.codecov.io/gh/apache/groovy/commit/a7d75a57117601c17687f0724ccd2f73016f4ebe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7920823`](https://app.codecov.io/gh/apache/groovy/commit/7920823865c83f4f191b232272350e06fbf97323?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.
| [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2642?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...codehaus/groovy/runtime/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FScriptBytecodeAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvU2NyaXB0Qnl0ZWNvZGVBZGFwdGVyLmphdmE=) | 87.5000% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2642?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/2642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2642 +/- ##
==================================================
+ Coverage 68.5420% 68.5462% +0.0042%
- Complexity 33730 33751 +21
==================================================
Files 1523 1523
Lines 127923 127959 +36
Branches 23251 23261 +10
==================================================
+ Hits 87681 87711 +30
- Misses 32464 32465 +1
- Partials 7778 7783 +5
```
| [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2642?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...us/groovy/classgen/asm/BinaryExpressionHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FBinaryExpressionHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9CaW5hcnlFeHByZXNzaW9uSGVscGVyLmphdmE=) | `88.9368% <100.0000%> (+0.0319%)` | :arrow_up: |
| [.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==) | `74.9533% <100.0000%> (ø)` | |
| [...ovy/transform/OperatorRenameASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2FOperatorRenameASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9PcGVyYXRvclJlbmFtZUFTVFRyYW5zZm9ybWF0aW9uLmphdmE=) | `67.5676% <100.0000%> (+3.2111%)` | :arrow_up: |
| [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.4584% <100.0000%> (+0.0161%)` | :arrow_up: |
| [...codehaus/groovy/runtime/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/2642?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FScriptBytecodeAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvU2NyaXB0Qnl0ZWNvZGVBZGFwdGVyLmphdmE=) | `65.6542% <87.5000%> (+0.1780%)` | :arrow_up: |
... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2642/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
Re: [PR] GROOVY-9848: Change map membership (in) from value-truthy to key-based [groovy]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #2642:
URL: https://github.com/apache/groovy/pull/2642#issuecomment-4829951422
## ✅ All tests passed ✅
🏷️ Commit: 7920823865c83f4f191b232272350e06fbf97323
▶️ Tests: 102176 executed
⚪️ Checks: 31/31 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