Skip to content

Commit 7f8c72e

Browse files
authored
[6.0] Add support for swift-collections 1.1 (#7614)
Cherry pick of #7607 **Explanation:** SwiftPM fails to build against [email protected], this change allows SwiftPM to be compatible with both [email protected] and [email protected] **Scope:** Isolated to one specific line where the build failure occurred and initializes the return value to an `Array` explicitly **Risk:** Low as the change is minimal and has been validated via testing **Testing:** Existing SwiftPM testing has passed and I have been able to build a toolchain locally with the change **Reviewer:** @MaxDesiatov
1 parent aaeecec commit 7f8c72e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
802802
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "3.0.0")),
803803
.package(url: "https://github.com/apple/swift-syntax.git", branch: relatedDependenciesBranch),
804804
.package(url: "https://github.com/apple/swift-system.git", .upToNextMinor(from: "1.1.1")),
805-
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.1")),
805+
.package(url: "https://github.com/apple/swift-collections.git", "1.0.1" ..< "1.2.0"),
806806
.package(url: "https://github.com/apple/swift-certificates.git", .upToNextMinor(from: "1.0.1")),
807807
]
808808
} else {

Sources/PackageGraph/Resolution/PubGrub/PubGrubDependencyResolver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ public struct PubGrubDependencyResolver {
638638

639639
let priorCause = _mostRecentSatisfier.cause!
640640

641-
var newTerms = incompatibility.terms.filter { $0 != mostRecentTerm }
641+
var newTerms = Array(incompatibility.terms.filter { $0 != mostRecentTerm })
642642
newTerms += priorCause.terms.filter { $0.node != _mostRecentSatisfier.term.node }
643643

644644
if let _difference = difference {

0 commit comments

Comments
 (0)