diff --git a/README.md b/README.md index 94853f3f..e930b20e 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,7 @@ The following table maps package releases to their minimum required Swift toolch | swift-collections 1.3.x | >= Swift 6.0.3 | >= Xcode 16.2 | | swift-collections 1.4.x | >= Swift 6.0.3 | >= Xcode 16.2 | | swift-collections 1.5.x | >= Swift 6.0.3 | >= Xcode 16.2 | +| swift-collections 1.6.x | >= Swift 6.0.3 | >= Xcode 16.2 | We make an effort to ensure that each new minor package version supports the most recent three major Swift versions at the time of its release. @@ -282,7 +283,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/apple/swift-collections.git", - .upToNextMinor(from: "1.5.0") // or `.upToNextMajor` + .upToNextMinor(from: "1.6.0") // or `.upToNextMajor` ) ], targets: [ @@ -310,12 +311,13 @@ We maintain separate branches for each minor version of the package: | Package version | Branch | Status | | ----------------------- | ----------- | -------- | -| swift-collections 1.0.x | release/1.0 | Obsolete | -| swift-collections 1.1.x | release/1.1 | Obsolete | -| swift-collections 1.2.x | release/1.2 | Obsolete | -| swift-collections 1.3.x | release/1.3 | Bugfixes only | -| swift-collections 1.4.x | release/1.4 | Bugfixes only | -| swift-collections 1.5.x | release/1.5 | Bugfixes only | +| swift-collections 1.0.x | release/1.0 | Obsolete, closed| +| swift-collections 1.1.x | release/1.1 | Obsolete, closed| +| swift-collections 1.2.x | release/1.2 | Obsolete, closed| +| swift-collections 1.3.x | release/1.3 | Bugfixes only| +| swift-collections 1.4.x | | Bugfixes only | +| swift-collections 1.5.x | | Bugfixes only | +| swift-collections 1.6.x | | Bugfixes only | | n.a. | main | Feature work towards next minor release | Changes must land on the branch corresponding to the earliest release that they will need to ship on. They are periodically propagated to subsequent branches, in the following direction: diff --git a/Sources/BitCollections/CMakeLists.txt b/Sources/BitCollections/CMakeLists.txt index 82066302..ac1e81df 100644 --- a/Sources/BitCollections/CMakeLists.txt +++ b/Sources/BitCollections/CMakeLists.txt @@ -44,6 +44,7 @@ target_sources(${module_name} PRIVATE "BitArray/BitArray+LosslessStringConvertible.swift" "BitArray/BitArray+RandomBits.swift" "BitArray/BitArray+RangeReplaceableCollection.swift" + "BitArray/BitArray+Shifts.swift" "BitArray/BitArray+Testing.swift" "BitArray/BitArray._UnsafeHandle.swift" "BitArray/BitArray.swift" diff --git a/Sources/ContainersPreview/CMakeLists.txt b/Sources/ContainersPreview/CMakeLists.txt index b73b282a..d48a557d 100644 --- a/Sources/ContainersPreview/CMakeLists.txt +++ b/Sources/ContainersPreview/CMakeLists.txt @@ -47,12 +47,12 @@ target_sources(${module_name} PRIVATE "Protocols/BorrowingIteratorProtocol+Reduce.swift" "Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift" "Protocols/BorrowingSequence.swift" + "Protocols/BorrowingSequence+Algorithms.swift" "Protocols/BorrowingSequence+Standard Conformances.swift" "Protocols/BorrowingSequence+Utilities.swift" "Protocols/Drain.swift" "Protocols/Drain+Map.swift" "Protocols/Drain+Reduce.swift" - "Protocols/Drain.swift" "Protocols/Producer.swift" "Protocols/Producer+Collect.swift" "Protocols/Producer+Filter.swift" @@ -62,5 +62,6 @@ target_sources(${module_name} PRIVATE "Types/MutableRef.swift" "Types/Ref.swift" "Types/Shared.swift" + "Types/SpanIterator.swift" "Types/UniqueBox.swift" ) diff --git a/Sources/OrderedCollections/CMakeLists.txt b/Sources/OrderedCollections/CMakeLists.txt index 84aace63..1fc019df 100644 --- a/Sources/OrderedCollections/CMakeLists.txt +++ b/Sources/OrderedCollections/CMakeLists.txt @@ -45,6 +45,7 @@ target_sources(${module_name} PRIVATE "OrderedDictionary/OrderedDictionary+Hashable.swift" "OrderedDictionary/OrderedDictionary+Initializers.swift" "OrderedDictionary/OrderedDictionary+Invariants.swift" + "OrderedDictionary/OrderedDictionary+Move.swift" "OrderedDictionary/OrderedDictionary+Partial MutableCollection.swift" "OrderedDictionary/OrderedDictionary+Partial RangeReplaceableCollection.swift" "OrderedDictionary/OrderedDictionary+Sendable.swift" @@ -61,6 +62,7 @@ target_sources(${module_name} PRIVATE "OrderedSet/OrderedSet+Initializers.swift" "OrderedSet/OrderedSet+Insertions.swift" "OrderedSet/OrderedSet+Invariants.swift" + "OrderedSet/OrderedSet+Move.swift" "OrderedSet/OrderedSet+Partial MutableCollection.swift" "OrderedSet/OrderedSet+Partial RangeReplaceableCollection.swift" "OrderedSet/OrderedSet+Partial SetAlgebra formIntersection.swift" diff --git a/Tests/BasicContainersTests/RawCollider.swift b/Tests/BasicContainersTests/RawCollider.swift deleted file mode 100644 index 4b234810..00000000 --- a/Tests/BasicContainersTests/RawCollider.swift +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the Swift Collections open source project -// -// Copyright (c) 2026 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// -// SPDX-License-Identifier: Apache-2.0 WITH Swift-exception -// -//===----------------------------------------------------------------------===// - -/// A type with precisely controlled hash values. This can be used to set up -/// hash tables with fully deterministic contents. -package struct RawCollider: - Hashable, CustomStringConvertible -{ - package var identity: Int - package var rawHashValue: Int - - package init(_ identity: Int, _ rawHashValue: Int) { - self.identity = identity - self.rawHashValue = rawHashValue - } - - package init(_ identity: Int) { - self.identity = identity - self.rawHashValue = identity - } - - package static func ==(left: Self, right: Self) -> Bool { - guard left.identity == right.identity else { return false } - precondition(left.rawHashValue == right.rawHashValue) - return true - } - - package var hashValue: Int { - fatalError("Don't") - } - - package func hash(into hasher: inout Hasher) { - fatalError("Don't") - } - - package func _rawHashValue(seed: Int) -> Int { - rawHashValue - } - - package var description: String { - "\(identity)#\(rawHashValue)" - } -} diff --git a/Xcode/Collections.xcodeproj/project.pbxproj b/Xcode/Collections.xcodeproj/project.pbxproj index 9ff6e1ea..cf769283 100644 --- a/Xcode/Collections.xcodeproj/project.pbxproj +++ b/Xcode/Collections.xcodeproj/project.pbxproj @@ -583,6 +583,9 @@ 7DEBDB9029CCE44A00ADC226 /* TestContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB2229CCE43600ADC226 /* TestContext.swift */; }; 7DEBDB9129CCE44A00ADC226 /* CollectionTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB2429CCE43600ADC226 /* CollectionTestCase.swift */; }; 7DEBDB9229CCE44A00ADC226 /* StringConvertibleValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEBDB2B29CCE43600ADC226 /* StringConvertibleValue.swift */; }; + 7DFA40842FD3A98D00CD20C1 /* OrderedSet+Move.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DFA40832FD3A98D00CD20C1 /* OrderedSet+Move.swift */; }; + 7DFA40862FD3A99D00CD20C1 /* OrderedDictionary+Move.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DFA40852FD3A99D00CD20C1 /* OrderedDictionary+Move.swift */; }; + 7DFA408A2FD3ACE700CD20C1 /* UnsafeBufferTrimTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DFA40892FD3ACE700CD20C1 /* UnsafeBufferTrimTests.swift */; }; A93AC21E2E7C845300A824DF /* UniqueArrayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93AC21C2E7C845300A824DF /* UniqueArrayTests.swift */; }; A93AC21F2E7C845300A824DF /* ArrayLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93AC21A2E7C845300A824DF /* ArrayLayout.swift */; }; A93AC2202E7C845300A824DF /* RigidArrayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93AC21B2E7C845300A824DF /* RigidArrayTests.swift */; }; @@ -1226,6 +1229,9 @@ 7DEBDB9729CCE4A600ADC226 /* CollectionsTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CollectionsTests.xcconfig; sourceTree = ""; }; 7DEBDB9829CCE4A600ADC226 /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 7DEBDB9929CCE4A600ADC226 /* Collections.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Collections.xcconfig; sourceTree = ""; }; + 7DFA40832FD3A98D00CD20C1 /* OrderedSet+Move.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OrderedSet+Move.swift"; sourceTree = ""; }; + 7DFA40852FD3A99D00CD20C1 /* OrderedDictionary+Move.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OrderedDictionary+Move.swift"; sourceTree = ""; }; + 7DFA40892FD3ACE700CD20C1 /* UnsafeBufferTrimTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsafeBufferTrimTests.swift; sourceTree = ""; }; A93AC20F2E7C841700A824DF /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; A93AC21A2E7C845300A824DF /* ArrayLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayLayout.swift; sourceTree = ""; }; A93AC21B2E7C845300A824DF /* RigidArrayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RigidArrayTests.swift; sourceTree = ""; }; @@ -1669,6 +1675,7 @@ 7DE91E7729CA70F3004483EB /* OrderedDictionary+Hashable.swift */, 7DE91E7929CA70F3004483EB /* OrderedDictionary+Initializers.swift */, 7DE91E8029CA70F3004483EB /* OrderedDictionary+Invariants.swift */, + 7DFA40852FD3A99D00CD20C1 /* OrderedDictionary+Move.swift */, 7DE91E8429CA70F3004483EB /* OrderedDictionary+Partial MutableCollection.swift */, 7DE91E7D29CA70F3004483EB /* OrderedDictionary+Partial RangeReplaceableCollection.swift */, 7DE91E8229CA70F3004483EB /* OrderedDictionary+Sendable.swift */, @@ -1692,6 +1699,7 @@ 7DE91E9529CA70F3004483EB /* OrderedSet+Initializers.swift */, 7DE91E9029CA70F3004483EB /* OrderedSet+Insertions.swift */, 7DE91E8D29CA70F3004483EB /* OrderedSet+Invariants.swift */, + 7DFA40832FD3A98D00CD20C1 /* OrderedSet+Move.swift */, 7DE91E9A29CA70F3004483EB /* OrderedSet+Partial MutableCollection.swift */, 7DE91EA229CA70F3004483EB /* OrderedSet+Partial RangeReplaceableCollection.swift */, 7DE91EA129CA70F3004483EB /* OrderedSet+Partial SetAlgebra formIntersection.swift */, @@ -2336,6 +2344,7 @@ 7D2A774A2F27F285005780C7 /* RigidDequeCrashTests.swift */, 7D2A774B2F27F285005780C7 /* RigidDequeTests.swift */, 7D2A774C2F27F285005780C7 /* UniqueDequeTests.swift */, + 7DFA40892FD3ACE700CD20C1 /* UnsafeBufferTrimTests.swift */, ); path = DequeTests; sourceTree = ""; @@ -2900,6 +2909,7 @@ 7DE920A329CA70F4004483EB /* Rope+Index.swift in Sources */, 7DA23F462F329A2300E4C03A /* RigidArray+Experimental.swift in Sources */, 7DA23F472F329A2300E4C03A /* UniqueArray.swift in Sources */, + 7DFA40842FD3A98D00CD20C1 /* OrderedSet+Move.swift in Sources */, 7DA23F482F329A2300E4C03A /* RigidArray+Replacements.swift in Sources */, 7DA23F492F329A2300E4C03A /* RigidArray+Container.swift in Sources */, 7DA23F4A2F329A2300E4C03A /* UniqueArray+Replacements.swift in Sources */, @@ -3018,6 +3028,7 @@ 7DE9209229CA70F4004483EB /* Rope+_Storage.swift in Sources */, 7DE9203929CA70F3004483EB /* OrderedSet+Partial RangeReplaceableCollection.swift in Sources */, 7DE9206329CA70F4004483EB /* BigString+Contents.swift in Sources */, + 7DFA40862FD3A99D00CD20C1 /* OrderedDictionary+Move.swift in Sources */, 7DE9215629CA70F4004483EB /* _HashNode+Structural compactMapValues.swift in Sources */, 7DE920CC29CA70F4004483EB /* BitSet.Counted.swift in Sources */, 7DE9207F29CA70F4004483EB /* BigSubstring+UTF8View.swift in Sources */, @@ -3177,6 +3188,7 @@ 7D2A774D2F27F285005780C7 /* RigidDequeCrashTests.swift in Sources */, 7D2A774E2F27F285005780C7 /* UniqueDequeTests.swift in Sources */, 7D2A774F2F27F285005780C7 /* RigidDequeTests.swift in Sources */, + 7DFA408A2FD3ACE700CD20C1 /* UnsafeBufferTrimTests.swift in Sources */, 7DEBDB7729CCE44A00ADC226 /* HashableBox.swift in Sources */, 7DE9220E29CA8576004483EB /* SampleStrings.swift in Sources */, 7DEBDB9129CCE44A00ADC226 /* CollectionTestCase.swift in Sources */,