fix: RetryPolicy.withRetry closure label, missing Foundation import
RetryPolicy.withRetry's operation param wasn't anonymous (_), so the
14 Outpost call sites that pass the closure in parens - RetryPolicy.
withRetry({ ... }) - rather than as a trailing closure failed to
compile ("Missing argument label 'operation:'" cascading into
nonsense errors about maxAttempts). OutlineKit's own internal call
sites all happened to use trailing-closure syntax, so this only
showed up once the app target actually got compiled. One-line fix at
the declaration (_ operation:) instead of touching every call site -
trailing-closure calls are unaffected either way.
APIFailureCenter.swift used Date/TimeInterval/URL/URLComponents/
URLQueryItem while only importing Observation and OutlineKit -
missing import Foundation. Other new files in the same commit escaped
this because they import SwiftUI, which re-exports Foundation
transitively; this one didn't.
OutlineKit: 92/92 still passing.
This commit is contained in:
@@ -14,7 +14,7 @@ public enum RetryPolicy {
|
||||
public static func withRetry<T: Sendable>(
|
||||
maxAttempts: Int = 3,
|
||||
initialDelay: Duration = .seconds(1),
|
||||
operation: () async throws -> T
|
||||
_ operation: () async throws -> T
|
||||
) async throws -> T {
|
||||
var attempt = 1
|
||||
var delay = initialDelay
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import Foundation
|
||||
import Observation
|
||||
import OutlineKit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user