* Only depend on OrderedCollections from swift-collections
Before this change, once consumers update to SwiftCollections 1.1.0 they'll pull in all of the new collection dependencies (HashTree, BitCollections, etc.). In our case, this increased our binary size by ~1MB. To fix this, we switch to only depending on what we need.
* Add DequeModule dependency
# Motivation
During the discussion in https://github.com/apple/swift-async-algorithms/issues/248 it became clear that the semantics of `throttle` are not 100% figured out yet.
# Modification
This PR is making `throttle` an underscored API for the upcoming 1.0.0 release. This gives us more time to investigate what exact semantics we want to have.
# Motivation
We added `@_implementationOnly` a little while ago to hide the dependency on the `DequeModule`. However, with recent compilers this produces a warning since `@_implementationOnly` is only intended to be used in resilient libraries.
# Modification
This PR removes the usage of `@_implementationOnly`
# Motivation
We had some scripts around to generate docs for this package but all of our other packages are now providing documentation on the Swift package index.
# Modification
This removes the old script to generate documentation and adds an `.spi.yml` file. Furthermore, I removed the conditional dependency on the docc plugin which we are unconditionally depending on in most of our other packages like NIO.
# Motivation
`@unchecked Sendable` is a great way to make a type `Sendable` while it is not really `Sendable` this is rarely useful and we should rather use conditional `@unchecked Sendable` annotations such as the one on `ManagedCriticalState`
# Modification
This PR removes all `@unchecked Sendable` in the main algorithm target except the one on `Merge` since we are doing manual locking there.
# Result
No more `@unchecked Sendable` usage.
# Motivation
Currently, the `AsyncTimerSequence` is trying to correct for when an application becomes suspended and the timer might fire multiple times once the application gets foregrounded again.
However, this is already handled by the `Clock` types themselves. The `SuspendingClock` is correcting for suspension of the app whereas the `ContinuousClock` is not.
Additionally, this was not only hit by background an application but by just calling `Task.sleep` in the for-await loop that is consuming the sequence.
# Modification
This removes the part of the code in `AsyncTimerSequence` which corrected for suspension of the application.
# Motivation
The current validation testing library has a bunch of warnings and we haven't put it through a proper API review yet. Since we are preparing for a 1.0.0, I think it is best if we remove the products for the validation targets for now and take some time to make sure the interfaces are taken through an API review.
# Modification
Remove products for the validation targets.
# Motivation
We still had some `Sendable` warnings left under strict Concurrency checking.
# Modification
This PR fixes a bunch of `Sendable` warnings but we still have some left in the validation tests. Additionally, I fixed a flaky test.
* Migrate from semaphore style testing waits to async test fulfillment
* Reduce warnings for missing hashable and comparable conformances per availability
* Reduce warnings for executor (still one known warning)
* Integrate review feedback
This integrates all of the feedback from the review thread. Here is a quick summary:
- Change the trailing separator behaviour. We are no longer returning a separator before we are forwarding the error
- Add a synchronous and asynchronous closure based `interspersed` method.
- Support interspersing every n elements
* Add AsyncThrowingInterspersedSequence
* Update examples
* Clean up old evolution proposals
# Motivation
Our old proposals had a couple of stale links and were not all aligned. This cleans them up.
* Add Interspersed proposal
# Motivation
Add a new evolution proposal for the interspersed algorithm.
# Motivation
Swift 5.8 is including a change to how `group.waitForAll()` is working. It now properly waits for all tasks to finish even if one of the tasks throws. We have used `group.waitForAll()` in multiple places and need to change this code accordingly.
# Modification
Switch code from `group.waitForAll()` to `group.next()`.
# Result
This fixes a few stuck tests that we have seen when running against development snapshots.
# Motivation
We switched the point in time when we create tasks to the first call to `next()`. This had the side effect that we can now be cancelled before we even created our task. Which by itself is fine but we didn't handle it in the state machines.
# Modification
Adapt the state machines of `debounce`, `zip`, `merge` and `combineLatest` to handle cancellation before `next()`.
# Result
We shouldn't run into these preconditions anymore.