Skip to content

Commit 82d37e9

Browse files
drop swift 6.1
1 parent 453b841 commit 82d37e9

12 files changed

Lines changed: 23 additions & 267 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
entry:
1515
- os: ubuntu-22.04
1616
toolchain:
17-
download-url: https://download.swift.org/swift-6.1-release/ubuntu2204/swift-6.1-RELEASE/swift-6.1-RELEASE-ubuntu22.04.tar.gz
17+
download-url: https://download.swift.org/swift-6.2-release/ubuntu2204/swift-6.2-RELEASE/swift-6.2-RELEASE-ubuntu22.04.tar.gz
1818
wasi-backend: Node
1919
target: "wasm32-unknown-wasi"
2020
env: |
@@ -77,8 +77,6 @@ jobs:
7777
strategy:
7878
matrix:
7979
entry:
80-
- image: "swift:6.1.2"
81-
swift-syntax-version: "601.0.0"
8280
- image: "swift:6.2"
8381
swift-syntax-version: "602.0.0"
8482
- image: "swift:6.3"
@@ -134,7 +132,7 @@ jobs:
134132
format:
135133
runs-on: ubuntu-latest
136134
container:
137-
image: swift:6.1.2
135+
image: swift:6.2
138136
steps:
139137
- uses: actions/checkout@v6
140138
- run: ./Utilities/format.swift

Examples/Embedded/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Embedded example
22

3-
Requires a recent DEVELOPMENT-SNAPSHOT toolchain. (tested with swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-21-a)
3+
Requires a recent DEVELOPMENT-SNAPSHOT toolchain.
44

55
```sh
66
$ ./build.sh

Package@swift-6.1.swift

Lines changed: 0 additions & 222 deletions
This file was deleted.

Plugins/PackageToJS/Tests/ExampleTests.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ extension Trait where Self == ConditionTrait {
297297
}
298298
}
299299

300-
#if compiler(>=6.1)
301300
@Test(.requireSwiftSDK)
302301
func testingWithCoverage() throws {
303302
let swiftSDKID = try #require(Self.getSwiftSDKID())
@@ -325,7 +324,6 @@ extension Trait where Self == ConditionTrait {
325324
}
326325
}
327326
}
328-
#endif
329327
#endif // compiler(>=6.3)
330328

331329
@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasip1-threads"))
@@ -379,7 +377,6 @@ extension Trait where Self == ConditionTrait {
379377
}
380378
}
381379

382-
#if compiler(>=6.1)
383380
// TODO: Remove triple restriction once swift-testing is shipped in p1-threads SDK
384381
@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasi"))
385382
func continuationLeakInTest_SwiftTesting() throws {
@@ -391,8 +388,6 @@ extension Trait where Self == ConditionTrait {
391388
try runSwift(["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test"], [:])
392389
}
393390
}
394-
#endif
395-
396391
@Test(.requireSwiftSDK)
397392
func playwrightOnPageLoad_XCTest() throws {
398393
let swiftSDKID = try #require(Self.getSwiftSDKID())
@@ -413,7 +408,6 @@ extension Trait where Self == ConditionTrait {
413408
}
414409
}
415410

416-
#if compiler(>=6.1)
417411
// TODO: Remove triple restriction once swift-testing is shipped in p1-threads SDK
418412
@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasi"))
419413
func playwrightOnPageLoad_SwiftTesting() throws {
@@ -434,5 +428,4 @@ extension Trait where Self == ConditionTrait {
434428
)
435429
}
436430
}
437-
#endif
438431
}

Sources/JavaScriptEventLoop/JSRemote.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extension JSRemote where T == JSObject {
6262
///
6363
/// - Parameter object: The JavaScript object to reference remotely.
6464
public init(_ object: JSObject) {
65-
#if compiler(>=6.1) && _runtime(_multithreaded)
65+
#if _runtime(_multithreaded)
6666
self.init(sourceObject: object, sourceTid: object.ownerTid)
6767
#else
6868
self.init(sourceObject: object, sourceTid: -1)
@@ -92,7 +92,7 @@ extension JSRemote where T == JSObject {
9292
public func withJSObject<R: Sendable, E: Error>(
9393
_ body: @Sendable @escaping (JSObject) throws(E) -> R
9494
) async throws(E) -> sending R {
95-
#if compiler(>=6.1) && _runtime(_multithreaded)
95+
#if _runtime(_multithreaded)
9696
if storage.sourceTid == swjs_get_worker_thread_id_cached() {
9797
return try body(storage.sourceObject)
9898
}
@@ -137,13 +137,11 @@ private final class _JSRemoteContext: @unchecked Sendable {
137137
}
138138
}
139139

140-
#if compiler(>=6.1)
141140
@_expose(wasm, "swjs_invoke_remote_jsobject_body")
142141
@_cdecl("swjs_invoke_remote_jsobject_body")
143-
#endif
144142
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
145143
func _swjs_invoke_remote_jsobject_body(_ contextPtr: UnsafeRawPointer?) -> Bool {
146-
#if compiler(>=6.1) && _runtime(_multithreaded)
144+
#if _runtime(_multithreaded)
147145
guard let contextPtr else { return true }
148146
let context = Unmanaged<_JSRemoteContext>.fromOpaque(contextPtr).takeRetainedValue()
149147

0 commit comments

Comments
 (0)