Skip to content

Commit abf5d5b

Browse files
committed
fix: add Swift 6.1-6.3 workaround for trait propagation issue
Added explicit package dependencies for swift-rfc-7578 and swift-url-routing as a workaround for SPM trait propagation bug in Swift 6.1-6.3. Also added MemberImportVisibility upcoming feature flag to all targets.
1 parent a8182bb commit abf5d5b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Package.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,31 @@ let package = Package(
4848
)
4949
]
5050
)
51+
52+
#if swift(>=6.1) && swift(<6.3)
53+
// workaround for error:
54+
// error: exhausted attempts to resolve the dependencies graph, with the following dependencies unresolved:
55+
// * 'swift-rfc-7578' from https://github.com/swift-standards/swift-rfc-7578.git
56+
// * 'swift-url-routing' from https://github.com/pointfreeco/swift-url-routing
57+
package.dependencies.append(contentsOf: [
58+
.package(url: "https://github.com/swift-standards/swift-rfc-7578", from: "0.1.0"),
59+
.package(url: "https://github.com/pointfreeco/swift-url-routing", from: "0.1.0")
60+
])
61+
#endif
62+
63+
64+
65+
for target in package.targets {
66+
target.swiftSettings?.append(
67+
contentsOf: [
68+
.enableUpcomingFeature("MemberImportVisibility")
69+
]
70+
)
71+
}
72+
73+
//package.traits.insert(
74+
// .default(
75+
// enabledTraits: ["URLRouting"]
76+
// )
77+
//)
78+

0 commit comments

Comments
 (0)