wjdtjq6
62a08e503e
docs: fix typos in doc comments and DocC article
2026-07-02 21:17:11 +09:00
Karoy Lorentey
3d68fc1107
Clean up the UniqueBox/Ref/MutableRef situation
...
- 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.
2026-06-17 18:29:41 -07:00
Karoy Lorentey
bced34defa
Review error handling
2026-06-17 18:24:03 -07:00
Karoy Lorentey
85cdb77d25
Fix build issues
2026-06-17 16:17:36 -07:00
Nate Cook
dca015d7e8
Align Iterable with proposal
...
Adds throwing and ~Escapable elements
2026-06-17 14:27:29 -07:00
Nate Cook
4bda43f4a9
Renaming BorrowingSequence_ to Iterable_
2026-06-17 14:27:29 -07:00
Karoy Lorentey
c38e47d03e
[BasicContainers, DequeModule] Avoid using deprecated API
2026-05-07 16:17:20 -07:00
Karoy Lorentey
16d6b8e1fe
[ContainersPreview] Inout ⟹ MutableRef
2026-05-06 18:28:07 -07:00
Karoy Lorentey
a6fd64697a
[ContainersPreview] Borrow ⟹ Ref
...
Also update the type’s public API surface to reflect SE-0519, leaving deprecated aliases for the old names.
2026-05-06 18:00:13 -07:00
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
022795168a
[BasicContainers] Enable APIs scheduled to ship in 1.5.0
...
- `RigidArray.nextMutableSpan(after:maximumCount:)`
- `UniqueArray.nextMutableSpan(after:maximumCount:)`
- `RigidDeque.nextMutableSpan(after:maximumCount:)`
- `UniqueDeque.nextMutableSpan(after:maximumCount:)`
- `UniqueArray.init(minimumCapacity:)` (replacing `.init(capacity:)`)
- `UniqueDeque.init(minimumCapacity:)` (replacing `.init(capacity:)`)
- `RigidDeque.index(before:)`
- `UniqueDeque.index(before:)`
- `RigidDeque.formIndex(before:)`
- `UniqueDeque.formIndex(before:)`
2026-05-05 16:01:31 -07:00
Karoy Lorentey
cd0ca78dbd
[DequeModule] Assorted UniqueDeque doc string fixes
2026-04-27 18:10:26 -07:00
Karoy Lorentey
4225f78a2b
[DequeModule]: UniqueDeque.insert(addingCount:at:initializingWith:): Add empty shortcut
2026-04-27 18:01:24 -07:00
Karoy Lorentey
c068f8ccb7
[DequeModule] UniqueDeque replacements with Collections: Verify that the source’s count matches its contents
2026-04-27 18:01:24 -07:00
Karoy Lorentey
2c86775a6b
[DequeModule] UniqueDeque.replace(removing:addingCount:initializingWith:): Fix sizing issue
2026-04-27 18:01:24 -07:00
Karoy Lorentey
30f28dcdcb
[DequeModule] RigidDeque.consume(_:consumingWith:): Style nit: consume span explicitly
2026-04-27 18:01:24 -07:00
Karoy Lorentey
f5661c674a
[DequeModule] insert(addingCount:initializingWith:): Add shortcut for zero elements
2026-04-27 18:01:23 -07:00
Karoy Lorentey
285016b285
[DequeModule] RigidDeque replacements with Collections: Verify that the source’s count matches its contents
2026-04-27 18:01:23 -07:00
Karoy Lorentey
1d5418fb68
[DequeModule] RigidDeque.prepend(addingCount:initializingWith:): Add shortcut for zero elements
...
This was already present in the append variant; there is no reason not to do the same here.
2026-04-27 18:01:23 -07:00
Karoy Lorentey
5342399a18
[DequeModule] Fix small issues in doc strings
2026-04-27 18:01:23 -07:00
Karoy Lorentey
0be6f43972
[DequeModule] RigidDeque.nextMutableSpan(after:maximumCount:): Fix missing argument validation
2026-04-27 17:25:50 -07:00
Karoy Lorentey
654d57533f
[DequeModule] RigidDeque.consume(_:consumingWith:): Close resulting gap before returning
2026-04-27 17:18:05 -07:00
Karoy Lorentey
35b7d8fba4
Fix lifetime requirements rigidly enforced in the latest nightlies
2026-04-03 17:01:36 -07:00
Karoy Lorentey
597b7a7dd2
Revert most of the availability constraints from 419e2f and 4c0482 🎉
2026-03-27 11:25:43 -07:00
Nate Cook
a99a015934
Disambiguate ContainersPreview and stdlib
...
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.
2026-03-27 07:41:32 -05:00
Karoy Lorentey
d2d3b917ca
[BasicContainers, ContainersPreview, DequeModule] More SuppressedAssociatedTypesWithDefaults fixups
2026-03-26 18:12:41 -07:00
Karoy Lorentey
419e2f7df2
[ContainersPreview] Exhibit A in the case against prototyping things in the stdlib 😞
2026-03-26 17:14:45 -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
a8389f300a
[BasicContainers, DequeModule] Avoid defining new API in a point release
...
Stash them behind the UnstableContainersPreview package trait for now (making them non-public API).
2026-03-17 16:33:20 -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
6bbed0e1e2
[ContainersPreview] Conform [Unique,Rigid]Array and [Unique,Rigid]Deque to container protocols
2026-03-17 13:13:42 -07:00
Karoy Lorentey
cde6e86f4f
[ContainersPreview] Underscore elementsEqual for now, to avoid ambiguity with the Sequence method
2026-03-13 09:14:15 -07:00
Karoy Lorentey
63030a3530
Merge pull request #599 from lorentey/generateNext-to-next
...
[ContainersPreview] Rename Producer.generateNext() to next()
2026-03-09 16:37:58 -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
80878519f2
[doc] Fix most issues reported by docc
...
DocC keeps changing its link syntax. The latest iteration appears to have trouble dealing with `Self`-taking or `Self`-returning methods, so change our API to replace `Self` with a direct mention of the concrete type. ¯\\\_(ツ)\_/¯
That said, the new compiler also found a large number of mismatching parameter names, and that was really helpful.
2026-03-09 14:14:51 -07:00
Karoy Lorentey
ee9808c72f
[Dequemodule, OrderedCollections] Avoid using floating point arithmetic
2026-03-06 18:19:16 -08:00
Karoy Lorentey
1c69635852
Add SPDX-License-Identifier tags
2026-03-05 19:39:24 -08:00
Karoy Lorentey
d9b09ecde8
Update copyright dates
2026-03-05 19:39:20 -08:00
Nate Cook
54ca53612f
Include notes about index mutation in span(after/before:)
...
The indexes passed to span(after:) and friends on UniqueArray
and RigidArray are modified before return. This adds notes
about the updated values to the method documentation, along
with a few other minor formatting changes (dropping smart
quotes, single-sentence abstracts).
2026-03-02 16:38:48 -08:00
Karoy Lorentey
6e496a9512
[DequeModule] Review bulk insertion/append/prepend/replace operations
2026-02-27 18:02:06 -08:00
Karoy Lorentey
50978111dc
Merge pull request #573 from lorentey/hashing-with-ownership
...
Ownership-aware Set and Dictionary variants
2026-02-27 15:55:13 -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
a14f9eb61c
[BasicContainers] Add missing imports of ContainersPreview
2026-02-23 13:56:38 -08:00
Karoy Lorentey
3e505b97bb
Merge pull request #575 from lorentey/validate-maximumCount
...
[RigidArray, RigidDeque].nextSpan: Validate `maximumCount`
2026-02-16 17:21:24 -08:00
Karoy Lorentey
934ad786d2
Merge pull request #570 from lorentey/remove-outputspan-workaround
...
Remove workaround for bug in OutputSpan.wUMBP
2026-02-16 17:14:44 -08:00
Karoy Lorentey
621374557c
Array, Deque types: Introduce _checkItemIndex, _checkValidIndex, _checkValidBounds
2026-02-16 17:05:36 -08:00
Karoy Lorentey
ac7a8bf61b
[RigidArray, RigidDeque].nextSpan: Validate maximumCount
...
`nextSpan(after:,maximumCount:)` failed to validate that `maximumCount > 0`, potentially allowing out-of-bounds access.
2026-02-16 15:54:49 -08:00
Karoy Lorentey
b21316ea08
[DequeModule] Add some top-level RigidDeque/UniqueDeque docs
2026-02-09 17:28:31 -08:00
Karoy Lorentey
8ef702c8a5
Remove workaround for OutputSpan.wUMBP bug
2026-02-05 17:07:03 -08:00
Karoy Lorentey
35e09984f5
[doc] Add missing colon after “Parameters”
2026-02-05 16:48:05 -08:00