From 5900d01ab732d7a974824ba5f8e89d3d515c91d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kolos=20Folta=CC=81nyi?= Date: Tue, 6 May 2025 19:00:00 +0200 Subject: [PATCH] Fix Swift 5.10 toolchain issue on Linux builds --- Sources/IssueReporting/ErrorReporting.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/IssueReporting/ErrorReporting.swift b/Sources/IssueReporting/ErrorReporting.swift index 502fea6..08b5306 100644 --- a/Sources/IssueReporting/ErrorReporting.swift +++ b/Sources/IssueReporting/ErrorReporting.swift @@ -1,3 +1,7 @@ +// swift-format-ignore +// Note: Whitespace changes are used to workaround compiler bug +// https://github.com/swiftlang/swift/issues/79285 + /// Evaluates a throwing closure and automatically catches and reports any error thrown. /// /// - Parameters: @@ -74,8 +78,9 @@ public func withErrorReporting( line: UInt = #line, column: UInt = #column, isolation: isolated (any Actor)? = #isolation, - catching body: () async throws -> sending R - ) async -> R? { + // DO NOT FIX THE WHITESPACE IN THE NEXT LINE UNTIL 5.10 IS UNSUPPORTED + // https://github.com/swiftlang/swift/issues/79285 + catching body: () async throws -> sending R) async -> R? { if let reporters { return await withIssueReporters(reporters) { do {