Skip to content

Commit b645ad4

Browse files
weissiJohannes Weiss
and
Johannes Weiss
authored
fix 5.10 compile on Ubuntu 24.04 (Noble) for Intel (x86_64) (#810)
Specifically Swift 5.10 _on Intel on Ubuntu Noble (24.04)_ has a crazy bug which leads to compilation failures in a `#if compiler(>=6.0)` block: swiftlang/swift#79285 . This workaround fixes the compilation by _changing the whitespace_. Thanks @gwynne for finding this workaround! --------- Co-authored-by: Johannes Weiss <[email protected]>
1 parent 89dc8d0 commit b645ad4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/AsyncHTTPClient/StructuredConcurrencyHelpers.swift

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
1313
//===----------------------------------------------------------------------===//
14+
// swift-format-ignore
15+
// Note: Whitespace changes are used to workaround compiler bug
16+
// https://github.com/swiftlang/swift/issues/79285
1417

1518
#if compiler(>=6.0)
1619
@inlinable
1720
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
1821
internal func asyncDo<R>(
1922
isolation: isolated (any Actor)? = #isolation,
20-
_ body: () async throws -> sending R,
21-
finally: sending @escaping ((any Error)?) async throws -> Void
22-
) async throws -> sending R {
23+
// DO NOT FIX THE WHITESPACE IN THE NEXT LINE UNTIL 5.10 IS UNSUPPORTED
24+
// https://github.com/swiftlang/swift/issues/79285
25+
_ body: () async throws -> sending R, finally: sending @escaping ((any Error)?) async throws -> Void) async throws -> sending R {
2326
let result: R
2427
do {
2528
result = try await body()

0 commit comments

Comments
 (0)