[
https://issues.apache.org/jira/browse/GROOVY-9848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18092268#comment-18092268
]
ASF GitHub Bot commented on GROOVY-9848:
----------------------------------------
codecov-commenter commented on PR #2643:
URL: https://github.com/apache/groovy/pull/2643#issuecomment-4830096242
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2643?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 `72.22222%` with `5 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 67.2202%. Comparing base
([`b46ebb2`](https://app.codecov.io/gh/apache/groovy/commit/b46ebb25e7bcba7269c9185aa0e965e02c50db06?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`7fe9108`](https://app.codecov.io/gh/apache/groovy/commit/7fe91080f9c697d7364647bb5a7a23a7499266c8?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/2643?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/2643?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=)
| 50.0000% | [1 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2643?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...ovy/transform/OperatorRenameASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2643?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=)
| 90.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2643?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/2643?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## GROOVY_5_0_X #2643 +/- ##
======================================================
+ Coverage 67.2185% 67.2202% +0.0016%
- Complexity 29537 29543 +6
======================================================
Files 1382 1382
Lines 116938 116956 +18
Branches 20523 20529 +6
======================================================
+ Hits 78604 78618 +14
Misses 31815 31815
- Partials 6519 6523 +4
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2643?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...ovy/transform/OperatorRenameASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/2643?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=)
| `65.3846% <90.0000%> (+3.6199%)` | :arrow_up: |
|
[...codehaus/groovy/runtime/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/2643?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=)
| `67.3709% <50.0000%> (-0.3325%)` | :arrow_down: |
... and [4 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2643/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>
> Change map membership (in) from value-truthy to key-based
> ---------------------------------------------------------
>
> Key: GROOVY-9848
> URL: https://issues.apache.org/jira/browse/GROOVY-9848
> Project: Groovy
> Issue Type: Improvement
> Reporter: Keegan Witt
> Assignee: Eric Milles
> Priority: Major
> Labels: breaking, breaking_change
>
> {code:groovy}def map = [a:1,b:2,z:0].withDefault{3}{code}
> Options:
> # do nothing
> {code:groovy}
> assert 'a' in map
> assert 'b' in map
> assert 'x' in map // mutates!
> assert 'z' !in map
> assert 4 === map.size()
> {code}
> # change mutation of {{isCase}} -- guard with {{containsKey}}:
> {code:groovy}
> assert 'a' in map
> assert 'b' in map
> assert 'x' !in map
> assert 'z' !in map
> assert 3 === map.size()
> {code}
> # change {{isCase}} to {{containsKey}}:
> {code:groovy}
> assert 'a' in map
> assert 'b' in map
> assert 'x' !in map
> assert 'z' in map
> assert 3 === map.size()
> // grep and switch behavior change (see below)
> {code}
> # ask user to test key set
> {code:groovy}
> assert 'a' in map.keySet()
> assert 'b' in map.keySet()
> assert 'x' !in map.keySet()
> assert 'z' !in map.keySet()
> assert 3 === map.size()
> {code}
> # provide {{@OperatorRename}} support:
> {code:groovy}
> @OperatorRename(isCase='containsKey')
> void test() {
> assert 'a' in map
> assert 'b' in map
> assert 'x' !in map
> assert 'z' !in map
> assert 3 === map.size()
> }
> {code}
> # remap operator {{in}} to {{isIn}} (or some such):
> {code:groovy}
> // DGMs:
> boolean isIn(Map map, Object key) {
> return map != null && map.containsKey(key);
> }
> boolean isIn(Object obj, Object value) {
> return InvokerHelper.invokeMethod(obj, "isCase", new Object[]{value});
> }
> assert 'a' in map
> assert 'b' in map
> assert 'x' !in map
> assert 'z' in map
> assert 3 === map.size()
> // behavior change for any type that provides "isIn"
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)