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

Implement the async variant of toEventually using structured concurrency #1079

Merged
merged 6 commits into from
Sep 13, 2023

Conversation

younata
Copy link
Member

@younata younata commented Aug 21, 2023

This replaces the Dispatch-based version of async toEventually with one that uses native Swift Concurrency components This was done to eliminate the chance that the matcher could be polled more than one at a time, and to also make way for future Sendable requirements.

This is a drop-in replacement for the Dispatch-Based approach to the async variant.

The PR should summarize what was changed and why. Here are some questions to
help you if you're not sure:

  • What behavior was changed?
  • What code was refactored / updated to support this change?
  • What issues are related to this PR? Or why was this change introduced?

Checklist - While not every PR needs it, new features should consider this list:

  • Does this have tests?
  • Does this have documentation?
  • Does this break the public API (Requires major version bump)?
  • Is this a new feature (Requires minor version bump)?

... mostly.

This replaces the Dispatch-based version of async toEventually with one that uses native Swift Concurrency components
This was done to eliminate the chance that the matcher could be polled more than one at a time, and to also make
way for future Sendable requirements.
…protocol

This allows us to longer have to verify time intervals in test, removing a source of test flakiness
@younata younata merged commit 3f9773e into main Sep 13, 2023
12 of 13 checks passed
@younata younata deleted the native_async_toeventually branch September 13, 2023 04:34
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Sep 18, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Quick/Nimble](https://github.com/Quick/Nimble) | minor | `from:
"12.2.0"` -> `from: "12.3.0"` |

---

### Release Notes

<details>
<summary>Quick/Nimble (Quick/Nimble)</summary>

### [`v12.3.0`](https://github.com/Quick/Nimble/releases/tag/v12.3.0)

[Compare
Source](https://github.com/Quick/Nimble/compare/v12.2.0...v12.3.0)

#### Highlights

- the async variant of `toEventually` no longer kicks off unstructured
background tasks to check that the matcher matches. This means that
there will no longer be the possibility that the same value will be
being checked by multiples of the same matcher.

#### What's Changed

- Bump activesupport from 7.0.4.3 to 7.0.7.2 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/Quick/Nimble/pull/1080](https://github.com/Quick/Nimble/pull/1080)
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/Quick/Nimble/pull/1081](https://github.com/Quick/Nimble/pull/1081)
- Implement the async variant of toEventually using structured
concurrency by [@&#8203;younata](https://github.com/younata) in
[https://github.com/Quick/Nimble/pull/1079](https://github.com/Quick/Nimble/pull/1079)
- Fix all swiftlint warnings by
[@&#8203;younata](https://github.com/younata) in
[https://github.com/Quick/Nimble/pull/1085](https://github.com/Quick/Nimble/pull/1085)

**Full Changelog**:
Quick/Nimble@v12.2.0...v12.3.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

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

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant