Skip to content

Fix Swift 5.10 toolchain issue on Linux builds #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Sources/IssueReporting/ErrorReporting.swift
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -74,8 +78,9 @@ public func withErrorReporting<R>(
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 {
Expand Down