|
1 | | -// swift-tools-version:5.9 |
| 1 | +// swift-tools-version:6.0 |
2 | 2 |
|
3 | 3 | import CompilerPluginSupport |
4 | 4 | import PackageDescription |
@@ -77,16 +77,21 @@ let package = Package( |
77 | 77 | .product(name: "MacroTesting", package: "swift-macro-testing"), |
78 | 78 | ] |
79 | 79 | ), |
80 | | - ] |
| 80 | + ], |
| 81 | + swiftLanguageModes: [.v6] |
81 | 82 | ) |
82 | 83 |
|
83 | | -#if compiler(>=6) |
84 | | - for target in package.targets where target.type != .system && target.type != .test { |
85 | | - target.swiftSettings = target.swiftSettings ?? [] |
86 | | - target.swiftSettings?.append(contentsOf: [ |
87 | | - .enableExperimentalFeature("StrictConcurrency"), |
88 | | - .enableUpcomingFeature("ExistentialAny"), |
89 | | - .enableUpcomingFeature("InferSendableFromCaptures"), |
90 | | - ]) |
91 | | - } |
92 | | -#endif |
| 84 | +for target in package.targets { |
| 85 | + target.swiftSettings = target.swiftSettings ?? [] |
| 86 | + target.swiftSettings?.append(contentsOf: [ |
| 87 | + .enableUpcomingFeature("ExistentialAny") |
| 88 | + ]) |
| 89 | +} |
| 90 | + |
| 91 | +for target in package.targets where target.type == .system || target.type == .test { |
| 92 | + target.swiftSettings?.append(contentsOf: [ |
| 93 | + .swiftLanguageMode(.v5), |
| 94 | + .enableExperimentalFeature("StrictConcurrency"), |
| 95 | + .enableUpcomingFeature("InferSendableFromCaptures"), |
| 96 | + ]) |
| 97 | +} |
0 commit comments