17 Commits
Author SHA1 Message Date
Karoy Lorentey daeac4ebb8 Stop catering to toolchains older than Swift 6.2 2026-11-05 17:40:50 -08:00
Karoy Lorentey 1522a8a85d RigidArray, UniqueArray: Deprecate ancient span methods 2026-10-21 19:39:43 -07:00
Karoy Lorentey 842f125c47 Invert dependencies to ContainersPreview, moving all container APIs there
- 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.
2026-08-25 18:29:58 -07:00
Karoy Lorentey 28e9d98a7e Fix deprecation warnings 2026-06-17 13:48:54 -07:00
Alejandro Alonso 06423d7329 Fix broken docs 2026-06-17 13:48:54 -07:00
Alejandro AlonsoandKaroy Lorentey 2a39308613 Update Sources/BasicContainers/UniqueArray/UniqueArray.swift
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2026-06-17 13:48:54 -07:00
Alejandro Alonso 6da58357a3 Rename reallocate to setCapacity for Rigid and UniqueArray
Update UniqueArray.swift

Update UniqueArray.swift
2026-06-17 13:48:53 -07:00
Karoy Lorentey 50f93dd05f [BasicContainers] Fix copypasta in UniqueArray.edit’s docs 2026-05-05 16:18:11 -07:00
Karoy Lorentey 1c69635852 Add SPDX-License-Identifier tags 2026-03-05 19:39:24 -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 b21316ea08 [DequeModule] Add some top-level RigidDeque/UniqueDeque docs 2026-02-09 17:28:31 -08:00
Karoy Lorentey b9fd3ed56e RigidArray, UniqueArray: Move remaining deprecations to dedicated file 2026-02-05 16:46:14 -08:00
Karoy Lorentey b768d22393 [BasicContainers] RigidArray, UniqueArray: “precisely once” → “at most once”
Loosen guarantees about how many times closure arguments are getting called, so that e.g. insertions of zero items do not necessarily need to call their callback with an empty OutputSpan.

(For these array types we can reinstate the guarantee later, if it turns out to be important/useful. However, the generalized primitives will need to allow their callbacks to get called an arbitrary number of times, and it seems useful to establish that (at least partially) with these simple array types too.)
2026-02-04 10:09:00 -08:00
Karoy Lorentey 99da8a72e0 [BasicContainers] RigidArray, UniqueArray: Add formIndex(before:) 2026-02-03 15:10:11 -08:00
Karoy Lorentey 1e310e2908 [BasicContainers] RigidArray, UniqueArray: Rename copy() → clone() 2026-02-03 13:20:48 -08:00
Karoy Lorentey 3d4423f33e [BasicContainers] RigidArray, UniqueArray: Gather all public initializers into the same source file 2026-02-03 13:20:09 -08:00
Karoy Lorentey 0c376aceb6 [BasicContainers] Move array implementations into subdirectories
(This sets the stage for more data structures in BasicContainers)
2026-02-03 13:05:03 -08:00