Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
target: "wasm32-unknown-wasi"
- os: ubuntu-22.04
toolchain:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a-ubuntu22.04.tar.gz
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a-ubuntu22.04.tar.gz
wasi-backend: Node
target: "wasm32-unknown-wasip1"
- os: ubuntu-22.04
toolchain:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a-ubuntu22.04.tar.gz
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a-ubuntu22.04.tar.gz
wasi-backend: Node
target: "wasm32-unknown-wasip1-threads"

Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: actions/checkout@v5
- uses: ./.github/actions/install-swift
with:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a-ubuntu22.04.tar.gz
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a-ubuntu22.04.tar.gz
- run: make bootstrap
- run: ./Utilities/bridge-js-generate.sh
- name: Check if BridgeJS generated files are up-to-date
Expand All @@ -112,7 +112,7 @@ jobs:
- uses: actions/checkout@v5
- uses: ./.github/actions/install-swift
with:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a/swift-DEVELOPMENT-SNAPSHOT-2025-08-27-a-ubuntu22.04.tar.gz
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a/swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a-ubuntu22.04.tar.gz
- uses: swiftwasm/setup-swiftwasm@v2
id: setup-wasm32-unknown-wasip1
with: { target: wasm32-unknown-wasip1 }
Expand Down
7 changes: 7 additions & 0 deletions Plugins/PackageToJS/Tests/ExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ extension Trait where Self == ConditionTrait {
}
}

// FIXME: This test fails on Swift 6.3 and later due to memory corruption
// Enable it back when https://github.com/swiftlang/swift-driver/pull/1987 is included in the snapshot
#if !compiler(>=6.3)
@Test(.requireSwiftSDK)
func testing() throws {
let swiftSDKID = try #require(Self.getSwiftSDKID())
Expand Down Expand Up @@ -313,6 +316,7 @@ extension Trait where Self == ConditionTrait {
}
}
#endif
#endif // compiler(>=6.3)

@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasip1-threads"))
func multithreading() throws {
Expand All @@ -338,6 +342,8 @@ extension Trait where Self == ConditionTrait {
}
}

// FIXME: This test fails on the current main snapshot
#if !compiler(>=6.3)
@Test(.requireEmbeddedSwiftInToolchain(triple: "wasm32-unknown-none-wasm"))
func embeddedWasmUnknownNone() throws {
try withPackage(at: "Examples/Embedded") { packageDir, _, runSwift in
Expand All @@ -362,6 +368,7 @@ extension Trait where Self == ConditionTrait {
)
}
}
#endif // compiler(>=6.3)

@Test(.requireSwiftSDK)
func continuationLeakInTest_XCTest() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import _Concurrency
import _CJavaScriptKit

#if compiler(>=6.2)
#if compiler(>=6.3)

// MARK: - MainExecutor Implementation
// MainExecutor is used by the main actor to execute tasks on the main thread
Expand Down Expand Up @@ -104,4 +104,4 @@ extension JavaScriptEventLoop: ExecutorFactory {
}
}

#endif // compiler(>=6.2)
#endif // compiler(>=6.3)
4 changes: 2 additions & 2 deletions Sources/JavaScriptEventLoop/JavaScriptEventLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public final class JavaScriptEventLoop: SerialExecutor, @unchecked Sendable {
private static func installGlobalExecutorIsolated() {
guard !didInstallGlobalExecutor else { return }
didInstallGlobalExecutor = true
#if compiler(>=6.2)
#if compiler(>=6.3)
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999, *) {
// For Swift 6.2 and above, we can use the new `ExecutorFactory` API
// For Swift 6.3 and above, we can use the new `ExecutorFactory` API
_Concurrency._createExecutors(factory: JavaScriptEventLoop.self)
}
#else
Expand Down
16 changes: 15 additions & 1 deletion Utilities/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@

set -euo pipefail

EXCLUDED_EXAMPLES=("Embedded")

for example in Examples/*; do
skip_example=false
for excluded in "${EXCLUDED_EXAMPLES[@]}"; do
if [[ "$example" == *"$excluded"* ]]; then
skip_example=true
break
fi
done
if [ "$skip_example" = true ]; then
echo "Skipping $example"
continue
fi

if [ -d "$example" ] && [ -f "$example/build.sh" ]; then
echo "Building $example"
set -x
(cd "$example" && ./build.sh release)
{ set +x; } 2>/dev/null
fi
done
done