Update dependency apple/swift-collections to from: "1.7.1" - #67
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/apple-swift-collections-1.x
branch
from
September 26, 2026 03:08
d1619ad to
50cffe7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
from: "1.1.4"→from: "1.7.1"Release Notes
apple/swift-collections (apple/swift-collections)
v1.7.1: Swift Collections 1.7.1Compare Source
This is a patch release that ships a workaround for a Swift 6.4 defect that prevents code that uses the package from deploying before macOS/iOS 27 (#733), alongside fixes for a handful of other bugs uncovered since 1.7.0.
What's Changed
Refin Swift 6.4 by @lorentey in #739New Contributors
Full Changelog: apple/swift-collections@1.7.0...1.7.1
v1.7.0: Swift Collections 1.7.0Compare Source
This is a feature release raising the minimum required toolchain to Swift 6.2. It formalizes
Equatable/Hashableconformances on the ownership-aware container types, adds a new stableOrderedSetoperation, and continues to develop the experimental ownership-aware container model behind theUnstableContainersPreviewtrait. It also includes a number of performance improvements and bug fixes.New stable APIs
OrderedCollectionsOrderedSet.replace(at:with:)replaces the member at a given index with a new element, returning the element that was removed. Replacing a member with an element that already exists elsewhere in the set is a runtime error. Expected amortized O(1) complexity. (#669)BasicContainers,DequeModuleOn a Swift 6.4 or later toolchain,
RigidArray,UniqueArray,RigidDeque,UniqueDeque,RigidSet,UniqueSet,RigidDictionary, andUniqueDictionarynow formally conform toEquatableandHashable. (The underlying==andhash(into:)members were already available in 1.6.0; what is new is the conformances themselves.) Building with Swift 6.2 or 6.3 still gets you the==/hash(into:)members, but no conformances.RigidDeque.isTriviallyIdentical(to:)andUniqueDeque.isTriviallyIdentical(to:)are now available for every element type, including noncopyable ones. Previously these requiredElement: Equatable.New spelling for the capacity, cloning, and range-replacement operations; see Renamed APIs below. The new names are the stable spelling going forward; the old ones remain as deprecated shims.
Collectionsumbrella moduleThe
Collectionsmodule is back to re-exporting its constituent modules with@_exported import, instead of restating each type as apublic typealias(#716). A singleimport Collectionstherefore now brings in the entire contents ofBitCollections,DequeModule,HashTreeCollections,HeapModule, andOrderedCollections— including types that previously were not exposed in theCollectionsmodule, such asRigidDequeandUniqueDeque. This allowsimport Collectionsto work even for clients that haveMemberImportVisibilityenabled.Renamed APIs
BasicContainersandDequeModuleare stable modules, so every rename below ships with a deprecated shim carrying@available(*, deprecated, renamed:). Existing code keeps compiling, and Xcode/swift buildwill offer fix-its.reallocate(capacity:)setCapacity(_:)copy()clone()copy(capacity:)clone(capacity:)UniqueDeque.init(capacity:)init(minimumCapacity:)replace(_:with:)and friendsreplaceSubrange(_:copying:)/(_:moving:)/(_:consuming:)replace(_:count:initializingWith:)replaceSubrange(_:addingCount:initializingWith:)append(count:initializingWith:)append(addingCount:initializingWith:)insert(count:at:initializingWith:)insert(addingCount:at:initializingWith:)nextSpan(after:maximumCount:)nextSpan(after:maxCount:)nextMutableSpan(after:maximumCount:)nextMutableSpan(after:maxCount:)previousSpan(before:maximumCount:)previousSpan(before:maxCount:)RigidSet.insert(count:initializingWith:)insert(addingCount:initializingWith:)RigidSet.insert(count:from:)insert(addingCount:from:)Most of the new names sync this package with the API names recently adopted in the Standard Library in
IterableandUniqueArray.Performance improvements
BitSet.countis roughly 3× faster. (#702)_Word.allBitsis now@inlinable, which unblocks specialization in severalbit-twiddling paths. (#704)
OrderedSet.reverse()now reverses the hash table in place instead ofrebuilding it from scratch. (#668)
UniqueArrayno longer performs duplicate bounds checks on subscript andmutation paths. (#699)
RigidArray's internal representation was split from a(buffer pointer, count)pair into separate pointer, capacity, and count fields. This exposes an unused bit pattern for the compiler to use for representing nil values in optional wrapped arrays, avoiding having to add an out-of-line discriminator. The representation ofRigidDictionarywasadjusted in a similar way. (#692, #717)
Dequeand theTreeSet/TreeDictionarytypes are no longer using amalloc_sizeto make use of any "extra" storage allocated. (#700)OrderedDictionary.replaceElementnow usesexchange(_:with:)on its equal-key path to avoid copying the outgoing value. (#688, #703)RigidDictionarynow stores a sentinel value rather thannilfor its values pointer, removing a branch from value access.Notable bug fixes
BitCollections:BitSet.isEqualSet(to:)returned the wrong result when given an emptyRange<Int>. A non-empty bit set incorrectly compared equal to an empty range. (#718)SortedCollections(UnstableSortedCollectionstrait):SortedDictionary.Keys,.Values, and.SubSequencehad inverted==implementations, so equal instances compared unequal and vice versa.SubSequenceequality also now uses tuple comparison rather than an element-by-element loop with the wrong short-circuit. (#697)_UniqueCollectionfast paths inBitSet.isEqualSet(to:),OrderedSet.isEqualSet(to:),TreeSet.isEqualSet(to:), andTreeSet.symmetricDifference(_:)rely on dynamic conformance checks, which are unavailable in embedded Swift. They are now compiled out with#if !$Embedded. (#715)Experimental container protocols (
UnstableContainersPreviewtrait)This is the first swift-collections release that ships a fully operational container protocol hierarchy, including some massive updates. However, things are still subject to change, and we expect to need to make breaking changes as we gain experience using the new constructs. Nothing under this trait is stable API, and source-breaking changes land without deprecations.
New:
Documentation/Container-design.mdis a work-in-progress document describing the container design implemented in theContainersPreviewmodule. As of the 1.7.0 release, it explains some of the design decisions behind the container protocols, up to and includingMutableContainer. (TheProducerhierarchy and the range-replaceable container protocol family is not yet fully covered; we expect those parts to be fleshed out later.)New
SpanPreviewmoduleInputSpanhas moved out ofContainersPreviewinto a newSpanPreviewmodule.SpanPreviewholds span-adjacent primitives that are expected to graduate to the standard library, and it is entirely empty unless theUnstableContainersPreviewtrait is enabled. It also ships basicMutableSpan/OutputSpanhelpers for producing and consumingInputSpans.Some core APIs on the container types require the use of
InputSpan, and this change lets these APIs continue to live in their defining module.SpanPreviewis explicitly not part of the package's stable public API, as we expect to soon replace it with the Standard Library's ownInputSpandefinition.Dependency inversion
ContainersPreviewand the concrete container modules have swapped places in the dependency graph.BasicContainersandDequeModuleno longer depend onContainersPreview; insteadContainersPreviewdepends on them, and allcontainer conformances for the concrete types now live there, under
Sources/ContainersPreview/Conformances/. (842f125c)Source-breaking for trait adopters: getting
Container(etc.) conformances forRigidArray,UniqueArray,RigidDeque,UniqueDeque,RigidSet, orUniqueSetnow requiresimport ContainersPreview. Importing justBasicContainersorDequeModulegets you the types and their intrinsic operations, but not the protocol conformances.Standard library adoption
BorrowingSequence_/BorrowingIteratorProtocol_protocols have been replaced by the standard library'sIterableandBorrowingIteratorProtocol. The package's own definitions have been removed. (#657)RefandMutableRefnow ship in the Standard Library rather than being declared inContainersPreview. (UniqueBoxis part of the package's stable API, so its definition continues to remain available. We expect to deprecate it in a future package release.)New protocols
RangeReplaceableContainerinto the new parent protocolDrainableContainer. This protocol models containers supporting partial in-place consumption (and removal) of their contents. Range-replacement operations now all return indices to the subranges they affected, so that we can perform insertions/removals without losing our place in the container. (This is particularly important for linked lists and similar linked data structures capable of performing O(1) insertions/removals.) (#723)CountedProducerrefinesProduceradding a precise count of remaining elements.Drainnow refinesCountedProducer.ContainerDrainrefinesDrainto allow retrieving a valid index after the items have been drained.RangeExpression2now refines the standardRangeExpression, so that we can use the standard range expression notation over container types. (The name (as well as the protocol itself) is a placeholder, so that we have something that works while we are looking for a better solution.) (#22a94a97)Reworked core requirements
Container's core primitive is nownextSpan(after:maxCount:limitedBy:), with optional delimiter arguments; thebidirectional counterpart is
spanBoundary(before:maxDistance:limitedBy:).ContainergainedmakeBorrowingIterator(from:),makeBorrowingIterator(from:to:), andcurrentIndex(of:)requirements.Containernow expects its indices to beComparableagain, as we have found a way to provide them in conforming linked list types. (#727)[Mutable]Containergained subscript requirements expressed with borrow and mutate accessors.Producer.generate(into:)switched to saturating semantics — it now fills the destination when possible, unless it reaches its end or throws. (#728)New algorithms
MutableContainergained bulk update operations (updateSubrangeand friends), in both mutating and copying forms, plus a defaultswapAtimplementation for copyable elements. (#724)PermutableContainergainedreverse(),shuffle(),moveSubrange(_:to:), and a heap sort.ProducergainedUnfoldProducer(an unfold-style generator), andBorrowingIteratorProtocolgainedmapError, andmapwas fixed;_map2and_map3were added alongside it to demonstrate different throwing behaviors. Error handling across the producer/drain algorithms was reviewed.Containerconformances forSpan,MutableSpan,OutputSpan, andInputSpan.Experimental hashed containers (
UnstableHashedContainerstrait)These types are functional, but they still have known usability gaps in their API surface that prevents us from declaring them API stable.
UnstableContainersPreviewto be enabled alongside it.70dc2389)RigidSetandUniqueSetnow conform toContainer. (#713)RigidDictionaryandUniqueDictionarygained akeysproperty andmutableValue(forKey:), which yields in-place mutable access to a stored value. (#698,Testing and infrastructure
checkSetAlgebra, a new law checker in_CollectionsTestSupport, verifies set-like types against theSetAlgebralaws — and additionally checks each mutating operation against its non-mutating twin. (#719, #730)Containerconformance validator has been added, along the lines of the existingSequence/Collectionconformance checkers, and is now applied toRigidSet,UniqueSet,RigidDeque, andUniqueDeque. (#713, #720)Deque's storage allocation behavior andMutableContainer's requirements (the latter uncovered and fixed several issues). (#722)swift-formatconfiguration for this package.swiftlang/github-workflows0.0.11 → 0.0.15,actions/checkout6 → 7), and the matrix was simplified now that 6.0/6.1 are out of support.Detailed List of Changes
BorrowingSequencetoIterableby @natecook1000 in #657_Word.allBitsas@inlinableby @dnadoba in #704BitSet.countperformance by ~3x by @dnadoba in #702_UniqueCollectionfast paths in embedded Swift by @lorentey in #715Producer.generate(into:): Switch to saturating semantics by @lorentey in #728New Contributors
Full Changelog: apple/swift-collections@1.6.0...1.7.0
v1.6.0: Swift Collections 1.6.0Compare Source
This is a feature release adding several useful operations to ordered collections, as well as shipping bug fixes that landed since 1.5.1.
The list of supported Swift toolchain versions remains 6.0, 6.1, 6.2, and 6.3 for now. Note that we intend to retire support for Swift 6.0 and 6.1 in a subsequent release later this year.
New
OrderedCollectionsoperationsWe now have several new operations that move existing elements in an
OrderedSetorOrderedDictionaryto a new position within the same collection:OrderedSet.moveSubrange(_:to:)andOrderedDictionary.moveSubrange(_:to:)move items at a range of indices to just before the item at the specified destination index.OrderedSet.move(members:to:)andOrderedDictionary.move(keys:to:)relocate elements identified by value (or key), preserving the order in which they're listed.OrderedSet.move(indices:to:)andOrderedDictionary.move(indices:to:)relocate items at an arbitrary sequence of indices, preserving their listed order.Bugfixes
SortedCollections[with theUnstableSortedCollectionstrait]: The default capacity of B-tree nodes is no longer clamped at 16, improving performance. (#257)DequeModule: The ownership-awareRigidDequeandUniqueDequetypes no longer hand out invalid spans to clients (#659)ContainersPreview[with theUnstableContainersPreviewtrait]: The deprecatedBorrowtype alias is now declared with correct availability. (#655)What's Changed
New Contributors
Full Changelog: apple/swift-collections@1.5.1...1.6.0
v1.5.1: Swift Collections 1.5.1Compare Source
This is a patch release resolving three issues uncovered since 1.5.0 was tagged, including a source breaking regression introduced in 1.4.0, affecting clients importing the
Collectionsmodule.What's Changed
HashTreeCollections, reported by @vanvoorden in #653UniqueBox.borrowcorrectly by @FranzBusch in #649Full Changelog: apple/swift-collections@1.5.0...1.5.1
v1.5.0: Swift Collections 1.5.0Compare Source
This feature release supports Swift toolchain versions 6.0, 6.1, 6.2, and 6.3. It includes the following new features and bug fixes:
Debugging enhancements
The package now defines LLDB data formatters for
RigidArray. The formatters are emitted into the executable binary, and they are automatically loaded by LLDB. We expect to implement formatters for (many) more types in subsequent releases.New stable APIs
RigidArrayandUniqueArraynow conform toEquatablewhen their element type isEquatable. This conformance requires a Swift 6.4 or later toolchain (it relies on SE-0499 generalizations ofEquatable/Hashableto support noncopyable conforming types).RigidArrayandUniqueArraygained anisTriviallyIdentical(to:)operation, which reports whether two instances share their underlying storage allocation. This does not require the element type to beEquatable, and it works with noncopyable elements.BitSetgained amakeIterator(from:)shortcut for starting iteration at (or after) a specific member, avoiding a linear scan from the start of the set.OrderedDictionarygained areplaceElement(at:withKey:value:)operation that replaces the key-value pair at a given index. The new key is allowed to equal the existing key at that index (in which case only the value is updated).Experimental hashed containers (
UnstableHashedContainerstrait)The Robin-Hood-hashed
UniqueSet,RigidSet,UniqueDictionary, andRigidDictionarytypes in theBasicContainersmodule continue to evolve behind theUnstableHashedContainerspackage trait. This release brings a number of correctness fixes and performance improvements:maxProbeLengthmaintenance to avoid probe-length bloat.RigidDictionary.updateValue(forKey:with:)(the latter exhibited undefined behavior on removals).RigidSet.insert(maximumCount:from:)no longer spuriously reports a capacity overflow due to incorrect accounting.UnstableHashedContainerstrait can now be enabled independently ofUnstableContainersPreview.These types remain source-unstable for now.
Experimental sorted collections (
UnstableSortedCollectionstrait)The
SortedCollectionsmodule'sSortedSethas gained the following additions:SortedSetnow supports value-range subscripts for the full variety of standard range expression types,ClosedRange,PartialRangeFrom,PartialRangeThrough, andPartialRangeUpTo.SortedSet.firstIndex(after:)andSortedSet.lastIndex(before:)return the index to the nearest member following or preceding a given value.This release also fixes several underlying B-tree bugs that were surfaced by these additions.
These types remain source-unstable; they have known API deficiencies that will need to be addressed before they ship.
Experimental container protocols (
UnstableContainersPreviewtrait)The
ContainersPreviewmodule's protocol hierarchy and associated types continue to be developed. Several constructs have been renamed to follow Swift Evolution proposals in flight.struct Box<T>struct UniqueBox<Value>struct Borrow<Target>struct Ref<Target>struct Inout<Target>struct MutableRef<Target>Producer.ProducerErrorProducer.FailureProducer.generateNext()Producer.next()Producer.skip(upTo:)Producer.skip(by:)For
UniqueBox,RefandMutableRef, there are deprecated typealiases for the old names, preserving source compatibility.Other changes to the experimental container model:
Container.Indexno longer needs to conform toComparable. This allows linked lists to become containers.RigidArray,UniqueArray,RigidDeque, andUniqueDequenow conform to the container protocols.Producer.collect(into:)for collecting a producer's output into aRangeReplaceableContainer.BorrowingIteratorProtocol.copy()for turning a borrowing iterator into a producer.filterandmapoverloads forBorrowingIteratorProtocol,Producer, andDrain.BorrowingSequence.firstwas removed.BorrowingSequence,BorrowingIteratorProtocoland their requirements have temporarily gained trailing underscores to avoid naming conflicts with the (provisional) protocol definition in the Standard Library. We expect these definitions to be removed when these protocols officially become part of the stdlib.The protocol-based APIs in
ContainersPreviewnow require a Swift 6.4 or later toolchain.UniqueBoxis source-stable, therefore it continues to require Swift 6.2.Notable bug fixes
HashTreeCollections: Fixed an invariant violation that could be triggered by some operations onTreeSet/TreeDictionary._RopeModule: Fixed an infinite loop when hashing the UTF-8 view of a multi-chunk big substring.BitCollections: Fixed a bogus precondition inBitArray.insert(repeating:count:at:); fixedBitSet.isSubset(of: Range<Int>)to correctly examine elements above the range's upper word.HeapModule: FixedHeap.insert(contentsOf:)to use a wrapping multiply in its Floyd-heuristic computation; added a missing bounds assertion inHeap._UnsafeHandle.swapAt(_:with:).OrderedCollections: FixedOrderedSetcrash on negative capacity values; minor fixes in_HashTable.UnsafeHandle.DequeModule: Fixed sizing issue inUniqueDeque.replace(removing:addingCount:initializingWith:); fixed a missing argument validation inRigidDeque.nextMutableSpan(after:maximumCount:);RigidDeque.consume(_:consumingWith:)now closes the resulting gap before returning; added zero-count fast-paths; replace/prepend operations taking aCollectionnow verify that the source's count matches its contents.BasicContainers: Fixed an overallocation issue inUniqueArray.replace(removing:copying:); fixed a partial-initialization correctness issue inRigidArray.replace(removing:consumingWith:addingCount:initializingWith:).What's Changed
BorrowingSequenceimplementation with proposal by @natecook1000 in #609Container.Indexto conform toComparableby @lorentey in #623BitSet.makeIterator(from:)by @lorentey in #627UniqueArray.edit’s docs by @lorentey in #642BoxtoUniqueBox; align API surface with SE-0517 by @lorentey in #640struct Borrow⟹struct Refby @lorentey in #643struct Inout⟹struct MutableRefby @lorentey in #646New Contributors
Full Changelog: apple/swift-collections@1.4.1...1.5.0
v1.4.1: Swift Collections 1.4.1Compare Source
This patch release is mostly focusing on evolving the package traits
UnstableContainersPreviewandUnstableHashedContainers, with the following notable fixes and improvements to the stable parts of the package:DequeModuleandOrderedCollectionsmodules.Changes to experimental package traits
The new set and dictionary types enabled by the
UnstableHashedContainerstrait 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
UnstableContainersPreviewtrait has gained several new protocols and algorithm implementations, working towards one possible working model of a coherent, ownership-aware container/iteration model.BidirectionalContainerdefines a container that allows iterating over spans backwards, and provides decrement operations on indices -- an analogue of the classicBidirectionalCollectionprotocol.RandomAccessContainermodels containers that allow constant-time repositioning of their indices, likeRandomAccessCollection.MutableContaineris the ownership-aware analogue ofMutableCollection-- 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).PermutableContaineris an experimental new spinoff ofMutableContainer, focusing on reordering items without allowing arbitrary mutations.RangeReplaceableContaineris a partial, ownership-aware analogue ofRangeReplaceableCollection, providing a full set of insertion/append/removal/consumption operations, with support for fixed-capacity conforming types.DynamicContainerrounds out the range-replacement operations with initializer and capacity reservation requirements that can only be implemented by dynamically sized containers.map,reduceandfilteroperations on borrowing iterators, producers and drains, as well acollect(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 existingSequencealgorithms), 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.).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
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.