Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix map edgecases #3496

Merged
merged 1 commit into from
Apr 24, 2023
Merged

fix map edgecases #3496

merged 1 commit into from
Apr 24, 2023

Conversation

myuwono
Copy link
Contributor

@myuwono myuwono commented Apr 24, 2023

in this PR

  • remove recently added includeEmpty arg in favour of edgecase derived from minSize.
  • modify edgecase generation logic to be determined by minSize instead
  • This ensures sane generation of edgecases based on the parameter provided in the map

Context

The recently added includeEmpty arg was introduced in 5.6.0 and was causing the regression

@myuwono myuwono marked this pull request as ready for review April 24, 2023 01:24
@sksamuel sksamuel enabled auto-merge (squash) April 24, 2023 01:43
@sksamuel
Copy link
Member

lgtm

@sksamuel sksamuel merged commit c5abf5b into master Apr 24, 2023
@sksamuel sksamuel deleted the bugfix/fix-arb-map-edgecases branch April 24, 2023 01:46
nomisRev referenced this pull request in arrow-kt/arrow-website May 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.kotest:kotest-runner-junit5](https://togithub.com/kotest/kotest) |
`5.6.1` -> `5.6.2` |
[![age](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-runner-junit5/5.6.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-runner-junit5/5.6.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-runner-junit5/5.6.2/compatibility-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-runner-junit5/5.6.2/confidence-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.kotest:kotest-property](https://togithub.com/kotest/kotest) |
`5.6.1` -> `5.6.2` |
[![age](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-property/5.6.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-property/5.6.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-property/5.6.2/compatibility-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-property/5.6.2/confidence-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.kotest:kotest-framework-engine](https://togithub.com/kotest/kotest)
| `5.6.1` -> `5.6.2` |
[![age](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-framework-engine/5.6.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-framework-engine/5.6.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-framework-engine/5.6.2/compatibility-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-framework-engine/5.6.2/confidence-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.kotest:kotest-assertions-core](https://togithub.com/kotest/kotest)
| `5.6.1` -> `5.6.2` |
[![age](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-assertions-core/5.6.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-assertions-core/5.6.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-assertions-core/5.6.2/compatibility-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/maven/io.kotest:kotest-assertions-core/5.6.2/confidence-slim/5.6.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>kotest/kotest</summary>

### [`v5.6.2`](https://togithub.com/kotest/kotest/releases/tag/v5.6.2)

##### 5.6.2 May 2023

##### Assertions

- Adding shouldHaveSameInstantAs matcher for OffsetDateTime. Fixes
[#&#8203;3488](https://togithub.com/kotest/kotest/issues/3488) by
[@&#8203;Kantis](https://togithub.com/Kantis) in
[https://github.com/kotest/kotest/pull/3501](https://togithub.com/kotest/kotest/pull/3501)

##### Property testing

- Fixes a problem with property testing on Apple platforms
[#&#8203;3506](https://togithub.com/kotest/kotest/issues/3506)
- Reverts behaviour of `Arb.string()` to only generate Strings of
printable ascii characters
- 5.6.0 changed it to include some control characters, see
[#&#8203;3513](https://togithub.com/kotest/kotest/issues/3513) for
details
- Fix huge allocation for OffsetDateTime Arb without arguments by
[@&#8203;rescribet](https://togithub.com/rescribet) in
[https://github.com/kotest/kotest/pull/3491](https://togithub.com/kotest/kotest/pull/3491)
- Fix Arb.map edgecases by
[@&#8203;myuwono](https://togithub.com/myuwono) in
[https://github.com/kotest/kotest/pull/3496](https://togithub.com/kotest/kotest/pull/3496)

##### Documentation

- Update writing_tests.md by
[@&#8203;erikhuizinga](https://togithub.com/erikhuizinga) in
[https://github.com/kotest/kotest/pull/3497](https://togithub.com/kotest/kotest/pull/3497)
- Update shouldBeEqualToComparingFields doc by
[@&#8203;ktrueda](https://togithub.com/ktrueda) in
[https://github.com/kotest/kotest/pull/3416](https://togithub.com/kotest/kotest/pull/3416)

##### Other

- Build Kotlin/Native library for ARM64 on Linux by
[@&#8203;charleskorn](https://togithub.com/charleskorn) in
[https://github.com/kotest/kotest/pull/3521](https://togithub.com/kotest/kotest/pull/3521)

##### ⚠️ Reverted behavior of `Arb.string()`

With Kotest 5.6.0, `Codepoint.ascii()` was changed to include a wider
range of ascii chararacters, and `Codepoint.printableAscii()` was
introduced with the historic range used by `Codepoint.ascii()`.

`Arb.string()` has been using `Codepoint.ascii()` as it's default for
generating chars for the string. This caused issues for some users, and
we decided to revert `Arb.string()` to the historic behavior by changing
the default to the new `Codepoint.printableAscii()`.

Hopefully this doesn't cause any issues for you. If it does, you can
revert to the 5.6.0 ~ 5.6.1 behavior by using `Codepoint.ascii()`
explicitly.

If you added explicit usage of `Codepoint.printableAscii()` to
circumvent the issue, you can safely remove the explicit parameter
starting with Kotest 5.6.2.

##### New Contributors

- [@&#8203;rescribet](https://togithub.com/rescribet) made their first
contribution in
[https://github.com/kotest/kotest/pull/3491](https://togithub.com/kotest/kotest/pull/3491)
- [@&#8203;ktrueda](https://togithub.com/ktrueda) made their first
contribution in
[https://github.com/kotest/kotest/pull/3416](https://togithub.com/kotest/kotest/pull/3416)
- [@&#8203;erikhuizinga](https://togithub.com/erikhuizinga) made their
first contribution in
[https://github.com/kotest/kotest/pull/3497](https://togithub.com/kotest/kotest/pull/3497)

**Full Changelog**:
kotest/kotest@v5.6.1...v5.6.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/arrow-kt/arrow-website).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43NS4wIiwidXBkYXRlZEluVmVyIjoiMzUuNzUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants