Skip to content

Commit a501eeb

Browse files
Prefer #if compiler over #if swift (#377)
* Prefer `#if compiler` over `#if swift` * Use 'swift' check for KeyPath sendability feature * bump --------- Co-authored-by: Stephen Celis <[email protected]>
1 parent eefcdaa commit a501eeb

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
config: ['debug', 'release']
23-
xcode: ['16.2']
23+
xcode: ['16.4']
2424
steps:
2525
- uses: actions/checkout@v4
2626
- name: Select Xcode ${{ matrix.xcode }}

Sources/Dependencies/WithDependencies.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public func withDependencies<R>(
143143
#endif
144144
}
145145

146-
#if swift(>=6)
146+
#if compiler(>=6)
147147
/// Updates the current dependencies for the duration of an asynchronous operation.
148148
///
149149
/// Any mutations made to ``DependencyValues`` inside `updateValuesForOperation` will be visible
@@ -314,7 +314,7 @@ public func withDependencies<Model: AnyObject, R>(
314314
)
315315
}
316316

317-
#if swift(>=6)
317+
#if compiler(>=6)
318318
/// Updates the current dependencies for the duration of an asynchronous operation by taking the
319319
/// dependencies tied to a given object.
320320
///

Sources/DependenciesTestSupport/TestTrait.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Dependencies
44
import Testing
55

6-
#if swift(>=6.1)
6+
#if compiler(>=6.1)
77
@_documentation(visibility: private)
88
public struct _DependenciesTrait: TestScoping, TestTrait, SuiteTrait {
99
let updateValues: @Sendable (inout DependencyValues) throws -> Void

Tests/DependenciesTests/PrepareDependenciesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import Testing
55

66
@Suite struct PrepareDependenciesTests {
7-
#if swift(>=6.1)
7+
#if compiler(>=6.1)
88
@Test(
99
.serialized,
1010
.dependency(\.uuid, .incrementing),

Tests/DependenciesTests/RootResettingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if swift(>=6.1) && canImport(Testing)
1+
#if compiler(>=6.1) && canImport(Testing)
22
import Dependencies
33
import Foundation
44
import Testing

Tests/DependenciesTests/SwiftTestingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import Testing
77

88
@Suite struct SwiftTestingTests {
9-
#if swift(>=6.1)
9+
#if compiler(>=6.1)
1010
@Test(.dependencies, .serialized, arguments: 1...5)
1111
func parameterizedCachePollution(_ argument: Int) {
1212
@Dependency(Client.self) var client

0 commit comments

Comments
 (0)