117 Commits
Author SHA1 Message Date
Sandeep Vijayarao 0165c6e71c Use LifetimeTracked in the trailing elements tests 2026-11-16 18:10:52 -08:00
Karoy Lorentey f17980c2c5 Stop using @_addressableForDependencies 2026-11-05 16:29:46 -08:00
Karoy Lorentey e13f175180 Review RigidDeque/UniqueDeque tests; add better tests for prepends 2026-10-26 18:01:57 -07:00
Karoy Lorentey 891f7b6b8d Package: Stop enabling obsolete BorrowingSequence feature
Also, don’t enable SuppressedAssociatedTypesWithDefaults below Swift 6.4.
2026-10-12 12:24:56 -07:00
Karoy Lorentey 1b936eda0b Disable strict memory safety on older toolchains
It would take too much effort to try to mitigate stdlib differences.

Fix low-hanging warnings, but turn off `.strictMemorySafety` on older toolchains by splitting the package manifest.
2026-10-01 13:40:27 -07:00
Karoy Lorentey 13f71ad927 Enable strict memory safety 2026-09-30 20:40:09 -07:00
Karoy Lorentey 08bbdd3def Reinstate exported imports in Collections module 2026-09-01 13:46:05 -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 669eb09cea Use Iterable from the Standard Library, replacing the local definition 2026-07-27 13:32:46 -07:00
Karoy Lorentey 3ba8d70ec3 Review and update container protocols and conformances
- @inlinable → @_alwaysEmitIntoClient for now, to avoid temporary ABI issues
- Review RangeReplaceableContainer algorithms; add missing ones:
    - New requirements: `removeFirst()`, `removeFirst(_:)`, `_customRemoveLast()`, `_customRemoveLast(_:) (with default implementations)
    - `func removeAll()`
    - `func removeLast()`, `func removeLast(_:)`, `func popLast()` when self is also bidirectional
- Review RigidArray, UniqueArray algorithms; remove ones needlessly duplicating functionality already provided by RRC. Try not to break source compatibility.
2026-07-07 14:18:09 -07:00
Karoy Lorentey e8b09ade25 Add subscript requirements to [Mutable]Container with borrow/mutate accessors 2026-06-22 20:10:22 -07:00
Karoy Lorentey f5b320c29f Merge pull request #657 from natecook1000/iterable 2026-06-17 19:08:16 -07: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 f37fe8e662 Define SwiftStdlib 6.4 with actual version numbers 2026-06-17 14:57:06 -07:00
Karoy Lorentey c9b859dfda Don’t enable UnstableContainersPreview trait by default 2026-06-17 14:52:31 -07:00
Nate Cook dca015d7e8 Align Iterable with proposal
Adds throwing and ~Escapable elements
2026-06-17 14:27:29 -07:00
Karoy Lorentey c3ba833517 Add basic tests for Collections module 2026-05-15 16:57:22 -07:00
Karoy Lorentey 3614f74e05 Clean up package manifest 2026-05-07 16:24:37 -07:00
Karoy Lorentey f196269e7f Define placeholder availability macro for SwiftStdlib 6.5 2026-05-07 16:16:34 -07:00
Karoy Lorentey f83bd74aea Move FormatterFixtures into a nested package 2026-05-07 16:15:02 -07:00
Karoy Lorentey 18c58bcca4 [ContainersPreview] Ref: Disable Builtin.Borrow for now 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 9364ee33b1 Merge pull request #607 from kastiglione/Debugging-Add-lldb-data-formatter-for-RigidArray
[Debugging] Add lldb data formatter for RigidArray
2026-04-30 17:35:23 -07:00
Dave Lee edf640d5dc Add lldb integration test 2026-04-30 12:48:16 -07:00
Nate Cook efdc1bbd96 Remove BorrowingSequence experimental feature flag
This prevents accidental usage of the experimental stdlib feature,
where the library's implementation is intended instead.
2026-03-27 10:56:44 -05: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
Nate Cook 23dffb280e Use correct suppressed associated types flag 2026-03-26 14:25:01 -05: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
Karoy Lorentey ffdc48e67e [BasicContainers] Finalize requirements for hashed containers
- UnstableNoncopyableKeys → UnstableHashedContainers
- Delete the GeneralizedEquatable and GeneralizedHashable protocols, replacing them with the standard generalizations in the 6.4 stdlib
- Require Swift 6.4 for {Rigid,Unique}{Set,Dictionary}.
2026-03-03 16:01:45 -08:00
Karoy Lorentey 6ca3b59890 [manifest] Define SwiftStdlib 6.3 2026-02-27 18:05:24 -08:00
Karoy Lorentey bf9a7033a0 [BasicContainers] Add early drafts for RigidSet/RigidDictionary 2026-02-16 17:15:59 -08:00
Karoy Lorentey cd309d5a1f Speed up testing by default 2026-01-20 10:54:31 -08:00
Karoy Lorentey cda49ed5a8 Merge remote-tracking branch 'origin/main' into all-hands-on-deque
# Conflicts:
#	Sources/InternalCollectionsUtilities/UnsafeMutableBufferPointer+Extras.swift
2026-01-17 00:20:32 -08:00
Karoy Lorentey 67abaf5182 Replace Container with a far less powerful (but more universal) Iterable construct
I’m hoping Container will return later.
2026-01-08 17:28:23 -08:00
Alejandro Alonso 3975774393 wip 2025-10-23 15:05:12 -07:00
Karoy Lorentey ab649ca5fc Add new package trait UnstableSortedCollections
This re-enables the SortedCollections for easi(er) experimentation.

The module remains source unstable — it may go away entirely or it may receive arbitrary source-breaking changes in any new swift-collections release, with no special pre-announcement.
2025-10-02 17:00:32 -07:00
Karoy Lorentey bb8d566833 Adopt package access modifier and get rid of gybbing 2025-09-29 11:56:14 -07:00
Karoy Lorentey 1dc2b7717f Revert "Don’t allow backdeployment of any Span types below the most recent Darwin OS releases"
This reverts commit 485e69bfb1.

# Conflicts:
#	CMakeLists.txt
2025-09-27 12:15:30 -07:00
Karoy Lorentey 3a4dba97b5 Don’t set TrailingElementsModule as a dependency of Collections
We are not reexporting this from the top-level `Collections` module.
2025-09-26 22:38:18 -07:00
Karoy Lorentey 485e69bfb1 Don’t allow backdeployment of any Span types below the most recent Darwin OS releases
References to Span types trigger an issue where SwiftPM isn’t able to run command line executable targets or tests on older OSes.

Set the availability of everything that needs span types to the most recent Apple OS releases.

Hopefully we’ll be able to revert this once we figure out a better workaround.
2025-09-26 22:38:18 -07:00
Karoy Lorentey db092b7de9 Disable container preview trait while we’re debugging a runtime crash 2025-09-26 18:40:00 -07:00
Karoy Lorentey 2ae7f11ecf Add draft version of borrowable Container protocol 2025-09-26 18:40:00 -07:00
Karoy Lorentey c5059a58aa Merge pull request #516 from lorentey/container-previews-1
Containers: Naming updates, minor tweaks
2025-09-17 15:59:29 -07:00
Doug Gregor 2e7fb3e12a Add "trailing elements" module with facilities for tail-allocated storage
Introduce new types `IntrusiveManagedBuffer` and `PaddedStorage` that
consist of a fixed-sized header followed by variable-sized storage. The
design of these types is inspired by the existing `ManagedBuffer` type
in the standard library, but has been adjusted both to make them
non-copyable and to eliminate the requirement for heap allocation.
2025-09-05 15:52:27 -07:00
Karoy Lorentey 7a4e26b4c3 Renaming: DynamicArray → UniqueArray; ArrayModule → BasicContainers 2025-09-04 15:26:13 -07:00
Karoy Lorentey f679ec91b5 [ArrayModule] Add new module with RigidArray and DynamicArray 2025-08-17 13:33:39 -07:00
Karoy Lorentey c4433dd90c Add ContainersPreview module with struct Box 2025-08-17 13:33:29 -07:00
Karoy Lorentey a0417c18ea Add unsafe primitives for overriding lifetime dependencies 2025-08-17 13:33:28 -07:00