Check that next() and reduce(into:_:) over the mapped producer rethrow
the transform's error, stop calling it after it throws, pass on only
items mapped before the failure, in order, and leak nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check that reduce(_:_:) and reduce(into:_:) rethrow the closure's error,
stop calling it after it throws, and leak nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- withEveryDeque/withEveryFullDeque now visit capacity 0.
- checkEquatable reports transitivity violations instead of trapping
when pairs arrive out of order (non-transitive oracles, maxSamples).
- Minimal range-replaceable collections no longer trap in removeLast()
and popLast().
- LifetimeTracked's "Double deinit" precondition can now fire.
- withEvery, withEveryRange and withSomeArrayLayouts include the
failing value in their "Throwing trace".
- CustomCountedProducer drops its unused chunkSize parameter, and the
two loops that reran identical cases over it are removed.
Adds regression tests for the first three.
Fixes#810
- Define a separate `filter` result on Iterable vs BorrowingIteratorProtocol
- Fix handling of delimited iterators in Container.filter
- Add fixmes for throwing
- Inlinability and other small fixes
Run the bidirectional container checker against BidirectionalContainer's
default implementations. With #793's formIndex(_:offsetBy:limitedBy:)
fix reverted, it fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This noticeable simplifies client code, as clients invariably want to fully populate their buffer (when possible). It also is consistent with the semantics of `Iterable.skip(by:)`.
- Move `InputSpan` into its own module, `SpanPreview`. Add dependencies to it.
- Invert dependencies to `ContainersPreview`, so that no production target imports it, but it now depends on its previous dependents.
- Move all generic APIs and conformances using `Producer`/`Drain`/`Container` to the `ContainersPreview` module.
- Remove `UnstableContainersPreview` conditions around `Iterable` APIs
In summary, importing `BasicContainers` and `DequeModule` continue to get us the basic definitions for `RigidArray`, `UniqueSet`, `RigidDeque` etc., without most of their unstable APIs. (With the exception of core APIs that require `InputSpan`.)
To get any API that uses an unstable protocol like `Container` or `Drain`, we’ll now need to import `ContainersPreview` in addition to the type-defining module.
This will provide a slightly less horrible migration path when (if) the container/producer protocol family gets adopted/adapted into the stdlib.
This is preparing for switching over to the stdlib’s definition of `protocol Iterable`, assuming it will land with macOS 27/iOS 27 etc availability; `Container` is refining `Iterable`, so it needs matching availability.
If `Iterable` won’t ship in Swift 6.4, then we’ll need to bump this again.
- UniqueBox is public API, so we cannot remove it in favor of the stdlib’s
- Remove Ref and MutableRef. Keep an internal _MutableRef to work around stdlib limitations.
Package traits already pass defines with their trait name when building. Instead of adding our own conditional defines based on the traits we can use the trait provided defines directly. I observed that various tooling behaves better with the trait provided defines.
Adds trailing underscores to the BorrowingSequence protocols and
requirements, in order to allow both parallel conformances and
the ability to evolve the requirements in this package.
“Work” in this case means that they can be enabled without breaking the build — not necessarily that all features are available.
Swift 6.2 is highly prone to runtime crashes in `swift_getTypeByMangledName` in generic code that uses ownership features. Swift 6.3 will resolve that.