1
- // swift-tools-version:5.8
1
+ // swift-tools-version: 5.8
2
2
3
3
import Foundation
4
4
import PackageDescription
5
5
6
+ let strictConcurrencySettings : [ SwiftSetting ] = [
7
+ . enableUpcomingFeature( " StrictConcurrency " ) ,
8
+ . enableUpcomingFeature( " RegionBasedIsolation " ) ,
9
+ . enableUpcomingFeature( " InferSendableFromCaptures " ) ,
10
+ ]
11
+
6
12
let package = Package (
7
13
name: " SourceKitLSP " ,
8
14
platforms: [ . macOS( . v13) ] ,
@@ -34,6 +40,7 @@ let package = Package(
34
40
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
35
41
] ,
36
42
exclude: [ " CMakeLists.txt " ] ,
43
+ swiftSettings: strictConcurrencySettings,
37
44
linkerSettings: sourcekitLSPLinkSettings
38
45
) ,
39
46
@@ -46,7 +53,7 @@ let package = Package(
46
53
" LanguageServerProtocol "
47
54
] ,
48
55
exclude: [ " CMakeLists.txt " ] ,
49
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
56
+ swiftSettings: strictConcurrencySettings
50
57
) ,
51
58
52
59
// MARK: CAtomics
@@ -87,7 +94,8 @@ let package = Package(
87
94
. product( name: " SwiftParser " , package : " swift-syntax " ) ,
88
95
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
89
96
] ,
90
- exclude: [ " CMakeLists.txt " ]
97
+ exclude: [ " CMakeLists.txt " ] ,
98
+ swiftSettings: strictConcurrencySettings
91
99
) ,
92
100
93
101
. testTarget(
@@ -100,7 +108,8 @@ let package = Package(
100
108
" SKCore " ,
101
109
" SKTestSupport " ,
102
110
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
103
- ]
111
+ ] ,
112
+ swiftSettings: strictConcurrencySettings
104
113
) ,
105
114
106
115
// MARK: InProcessClient
@@ -113,7 +122,8 @@ let package = Package(
113
122
" SKCore " ,
114
123
" SourceKitLSP " ,
115
124
] ,
116
- exclude: [ " CMakeLists.txt " ]
125
+ exclude: [ " CMakeLists.txt " ] ,
126
+ swiftSettings: strictConcurrencySettings
117
127
) ,
118
128
119
129
// MARK: LanguageServerProtocol
@@ -122,15 +132,16 @@ let package = Package(
122
132
name: " LanguageServerProtocol " ,
123
133
dependencies: [ ] ,
124
134
exclude: [ " CMakeLists.txt " ] ,
125
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
135
+ swiftSettings: strictConcurrencySettings
126
136
) ,
127
137
128
138
. testTarget(
129
139
name: " LanguageServerProtocolTests " ,
130
140
dependencies: [
131
141
" LanguageServerProtocol " ,
132
142
" LSPTestSupport " ,
133
- ]
143
+ ] ,
144
+ swiftSettings: strictConcurrencySettings
134
145
) ,
135
146
136
147
// MARK: LanguageServerProtocolJSONRPC
@@ -143,15 +154,16 @@ let package = Package(
143
154
" LSPLogging " ,
144
155
] ,
145
156
exclude: [ " CMakeLists.txt " ] ,
146
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
157
+ swiftSettings: strictConcurrencySettings
147
158
) ,
148
159
149
160
. testTarget(
150
161
name: " LanguageServerProtocolJSONRPCTests " ,
151
162
dependencies: [
152
163
" LanguageServerProtocolJSONRPC " ,
153
164
" LSPTestSupport " ,
154
- ]
165
+ ] ,
166
+ swiftSettings: strictConcurrencySettings
155
167
) ,
156
168
157
169
// MARK: LSPLogging
@@ -164,15 +176,16 @@ let package = Package(
164
176
. product( name: " Crypto " , package : " swift-crypto " ) ,
165
177
] ,
166
178
exclude: [ " CMakeLists.txt " ] ,
167
- swiftSettings: lspLoggingSwiftSettings + [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
179
+ swiftSettings: lspLoggingSwiftSettings + strictConcurrencySettings
168
180
) ,
169
181
170
182
. testTarget(
171
183
name: " LSPLoggingTests " ,
172
184
dependencies: [
173
185
" LSPLogging " ,
174
186
" SKTestSupport " ,
175
- ]
187
+ ] ,
188
+ swiftSettings: strictConcurrencySettings
176
189
) ,
177
190
178
191
// MARK: LSPTestSupport
@@ -185,7 +198,8 @@ let package = Package(
185
198
" LanguageServerProtocolJSONRPC " ,
186
199
" SKSupport " ,
187
200
" SwiftExtensions " ,
188
- ]
201
+ ] ,
202
+ swiftSettings: strictConcurrencySettings
189
203
) ,
190
204
191
205
// MARK: SemanticIndex
@@ -199,14 +213,16 @@ let package = Package(
199
213
" SwiftExtensions " ,
200
214
. product( name: " IndexStoreDB " , package : " indexstore-db " ) ,
201
215
] ,
202
- exclude: [ " CMakeLists.txt " ]
216
+ exclude: [ " CMakeLists.txt " ] ,
217
+ swiftSettings: strictConcurrencySettings
203
218
) ,
204
219
205
220
. testTarget(
206
221
name: " SemanticIndexTests " ,
207
222
dependencies: [
208
223
" SemanticIndex "
209
- ]
224
+ ] ,
225
+ swiftSettings: strictConcurrencySettings
210
226
) ,
211
227
212
228
// MARK: SKCore
@@ -227,15 +243,16 @@ let package = Package(
227
243
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
228
244
] ,
229
245
exclude: [ " CMakeLists.txt " ] ,
230
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
246
+ swiftSettings: strictConcurrencySettings
231
247
) ,
232
248
233
249
. testTarget(
234
250
name: " SKCoreTests " ,
235
251
dependencies: [
236
252
" SKCore " ,
237
253
" SKTestSupport " ,
238
- ]
254
+ ] ,
255
+ swiftSettings: strictConcurrencySettings
239
256
) ,
240
257
241
258
// MARK: SKSupport
@@ -252,7 +269,7 @@ let package = Package(
252
269
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
253
270
] ,
254
271
exclude: [ " CMakeLists.txt " ] ,
255
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
272
+ swiftSettings: strictConcurrencySettings
256
273
) ,
257
274
258
275
. testTarget(
@@ -262,7 +279,8 @@ let package = Package(
262
279
" SKSupport " ,
263
280
" SKTestSupport " ,
264
281
" SwiftExtensions " ,
265
- ]
282
+ ] ,
283
+ swiftSettings: strictConcurrencySettings
266
284
) ,
267
285
268
286
// MARK: SKSwiftPMWorkspace
@@ -279,7 +297,7 @@ let package = Package(
279
297
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
280
298
] ,
281
299
exclude: [ " CMakeLists.txt " ] ,
282
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
300
+ swiftSettings: strictConcurrencySettings
283
301
) ,
284
302
285
303
. testTarget(
@@ -293,7 +311,8 @@ let package = Package(
293
311
" SourceKitLSP " ,
294
312
. product( name: " SwiftPM-auto " , package : " swift-package-manager " ) ,
295
313
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
296
- ]
314
+ ] ,
315
+ swiftSettings: strictConcurrencySettings
297
316
) ,
298
317
299
318
// MARK: SKTestSupport
@@ -312,9 +331,8 @@ let package = Package(
312
331
. product( name: " ISDBTestSupport " , package : " indexstore-db " ) ,
313
332
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
314
333
] ,
315
- resources: [
316
- . copy( " INPUTS " )
317
- ]
334
+ resources: [ . copy( " INPUTS " ) ] ,
335
+ swiftSettings: strictConcurrencySettings
318
336
) ,
319
337
320
338
// MARK: SourceKitD
@@ -330,7 +348,7 @@ let package = Package(
330
348
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
331
349
] ,
332
350
exclude: [ " CMakeLists.txt " , " sourcekitd_uids.swift.gyb " ] ,
333
- swiftSettings: [ . enableExperimentalFeature ( " StrictConcurrency " ) ]
351
+ swiftSettings: strictConcurrencySettings
334
352
) ,
335
353
336
354
. testTarget(
@@ -340,7 +358,8 @@ let package = Package(
340
358
" SKCore " ,
341
359
" SKTestSupport " ,
342
360
" SwiftExtensions " ,
343
- ]
361
+ ] ,
362
+ swiftSettings: strictConcurrencySettings
344
363
) ,
345
364
346
365
// MARK: SourceKitLSP
@@ -369,7 +388,8 @@ let package = Package(
369
388
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
370
389
. product( name: " SwiftPM-auto " , package : " swift-package-manager " ) ,
371
390
] ,
372
- exclude: [ " CMakeLists.txt " ]
391
+ exclude: [ " CMakeLists.txt " ] ,
392
+ swiftSettings: strictConcurrencySettings
373
393
) ,
374
394
375
395
. testTarget(
@@ -393,14 +413,16 @@ let package = Package(
393
413
// be used by test cases that test macros (see `SwiftPMTestProject.macroPackageManifest`).
394
414
. product( name: " SwiftCompilerPlugin " , package : " swift-syntax " ) ,
395
415
. product( name: " SwiftSyntaxMacros " , package : " swift-syntax " ) ,
396
- ]
416
+ ] ,
417
+ swiftSettings: strictConcurrencySettings
397
418
) ,
398
419
399
420
// MARK: SwiftExtensions
400
421
401
422
. target(
402
423
name: " SwiftExtensions " ,
403
- exclude: [ " CMakeLists.txt " ]
424
+ exclude: [ " CMakeLists.txt " ] ,
425
+ swiftSettings: strictConcurrencySettings
404
426
) ,
405
427
]
406
428
)
0 commit comments