From fabc782c093e888d60b0fdfd5c5e77525256e714 Mon Sep 17 00:00:00 2001 From: Kayos Date: Wed, 29 Apr 2026 13:44:57 -0700 Subject: [PATCH] =?UTF-8?q?clients/swift:=20fileprivate=20=E2=86=92=20inte?= =?UTF-8?q?rnal=20on=20URLSession=20bridge=20helpers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sessions.swift is a separate file from ForgeClient.swift but in the same module — fileprivate blocked the cross-file call. internal (default) is the correct visibility: same-module accessible, not part of public API. Also dropped the unused @preconcurrency on Sessions.swift's Foundation imports — that file doesn't reference Sendable-warning-emitting types directly (URLSession etc), so the attribute was a no-op generating remarks. Kept @preconcurrency on ForgeClient.swift where it actually suppresses URL/URLSession/JSONEncoder/JSONDecoder Sendable warnings. Caught by crafting-table queue (job 77012573) — first real dogfood of the build farm. exit_1, log surfaced the inaccessibility error in 6s. --- clients/swift/Sources/Clawdforge/ForgeClient+Sessions.swift | 4 ++-- clients/swift/Sources/Clawdforge/ForgeClient.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/swift/Sources/Clawdforge/ForgeClient+Sessions.swift b/clients/swift/Sources/Clawdforge/ForgeClient+Sessions.swift index f1f60c9..683d71e 100644 --- a/clients/swift/Sources/Clawdforge/ForgeClient+Sessions.swift +++ b/clients/swift/Sources/Clawdforge/ForgeClient+Sessions.swift @@ -17,10 +17,10 @@ // `withSession(_:_:)` wraps create + work + auto-close (on success and on // throw). -@preconcurrency import Foundation +import Foundation #if canImport(FoundationNetworking) -@preconcurrency import FoundationNetworking +import FoundationNetworking #endif extension ForgeClient { diff --git a/clients/swift/Sources/Clawdforge/ForgeClient.swift b/clients/swift/Sources/Clawdforge/ForgeClient.swift index 4ec6850..d1dbf6e 100644 --- a/clients/swift/Sources/Clawdforge/ForgeClient.swift +++ b/clients/swift/Sources/Clawdforge/ForgeClient.swift @@ -37,7 +37,7 @@ extension URLSession { /// Async `(Data, URLResponse)` for a request — uses the native API on /// Apple, bridges the callback API on Linux. Behaves identically. - fileprivate func forgeData(for request: URLRequest) async throws -> (Data, URLResponse) { + internal func forgeData(for request: URLRequest) async throws -> (Data, URLResponse) { #if canImport(FoundationNetworking) return try await withCheckedThrowingContinuation { cont in let task = self.dataTask(with: request) { data, response, error in @@ -56,7 +56,7 @@ extension URLSession { /// Async upload from a file — uses the native API on Apple, bridges /// the callback API on Linux. - fileprivate func forgeUpload(for request: URLRequest, fromFile fileURL: URL) async throws -> (Data, URLResponse) { + internal func forgeUpload(for request: URLRequest, fromFile fileURL: URL) async throws -> (Data, URLResponse) { #if canImport(FoundationNetworking) return try await withCheckedThrowingContinuation { cont in let task = self.uploadTask(with: request, fromFile: fileURL) { data, response, error in