From ffa3ff9d7f4f8fc1d4524eab7f8700f798754812 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2026 02:52:07 +0800 Subject: [PATCH] chore: bump up apple/swift-collections version to from: "1.4.1" (#14697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [apple/swift-collections](https://redirect.github.com/apple/swift-collections) | patch | `from: "1.4.0"` → `from: "1.4.1"` | --- ### Release Notes
apple/swift-collections (apple/swift-collections) ### [`v1.4.1`](https://redirect.github.com/apple/swift-collections/releases/tag/1.4.1): Swift Collections 1.4.1 [Compare Source](https://redirect.github.com/apple/swift-collections/compare/1.4.0...1.4.1) This patch release is mostly focusing on evolving the package traits `UnstableContainersPreview` and `UnstableHashedContainers`, with the following notable fixes and improvements to the stable parts of the package: - Make the package documentation build successfully on the DocC that ships in Swift 6.2. - Avoid using floating point arithmetic to size collection storage in the `DequeModule` and `OrderedCollections` modules. #### Changes to experimental package traits The new set and dictionary types enabled by the `UnstableHashedContainers` trait have now resolved several correctness issues in their implementation of insertions. They have also gained some low-hanging performance optimizations. Like before, these types are in "working prototype" phase, and while they have working implementations of basic primitive operations, we haven't done much work validating their performance yet. Feedback from intrepid early adopters would be very welcome. The `UnstableContainersPreview` trait has gained several new protocols and algorithm implementations, working towards one possible working model of a coherent, ownership-aware container/iteration model. - [`BidirectionalContainer`][BidirectionalContainer] defines a container that allows iterating over spans backwards, and provides decrement operations on indices -- an analogue of the classic `BidirectionalCollection` protocol. - [`RandomAccessContainer`][RandomAccessContainer] models containers that allow constant-time repositioning of their indices, like `RandomAccessCollection`. - [`MutableContainer`][MutableContainer] is the ownership-aware analogue of `MutableCollection` -- it models a container type that allows its elements to be arbitrarily reordered and mutated/reassigned without changing the shape of the data structure (that is to say, without invalidating any indices). - [`PermutableContainer`][PermutableContainer] is an experimental new spinoff of `MutableContainer`, focusing on reordering items without allowing arbitrary mutations. - [`RangeReplaceableContainer`][RangeReplaceableContainer] is a partial, ownership-aware analogue of `RangeReplaceableCollection`, providing a full set of insertion/append/removal/consumption operations, with support for fixed-capacity conforming types. - [`DynamicContainer`][DynamicContainer] rounds out the range-replacement operations with initializer and capacity reservation requirements that can only be implemented by dynamically sized containers. [BidirectionalContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift [RandomAccessContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift [MutableContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift [PermutableContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift [RangeReplaceableContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/RangeReplaceableContainer.swift [DynamicContainer]: https://redirect.github.com/apple/swift-collections/blob/main/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift - We now have [working reference implementations](https://redirect.github.com/apple/swift-collections/tree/main/Sources/ContainersPreview/Protocols) of lazy `map`, `reduce` and `filter` operations on borrowing iterators, producers and drains, as well a `collect(into:)` family of methods to supply "greedy" variants, generating items into a container of the user's choice. Importantly, the algorithms tend to be defined on the iterator types, rather than directly on some sequence/container -- going this way has some interesting benefits (explicitness, no confusion between the various flavors or the existing `Sequence` algorithms), but they also have notable drawbacks (minor design issues with the borrowing iterator protocol, unknowns on how the pattern would apply to container algorithms, etc.). ```swift let items: RigidArray = ... let transformed = items.makeBorrowingIterator() // obviously we'd want a better name here, like `borrow()` .map { 2 * $0 } .collect(into: UniqueArray.self) // `transformed` is a UniqueArray instance holding all values in `items`, doubled up ``` ```swift let items: RigidArray = ... let transformed = items.makeBorrowingIterator() .filter { !$0.isMultiple(of: 7) } .copy() .collect(into: UniqueArray.self) // `transformed` holds a copy of all values in `items` that aren't a multiple of 7 ``` ```swift let items: RigidArray = ... let transformed = items.consumeAll() .filter { !$0.isMultiple(of: 7) } .collect(into: UniqueArray.self) // `transformed` holds all values that were previously in `items` that aren't a multiple of 7. `items` is now empty. ``` Like before, these are highly experimental, and they will definitely change in dramatic/radical ways on the way to stabilization. Note that there is no project- or team-wide consensus on any of these constructs. I'm publishing them primarily as a crucial reference point, and to gain a level of shared understanding of the actual problems that need to be resolved, and the consequences of the design path we are on. #### What's Changed - Add some decorative badges in the README by [@​lorentey](https://redirect.github.com/lorentey) in [#​591](https://redirect.github.com/apple/swift-collections/pull/591) - \[Dequemodule, OrderedCollections] Avoid using floating point arithmetic by [@​lorentey](https://redirect.github.com/lorentey) in [#​592](https://redirect.github.com/apple/swift-collections/pull/592) - Enforce dress code for license headers by [@​lorentey](https://redirect.github.com/lorentey) in [#​593](https://redirect.github.com/apple/swift-collections/pull/593) - Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.7 to 0.0.8 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​595](https://redirect.github.com/apple/swift-collections/pull/595) - Documentation updates for latest DocC by [@​lorentey](https://redirect.github.com/lorentey) in [#​596](https://redirect.github.com/apple/swift-collections/pull/596) - \[BasicContainers] Allow standalone use of the UnstableHashedContainers trait by [@​lorentey](https://redirect.github.com/lorentey) in [#​597](https://redirect.github.com/apple/swift-collections/pull/597) - Bump swiftlang/github-workflows/.github/workflows/swift\_package\_test.yml from 0.0.7 to 0.0.8 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​594](https://redirect.github.com/apple/swift-collections/pull/594) - \[ContainersPreview] Rename Producer.generateNext() to next() by [@​lorentey](https://redirect.github.com/lorentey) in [#​599](https://redirect.github.com/apple/swift-collections/pull/599) - \[ContainersPreview] Remove BorrowingSequence.first by [@​lorentey](https://redirect.github.com/lorentey) in [#​598](https://redirect.github.com/apple/swift-collections/pull/598) - \[CI] Enable Android testing by [@​marcprux](https://redirect.github.com/marcprux) in [#​558](https://redirect.github.com/apple/swift-collections/pull/558) - \[BasicContainers] Assorted hashed container fixes and improvements by [@​lorentey](https://redirect.github.com/lorentey) in [#​601](https://redirect.github.com/apple/swift-collections/pull/601) - Flesh out BorrowingSequence/Container/Producer model a little more by [@​lorentey](https://redirect.github.com/lorentey) in [#​603](https://redirect.github.com/apple/swift-collections/pull/603) - More exploration of ownership-aware container/iterator algorithms by [@​lorentey](https://redirect.github.com/lorentey) in [#​605](https://redirect.github.com/apple/swift-collections/pull/605) #### New Contributors - [@​marcprux](https://redirect.github.com/marcprux) made their first contribution in [#​558](https://redirect.github.com/apple/swift-collections/pull/558) **Full Changelog**:
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- .../frontend/apps/ios/App/Packages/Intelligents/Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved index ad3a119025..64027ac1ab 100644 --- a/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections", "state" : { - "revision" : "8d9834a6189db730f6264db7556a7ffb751e99ee", - "version" : "1.4.0" + "revision" : "6675bc0ff86e61436e615df6fc5174e043e57924", + "version" : "1.4.1" } }, { diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift index 221a11d2e8..4e240a4622 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift @@ -17,7 +17,7 @@ let package = Package( .package(path: "../AffineGraphQL"), .package(path: "../AffineResources"), .package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.23.0"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.4.0"), + .package(url: "https://github.com/apple/swift-collections.git", from: "1.4.1"), .package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.7.1"), .package(url: "https://github.com/SwifterSwift/SwifterSwift.git", from: "6.2.0"), .package(url: "https://github.com/Recouse/EventSource.git", from: "0.1.7"),