1- // swift-tools-version:5.8
1+ // swift-tools-version: 5.8
22
33import Foundation
44import PackageDescription
55
6+ let strictConcurrencySettings : [ SwiftSetting ] = [
7+ . enableUpcomingFeature( " StrictConcurrency " ) ,
8+ . enableUpcomingFeature( " RegionBasedIsolation " ) ,
9+ . enableUpcomingFeature( " InferSendableFromCaptures " ) ,
10+ ]
11+
612let package = Package (
713 name: " SourceKitLSP " ,
814 platforms: [ . macOS( . v13) ] ,
@@ -34,6 +40,7 @@ let package = Package(
3440 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
3541 ] ,
3642 exclude: [ " CMakeLists.txt " ] ,
43+ swiftSettings: strictConcurrencySettings,
3744 linkerSettings: sourcekitLSPLinkSettings
3845 ) ,
3946
@@ -46,7 +53,7 @@ let package = Package(
4653 " LanguageServerProtocol "
4754 ] ,
4855 exclude: [ " CMakeLists.txt " ] ,
49- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
56+ swiftSettings: strictConcurrencySettings
5057 ) ,
5158
5259 // MARK: CAtomics
@@ -87,7 +94,8 @@ let package = Package(
8794 . product( name: " SwiftParser " , package : " swift-syntax " ) ,
8895 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
8996 ] ,
90- exclude: [ " CMakeLists.txt " ]
97+ exclude: [ " CMakeLists.txt " ] ,
98+ swiftSettings: strictConcurrencySettings
9199 ) ,
92100
93101 . testTarget(
@@ -100,7 +108,8 @@ let package = Package(
100108 " SKCore " ,
101109 " SKTestSupport " ,
102110 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
103- ]
111+ ] ,
112+ swiftSettings: strictConcurrencySettings
104113 ) ,
105114
106115 // MARK: InProcessClient
@@ -113,7 +122,8 @@ let package = Package(
113122 " SKCore " ,
114123 " SourceKitLSP " ,
115124 ] ,
116- exclude: [ " CMakeLists.txt " ]
125+ exclude: [ " CMakeLists.txt " ] ,
126+ swiftSettings: strictConcurrencySettings
117127 ) ,
118128
119129 // MARK: LanguageServerProtocol
@@ -122,15 +132,16 @@ let package = Package(
122132 name: " LanguageServerProtocol " ,
123133 dependencies: [ ] ,
124134 exclude: [ " CMakeLists.txt " ] ,
125- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
135+ swiftSettings: strictConcurrencySettings
126136 ) ,
127137
128138 . testTarget(
129139 name: " LanguageServerProtocolTests " ,
130140 dependencies: [
131141 " LanguageServerProtocol " ,
132142 " LSPTestSupport " ,
133- ]
143+ ] ,
144+ swiftSettings: strictConcurrencySettings
134145 ) ,
135146
136147 // MARK: LanguageServerProtocolJSONRPC
@@ -143,15 +154,16 @@ let package = Package(
143154 " LSPLogging " ,
144155 ] ,
145156 exclude: [ " CMakeLists.txt " ] ,
146- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
157+ swiftSettings: strictConcurrencySettings
147158 ) ,
148159
149160 . testTarget(
150161 name: " LanguageServerProtocolJSONRPCTests " ,
151162 dependencies: [
152163 " LanguageServerProtocolJSONRPC " ,
153164 " LSPTestSupport " ,
154- ]
165+ ] ,
166+ swiftSettings: strictConcurrencySettings
155167 ) ,
156168
157169 // MARK: LSPLogging
@@ -164,15 +176,16 @@ let package = Package(
164176 . product( name: " Crypto " , package : " swift-crypto " ) ,
165177 ] ,
166178 exclude: [ " CMakeLists.txt " ] ,
167- swiftSettings: lspLoggingSwiftSettings + [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
179+ swiftSettings: lspLoggingSwiftSettings + strictConcurrencySettings
168180 ) ,
169181
170182 . testTarget(
171183 name: " LSPLoggingTests " ,
172184 dependencies: [
173185 " LSPLogging " ,
174186 " SKTestSupport " ,
175- ]
187+ ] ,
188+ swiftSettings: strictConcurrencySettings
176189 ) ,
177190
178191 // MARK: LSPTestSupport
@@ -185,7 +198,8 @@ let package = Package(
185198 " LanguageServerProtocolJSONRPC " ,
186199 " SKSupport " ,
187200 " SwiftExtensions " ,
188- ]
201+ ] ,
202+ swiftSettings: strictConcurrencySettings
189203 ) ,
190204
191205 // MARK: SemanticIndex
@@ -199,14 +213,16 @@ let package = Package(
199213 " SwiftExtensions " ,
200214 . product( name: " IndexStoreDB " , package : " indexstore-db " ) ,
201215 ] ,
202- exclude: [ " CMakeLists.txt " ]
216+ exclude: [ " CMakeLists.txt " ] ,
217+ swiftSettings: strictConcurrencySettings
203218 ) ,
204219
205220 . testTarget(
206221 name: " SemanticIndexTests " ,
207222 dependencies: [
208223 " SemanticIndex "
209- ]
224+ ] ,
225+ swiftSettings: strictConcurrencySettings
210226 ) ,
211227
212228 // MARK: SKCore
@@ -227,15 +243,16 @@ let package = Package(
227243 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
228244 ] ,
229245 exclude: [ " CMakeLists.txt " ] ,
230- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
246+ swiftSettings: strictConcurrencySettings
231247 ) ,
232248
233249 . testTarget(
234250 name: " SKCoreTests " ,
235251 dependencies: [
236252 " SKCore " ,
237253 " SKTestSupport " ,
238- ]
254+ ] ,
255+ swiftSettings: strictConcurrencySettings
239256 ) ,
240257
241258 // MARK: SKSupport
@@ -252,7 +269,7 @@ let package = Package(
252269 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
253270 ] ,
254271 exclude: [ " CMakeLists.txt " ] ,
255- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
272+ swiftSettings: strictConcurrencySettings
256273 ) ,
257274
258275 . testTarget(
@@ -262,7 +279,8 @@ let package = Package(
262279 " SKSupport " ,
263280 " SKTestSupport " ,
264281 " SwiftExtensions " ,
265- ]
282+ ] ,
283+ swiftSettings: strictConcurrencySettings
266284 ) ,
267285
268286 // MARK: SKSwiftPMWorkspace
@@ -279,7 +297,7 @@ let package = Package(
279297 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
280298 ] ,
281299 exclude: [ " CMakeLists.txt " ] ,
282- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
300+ swiftSettings: strictConcurrencySettings
283301 ) ,
284302
285303 . testTarget(
@@ -293,7 +311,8 @@ let package = Package(
293311 " SourceKitLSP " ,
294312 . product( name: " SwiftPM-auto " , package : " swift-package-manager " ) ,
295313 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
296- ]
314+ ] ,
315+ swiftSettings: strictConcurrencySettings
297316 ) ,
298317
299318 // MARK: SKTestSupport
@@ -312,9 +331,8 @@ let package = Package(
312331 . product( name: " ISDBTestSupport " , package : " indexstore-db " ) ,
313332 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
314333 ] ,
315- resources: [
316- . copy( " INPUTS " )
317- ]
334+ resources: [ . copy( " INPUTS " ) ] ,
335+ swiftSettings: strictConcurrencySettings
318336 ) ,
319337
320338 // MARK: SourceKitD
@@ -330,7 +348,7 @@ let package = Package(
330348 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
331349 ] ,
332350 exclude: [ " CMakeLists.txt " , " sourcekitd_uids.swift.gyb " ] ,
333- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
351+ swiftSettings: strictConcurrencySettings
334352 ) ,
335353
336354 . testTarget(
@@ -340,7 +358,8 @@ let package = Package(
340358 " SKCore " ,
341359 " SKTestSupport " ,
342360 " SwiftExtensions " ,
343- ]
361+ ] ,
362+ swiftSettings: strictConcurrencySettings
344363 ) ,
345364
346365 // MARK: SourceKitLSP
@@ -369,7 +388,8 @@ let package = Package(
369388 . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
370389 . product( name: " SwiftPM-auto " , package : " swift-package-manager " ) ,
371390 ] ,
372- exclude: [ " CMakeLists.txt " ]
391+ exclude: [ " CMakeLists.txt " ] ,
392+ swiftSettings: strictConcurrencySettings
373393 ) ,
374394
375395 . testTarget(
@@ -393,14 +413,16 @@ let package = Package(
393413 // be used by test cases that test macros (see `SwiftPMTestProject.macroPackageManifest`).
394414 . product( name: " SwiftCompilerPlugin " , package : " swift-syntax " ) ,
395415 . product( name: " SwiftSyntaxMacros " , package : " swift-syntax " ) ,
396- ]
416+ ] ,
417+ swiftSettings: strictConcurrencySettings
397418 ) ,
398419
399420 // MARK: SwiftExtensions
400421
401422 . target(
402423 name: " SwiftExtensions " ,
403- exclude: [ " CMakeLists.txt " ]
424+ exclude: [ " CMakeLists.txt " ] ,
425+ swiftSettings: strictConcurrencySettings
404426 ) ,
405427 ]
406428)
0 commit comments