From 5c2854d7bd24a44a2d5b83451884758c122ef040 Mon Sep 17 00:00:00 2001 From: "Aryan Singh K." <70511529+aryansk@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:38:01 +0530 Subject: [PATCH 1/3] fix(wasi): use mock TLS for all non-threaded WASI targets (#378) The gate os(WASI) && (swift(<6.1) || !_runtime) incorrectly falls through to pthread APIs on Swift 6.1+ non-threaded WASI, where pthread_* is not in scope. Guard solely on !_runtime. Fixes #370 --- Sources/System/Internals/Exports.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/System/Internals/Exports.swift b/Sources/System/Internals/Exports.swift index 088a325..6ce7d4d 100644 --- a/Sources/System/Internals/Exports.swift +++ b/Sources/System/Internals/Exports.swift @@ -184,7 +184,7 @@ extension String { // TLS #if os(Windows) internal typealias _PlatformTLSKey = DWORD -#elseif os(WASI) && (swift(<6.1) || !_runtime(_multithreaded)) +#elseif os(WASI) && !_runtime(_multithreaded) // Mock TLS storage for single-threaded WASI. // Carries no state of its own, and only used to index `sharedTLSStorage`. internal final class _PlatformTLSKey: @unchecked Sendable { @@ -214,7 +214,7 @@ internal func makeTLSKey() -> _PlatformTLSKey { fatalError("Unable to create key") } return raw - #elseif os(WASI) && (swift(<6.1) || !_runtime(_multithreaded)) + #elseif os(WASI) && !_runtime(_multithreaded) return _PlatformTLSKey() #else var raw = pthread_key_t() From 869129b7bf4ecc57b97d0193ad29690ca2134750 Mon Sep 17 00:00:00 2001 From: "Aryan Singh K." <70511529+aryansk@users.noreply.github.com> Date: Fri, 14 Aug 2026 01:24:10 +0530 Subject: [PATCH 2/3] fix(MachPort): silence concurrency check for mach_task_self_ (#379) Darwin.Mach's mach_task_self_ is a shared global; Swift 6.3 reports it as not concurrency-safe when imported. Use a preconcurrency import for older Darwin SDKs. Fixes #373 Co-authored-by: Guillaume Lessard --- Sources/System/MachPort.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/System/MachPort.swift b/Sources/System/MachPort.swift index 124ab0d..c501c82 100644 --- a/Sources/System/MachPort.swift +++ b/Sources/System/MachPort.swift @@ -9,7 +9,11 @@ #if SYSTEM_PACKAGE_DARWIN +#if canImport(Darwin, _version: 310) import Darwin.Mach +#else +@preconcurrency import Darwin.Mach +#endif @available(System 1.4.0, *) public protocol MachPortRight {} From b0d4217c8c38c24cf38f95b2a830fe24593ef2cb Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Fri, 25 Sep 2026 14:58:42 -0700 Subject: [PATCH 3/3] [ci] update github actions (#389) * [ci] update version of workflows dependencies --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 84b09ac..ca6fbea 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -10,7 +10,7 @@ on: jobs: tests: name: Test - uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.12 + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.15 with: swift_flags: "-Xbuild-tools-swiftc -DSYSTEM_CI" enable_linux_checks: true @@ -65,7 +65,7 @@ jobs: build-abi-stable: name: Build ABI Stable - uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.12 + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.15 with: enable_linux_checks: false enable_macos_checks: true @@ -112,7 +112,7 @@ jobs: soundness: name: Soundness - uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.12 + uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.15 with: license_header_check_project_name: "Swift.org" # https://github.com/apple/swift-system/issues/224