Skip to content

Commit 525732a

Browse files
committed
Simplify swift settings in manifest and add other swift 6 settings
strict-concurrency
1 parent d70f911 commit 525732a

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Package.swift

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,19 @@ let package = Package(
1616
name: "ArgumentEncoding",
1717
dependencies: [
1818
.dependencies,
19-
]
19+
],
20+
swiftSettings: .swiftSix
2021
),
2122
.testTarget(
2223
name: "ArgumentEncodingTests",
2324
dependencies: [
2425
"ArgumentEncoding",
25-
]
26+
],
27+
swiftSettings: .swiftSix
2628
),
2729
]
2830
)
2931

30-
package.targets.strictConcurrency()
31-
32-
extension [Target] {
33-
func strictConcurrency() {
34-
forEach { target in
35-
target.swiftSettings = (target.swiftSettings ?? [])
36-
+ [.enableUpcomingFeature("StrictConcurrency")]
37-
}
38-
}
39-
}
40-
4132
// MARK: PointFree
4233

4334
extension Package.Dependency {
@@ -50,3 +41,16 @@ extension Package.Dependency {
5041
extension Target.Dependency {
5142
static let dependencies: Self = .product(name: "Dependencies", package: "swift-dependencies")
5243
}
44+
45+
extension [SwiftSetting] {
46+
static let swiftSix: Self = [
47+
.enableUpcomingFeature("BareSlashRegexLiterals"),
48+
.enableUpcomingFeature("ConciseMagicFile"),
49+
.enableUpcomingFeature("DeprecateApplicationMain"),
50+
.enableUpcomingFeature("DisableOutwardActorInference"),
51+
.enableUpcomingFeature("ForwardTrailingClosures"),
52+
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
53+
.enableUpcomingFeature("InternalImportsByDefault"),
54+
.enableUpcomingFeature("StrictConcurrency"),
55+
]
56+
}

0 commit comments

Comments
 (0)