Skip to content

Commit a73a7aa

Browse files
committed
Require a 5.8 compiler to conditionally compile the noasync attribute
This grammar isn't supported in 5.7.
1 parent 3d2497e commit a73a7aa

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Diff for: Sources/TSCBasic/Await.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
/// should be passed to the async method's completion handler.
1515
/// - Returns: The value wrapped by the async method's result.
1616
/// - Throws: The error wrapped by the async method's result
17-
#if compiler(>=5.7)
17+
#if compiler(>=5.8)
1818
@available(*, noasync)
1919
#endif
2020
public func tsc_await<T, ErrorType>(_ body: (@escaping (Result<T, ErrorType>) -> Void) -> Void) throws -> T {
2121
return try tsc_await(body).get()
2222
}
2323

24-
#if compiler(>=5.7)
24+
#if compiler(>=5.8)
2525
@available(*, noasync)
2626
#endif
2727
public func tsc_await<T>(_ body: (@escaping (T) -> Void) -> Void) -> T {

Diff for: Sources/TSCBasic/Process.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ public final class Process {
835835
}
836836

837837
/// Blocks the calling process until the subprocess finishes execution.
838-
#if compiler(>=5.7)
838+
#if compiler(>=5.8)
839839
@available(*, noasync)
840840
#endif
841841
@discardableResult
@@ -1060,7 +1060,7 @@ extension Process {
10601060
/// - loggingHandler: Handler for logging messages
10611061
/// - queue: Queue to use for callbacks
10621062
/// - completion: A completion handler to return the process result
1063-
#if compiler(>=5.7)
1063+
#if compiler(>=5.8)
10641064
@available(*, noasync)
10651065
#endif
10661066
static public func popen(
@@ -1097,7 +1097,7 @@ extension Process {
10971097
/// will be inherited.
10981098
/// - loggingHandler: Handler for logging messages
10991099
/// - Returns: The process result.
1100-
#if compiler(>=5.7)
1100+
#if compiler(>=5.8)
11011101
@available(*, noasync)
11021102
#endif
11031103
@discardableResult
@@ -1124,7 +1124,7 @@ extension Process {
11241124
/// will be inherited.
11251125
/// - loggingHandler: Handler for logging messages
11261126
/// - Returns: The process result.
1127-
#if compiler(>=5.7)
1127+
#if compiler(>=5.8)
11281128
@available(*, noasync)
11291129
#endif
11301130
@discardableResult
@@ -1144,7 +1144,7 @@ extension Process {
11441144
/// will be inherited.
11451145
/// - loggingHandler: Handler for logging messages
11461146
/// - Returns: The process output (stdout + stderr).
1147-
#if compiler(>=5.7)
1147+
#if compiler(>=5.8)
11481148
@available(*, noasync)
11491149
#endif
11501150
@discardableResult
@@ -1176,7 +1176,7 @@ extension Process {
11761176
/// will be inherited.
11771177
/// - loggingHandler: Handler for logging messages
11781178
/// - Returns: The process output (stdout + stderr).
1179-
#if compiler(>=5.7)
1179+
#if compiler(>=5.8)
11801180
@available(*, noasync)
11811181
#endif
11821182
@discardableResult

Diff for: Sources/TSCBasic/ProcessSet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public final class ProcessSet {
6464
/// Terminate all the processes. This method blocks until all processes in the set are terminated.
6565
///
6666
/// A process set cannot be used once it has been asked to terminate.
67-
#if compiler(>=5.7)
67+
#if compiler(>=5.8)
6868
@available(*, noasync)
6969
#endif
7070
public func terminate() {

Diff for: Tests/TSCBasicTests/ProcessTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ fileprivate extension Process {
479479
self.init(arguments: [Self.script(scriptName)] + arguments, environment: Self.env(), outputRedirection: outputRedirection)
480480
}
481481

482-
#if compiler(>=5.7)
482+
#if compiler(>=5.8)
483483
@available(*, noasync)
484484
#endif
485485
static func checkNonZeroExit(
@@ -498,7 +498,7 @@ fileprivate extension Process {
498498
return try await checkNonZeroExit(args: script(scriptName), environment: environment, loggingHandler: loggingHandler)
499499
}
500500

501-
#if compiler(>=5.7)
501+
#if compiler(>=5.8)
502502
@available(*, noasync)
503503
#endif
504504
@discardableResult

0 commit comments

Comments
 (0)