clients/swift: fileprivate → internal on URLSession bridge helpers
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.
This commit is contained in:
parent
628fb09ac0
commit
fabc782c09
2 changed files with 4 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue