Skip to content

Commit 73f5ab9

Browse files
Fix Swift 6.2 compile issue around ExecutorFactory API
The `ExecutorFactory` API was reverted in Swift 6.2, so we have to change the guard to Swift 6.3.
1 parent 0b78561 commit 73f5ab9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/JavaScriptEventLoop/JavaScriptEventLoop+ExecutorFactory.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import _Concurrency
88
import _CJavaScriptKit
99

10-
#if compiler(>=6.2)
10+
#if compiler(>=6.3)
1111

1212
// MARK: - MainExecutor Implementation
1313
// MainExecutor is used by the main actor to execute tasks on the main thread
@@ -104,4 +104,4 @@ extension JavaScriptEventLoop: ExecutorFactory {
104104
}
105105
}
106106

107-
#endif // compiler(>=6.2)
107+
#endif // compiler(>=6.3)

Sources/JavaScriptEventLoop/JavaScriptEventLoop.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ public final class JavaScriptEventLoop: SerialExecutor, @unchecked Sendable {
119119
private static func installGlobalExecutorIsolated() {
120120
guard !didInstallGlobalExecutor else { return }
121121
didInstallGlobalExecutor = true
122-
#if compiler(>=6.2)
122+
#if compiler(>=6.3)
123123
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999, *) {
124-
// For Swift 6.2 and above, we can use the new `ExecutorFactory` API
124+
// For Swift 6.3 and above, we can use the new `ExecutorFactory` API
125125
_Concurrency._createExecutors(factory: JavaScriptEventLoop.self)
126126
}
127127
#else

0 commit comments

Comments
 (0)