Commit Graph
14 Commits
Author SHA1 Message Date
Franz Busch 3c373b900c Use the defines from traits directly
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.
2026-05-06 07:41:02 -07:00
Karoy Lorentey f652543a50 [ContainersPreview] Producer.ProducerError ⟹ Producer.Failure
Reserving a unique name for Producer’s failure type seems unwise, especially if we end up Producer refining a throwing BorrowingSequence protocol.
2026-04-30 13:31:28 -07:00
Karoy Lorentey 75b0309e12 Producer.skip(upTo:) → .skip(by:)
This is to align naming with BorrowingIteratorProtocol. The signatures are still different, as Producers may throw.
2026-03-27 11:52:05 -07:00
Karoy Lorentey eb708a9ba5 [ContainersPreview] Audit some protocol extensions for SuppressedAssociatedTypesWithDefaults 2026-03-26 16:05:07 -07:00
Karoy Lorentey 70a25f1f69 [ContainersPreview] Bump required toolchain to 6.4 for new protocols 2026-03-26 14:51:08 -07:00
Karoy Lorentey 8f88cce7c7 [BasicContainers, ContainersPreview] Make sure package traits “work” on 6.2 toolchains
“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.
2026-03-17 15:38:34 -07:00
Karoy Lorentey bf18a48983 [ContainersPreview] Spin off Producer.collect algorithms into a separate file for easy lookups 2026-03-13 10:41:04 -07:00
Karoy Lorentey c4760ec21a [ContainersPreview] Flesh out container protocols a little more; add algorithms
(This is all untested, unproven code)
2026-03-13 10:30:49 -07:00
Karoy Lorentey 3826fe76a8 [ContainersPreview] Rename Producer.generateNext() to next()
This better highlights the symmetry between it and the classic method on `IteratorProtocol`, and is also a nice usability win.
2026-03-09 16:22:24 -07:00
Karoy Lorentey 1c69635852 Add SPDX-License-Identifier tags 2026-03-05 19:39:24 -08:00
Karoy Lorentey 4452b1c960 [ContainersPreview] Mark ProducerError as a primary associated type of Producer 2026-02-24 16:41:31 -08:00
Karoy Lorentey 9503f8fe57 Improve consistency of precondition failure messages
More uniform message strings should feel better, and they should ever so slightly reduce code size.
2026-02-04 10:27:17 -08:00
Karoy Lorentey 70a36c2c47 RigidDeque: Another iterative design pass on deque operations
- Adopt and embrace Drain and Producer to simplify moving data in and out of deques.
- Fully generalized core range replacement primitive using higher-order functions based around InputSpan and OutputSpan
2026-01-25 16:42:40 -08:00
Karoy Lorentey e4aba4c1c9 Iterable → BorrowingSequence, BorrowIterator → BorrowingIterator 2026-01-25 16:42:37 -08:00