Skip to content

Commit b82a600

Browse files
committed
Revert "[Wrangle] Temporarily revert noasync annotation"
This reverts commit 3d75b96.
1 parent 3d75b96 commit b82a600

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

Sources/TSCBasic/Await.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
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.8)
18-
//@available(*, noasync)
19-
//#endif
17+
#if compiler(>=5.8)
18+
@available(*, noasync)
19+
#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.8)
25-
//@available(*, noasync)
26-
//#endif
24+
#if compiler(>=5.8)
25+
@available(*, noasync)
26+
#endif
2727
public func tsc_await<T>(_ body: (@escaping (T) -> Void) -> Void) -> T {
2828
let condition = Condition()
2929
var result: T? = nil

Sources/TSCBasic/Process.swift

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

837837
/// Blocks the calling process until the subprocess finishes execution.
838-
// #if compiler(>=5.8)
839-
// @available(*, noasync)
840-
// #endif
838+
#if compiler(>=5.8)
839+
@available(*, noasync)
840+
#endif
841841
@discardableResult
842842
public func waitUntilExit() throws -> ProcessResult {
843843
let group = DispatchGroup()
@@ -1060,9 +1060,9 @@ 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.8)
1064-
// @available(*, noasync)
1065-
// #endif
1063+
#if compiler(>=5.8)
1064+
@available(*, noasync)
1065+
#endif
10661066
static public func popen(
10671067
arguments: [String],
10681068
environment: [String: String] = ProcessEnv.vars,
@@ -1097,9 +1097,9 @@ extension Process {
10971097
/// will be inherited.
10981098
/// - loggingHandler: Handler for logging messages
10991099
/// - Returns: The process result.
1100-
// #if compiler(>=5.8)
1101-
// @available(*, noasync)
1102-
// #endif
1100+
#if compiler(>=5.8)
1101+
@available(*, noasync)
1102+
#endif
11031103
@discardableResult
11041104
static public func popen(
11051105
arguments: [String],
@@ -1124,9 +1124,9 @@ extension Process {
11241124
/// will be inherited.
11251125
/// - loggingHandler: Handler for logging messages
11261126
/// - Returns: The process result.
1127-
// #if compiler(>=5.8)
1128-
// @available(*, noasync)
1129-
// #endif
1127+
#if compiler(>=5.8)
1128+
@available(*, noasync)
1129+
#endif
11301130
@discardableResult
11311131
static public func popen(
11321132
args: String...,
@@ -1144,9 +1144,9 @@ extension Process {
11441144
/// will be inherited.
11451145
/// - loggingHandler: Handler for logging messages
11461146
/// - Returns: The process output (stdout + stderr).
1147-
// #if compiler(>=5.8)
1148-
// @available(*, noasync)
1149-
// #endif
1147+
#if compiler(>=5.8)
1148+
@available(*, noasync)
1149+
#endif
11501150
@discardableResult
11511151
static public func checkNonZeroExit(
11521152
arguments: [String],
@@ -1176,9 +1176,9 @@ extension Process {
11761176
/// will be inherited.
11771177
/// - loggingHandler: Handler for logging messages
11781178
/// - Returns: The process output (stdout + stderr).
1179-
// #if compiler(>=5.8)
1180-
// @available(*, noasync)
1181-
// #endif
1179+
#if compiler(>=5.8)
1180+
@available(*, noasync)
1181+
#endif
11821182
@discardableResult
11831183
static public func checkNonZeroExit(
11841184
args: String...,

Sources/TSCBasic/ProcessSet.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ 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.8)
68-
// @available(*, noasync)
69-
// #endif
67+
#if compiler(>=5.8)
68+
@available(*, noasync)
69+
#endif
7070
public func terminate() {
7171
// Mark a process set as cancelled.
7272
serialQueue.sync {

Tests/TSCBasicTests/ProcessTests.swift

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

482-
// #if compiler(>=5.8)
483-
// @available(*, noasync)
484-
// #endif
482+
#if compiler(>=5.8)
483+
@available(*, noasync)
484+
#endif
485485
static func checkNonZeroExit(
486486
scriptName: String,
487487
environment: [String: String] = ProcessEnv.vars,
@@ -498,9 +498,9 @@ fileprivate extension Process {
498498
return try await checkNonZeroExit(args: script(scriptName), environment: environment, loggingHandler: loggingHandler)
499499
}
500500

501-
// #if compiler(>=5.8)
502-
// @available(*, noasync)
503-
// #endif
501+
#if compiler(>=5.8)
502+
@available(*, noasync)
503+
#endif
504504
@discardableResult
505505
static func popen(
506506
scriptName: String,

0 commit comments

Comments
 (0)