From c5cbb00da165ed8de1110f258872888ab98504b8 Mon Sep 17 00:00:00 2001 From: Scott Marchant Date: Tue, 30 Sep 2025 10:38:47 -0600 Subject: [PATCH 1/3] fix: Compiler error in unit tests, missed by CI. --- Tests/DispatchAsyncTests/DispatchGroupTests.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/DispatchAsyncTests/DispatchGroupTests.swift b/Tests/DispatchAsyncTests/DispatchGroupTests.swift index dd3f3ef..5be7f3b 100644 --- a/Tests/DispatchAsyncTests/DispatchGroupTests.swift +++ b/Tests/DispatchAsyncTests/DispatchGroupTests.swift @@ -44,7 +44,7 @@ struct DispatchGroupTests { let result = Result() let group = DispatchGroup() - await result.append(value: "|🔵\(iteration)") + await result.append(value: "|🔵\(index)") group.enter() Task { @@ -67,7 +67,7 @@ struct DispatchGroupTests { await withCheckedContinuation { continuation in group.notify(queue: .main) { Task { - await result.append(value: "🟢\(iteration)=") + await result.append(value: "🟢\(index)=") continuation.resume() } } @@ -115,7 +115,7 @@ struct DispatchGroupTests { /// ``` /// /// ``` - /// // BAD! (green globe comes before a purle one) + /// // BAD! (green globe comes before a purple one) /// |🔵42🟣/🟣^🟢42🟣\= /// ``` /// From 46fff1cac1ea2a1f3e466a4090d5eda459d3fe28 Mon Sep 17 00:00:00 2001 From: Scott Marchant Date: Tue, 30 Sep 2025 11:19:15 -0600 Subject: [PATCH 2/3] chore: Address swift-format lint issues. --- Tests/DispatchAsyncTests/DispatchGroupTests.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/DispatchAsyncTests/DispatchGroupTests.swift b/Tests/DispatchAsyncTests/DispatchGroupTests.swift index 5be7f3b..61717bc 100644 --- a/Tests/DispatchAsyncTests/DispatchGroupTests.swift +++ b/Tests/DispatchAsyncTests/DispatchGroupTests.swift @@ -27,11 +27,11 @@ private typealias DispatchQueue = DispatchAsync.DispatchQueue @Suite("DispatchGroup Tests") struct DispatchGroupTests { @Test(arguments: [1000]) - @available(macOS 13, iOS 16, tvOS 16, watchOS 9, *) - func dispatchGroupOrderCleanliness(repetitions: Int) async throws { - // Repeating this `repetitions` number of times to help rule out - // edge cases that only show up some of the time - for index in 0 ..< repetitions { + @available(macOS 13, iOS 16, tvOS 16, watchOS 9, *) + func dispatchGroupOrderCleanliness(repetitions: Int) async throws { + // Repeating this `repetitions` number of times to help rule out + // edge cases that only show up some of the time + for index in 0 ..< repetitions { Task { actor Result { private(set) var value = "" From c102fc513967b2d19b09cdb1a374c114031d7bcc Mon Sep 17 00:00:00 2001 From: Scott Marchant Date: Tue, 30 Sep 2025 11:26:25 -0600 Subject: [PATCH 3/3] ci: Enable native swift wasm and macos build tests. Note that swift embedded doesn't currently compile, which is tracked by https://github.com/PassiveLogic/swift-dispatch-async/issues/4. --- .github/workflows/pull_request.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4c5197c..835f9e0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -17,9 +17,15 @@ jobs: name: tests uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main with: + # Runners aren't set up for this currently in GitHub/PassiveLogic enable_macos_checks: false + linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"5.10.1\"}, {\"swift_version\": \"6.0\"}]" enable_windows_checks: false + enable_wasm_sdk_build: true + + # TODO: Fix swift embedded, see https://github.com/PassiveLogic/swift-dispatch-async/issues/4 + enable_embedded_wasm_sdk_build: false wasm-sdk: name: WebAssembly SDK