From 5d5cda9cea785fcd6afba3a1a5f3071eec4dd2fc Mon Sep 17 00:00:00 2001 From: psmattas Date: Fri, 21 Aug 2026 00:48:17 +0100 Subject: [PATCH] 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. --- OutlineKit/Sources/OutlineKit/Support/RetryPolicy.swift | 2 +- Outpost/Root/APIFailureCenter.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OutlineKit/Sources/OutlineKit/Support/RetryPolicy.swift b/OutlineKit/Sources/OutlineKit/Support/RetryPolicy.swift index dacbd9a..53fc090 100644 --- a/OutlineKit/Sources/OutlineKit/Support/RetryPolicy.swift +++ b/OutlineKit/Sources/OutlineKit/Support/RetryPolicy.swift @@ -14,7 +14,7 @@ public enum RetryPolicy { public static func withRetry( maxAttempts: Int = 3, initialDelay: Duration = .seconds(1), - operation: () async throws -> T + _ operation: () async throws -> T ) async throws -> T { var attempt = 1 var delay = initialDelay diff --git a/Outpost/Root/APIFailureCenter.swift b/Outpost/Root/APIFailureCenter.swift index 40970fa..76f1afd 100644 --- a/Outpost/Root/APIFailureCenter.swift +++ b/Outpost/Root/APIFailureCenter.swift @@ -1,3 +1,4 @@ +import Foundation import Observation import OutlineKit