From 3d75b96ef9359dc23eb897642e211626ee46ff28 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Wed, 8 Feb 2023 09:17:28 -0800 Subject: [PATCH] [Wrangle] Temporarily revert noasync annotation --- Sources/TSCBasic/Await.swift | 12 ++++----- Sources/TSCBasic/Process.swift | 36 +++++++++++++------------- Sources/TSCBasic/ProcessSet.swift | 6 ++--- Tests/TSCBasicTests/ProcessTests.swift | 12 ++++----- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Sources/TSCBasic/Await.swift b/Sources/TSCBasic/Await.swift index 1ee921e4..d61fd4e3 100644 --- a/Sources/TSCBasic/Await.swift +++ b/Sources/TSCBasic/Await.swift @@ -14,16 +14,16 @@ /// should be passed to the async method's completion handler. /// - Returns: The value wrapped by the async method's result. /// - Throws: The error wrapped by the async method's result -#if compiler(>=5.8) -@available(*, noasync) -#endif +//#if compiler(>=5.8) +//@available(*, noasync) +//#endif public func tsc_await(_ body: (@escaping (Result) -> Void) -> Void) throws -> T { return try tsc_await(body).get() } -#if compiler(>=5.8) -@available(*, noasync) -#endif +//#if compiler(>=5.8) +//@available(*, noasync) +//#endif public func tsc_await(_ body: (@escaping (T) -> Void) -> Void) -> T { let condition = Condition() var result: T? = nil diff --git a/Sources/TSCBasic/Process.swift b/Sources/TSCBasic/Process.swift index 6242106f..6a7a4d43 100644 --- a/Sources/TSCBasic/Process.swift +++ b/Sources/TSCBasic/Process.swift @@ -835,9 +835,9 @@ public final class Process { } /// Blocks the calling process until the subprocess finishes execution. - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult public func waitUntilExit() throws -> ProcessResult { let group = DispatchGroup() @@ -1060,9 +1060,9 @@ extension Process { /// - loggingHandler: Handler for logging messages /// - queue: Queue to use for callbacks /// - completion: A completion handler to return the process result - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif static public func popen( arguments: [String], environment: [String: String] = ProcessEnv.vars, @@ -1097,9 +1097,9 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process result. - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult static public func popen( arguments: [String], @@ -1124,9 +1124,9 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process result. - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult static public func popen( args: String..., @@ -1144,9 +1144,9 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process output (stdout + stderr). - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult static public func checkNonZeroExit( arguments: [String], @@ -1176,9 +1176,9 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process output (stdout + stderr). - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult static public func checkNonZeroExit( args: String..., diff --git a/Sources/TSCBasic/ProcessSet.swift b/Sources/TSCBasic/ProcessSet.swift index 2b519144..724f6e32 100644 --- a/Sources/TSCBasic/ProcessSet.swift +++ b/Sources/TSCBasic/ProcessSet.swift @@ -64,9 +64,9 @@ public final class ProcessSet { /// Terminate all the processes. This method blocks until all processes in the set are terminated. /// /// A process set cannot be used once it has been asked to terminate. - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif public func terminate() { // Mark a process set as cancelled. serialQueue.sync { diff --git a/Tests/TSCBasicTests/ProcessTests.swift b/Tests/TSCBasicTests/ProcessTests.swift index 7ffc680d..1b329059 100644 --- a/Tests/TSCBasicTests/ProcessTests.swift +++ b/Tests/TSCBasicTests/ProcessTests.swift @@ -479,9 +479,9 @@ fileprivate extension Process { self.init(arguments: [Self.script(scriptName)] + arguments, environment: Self.env(), outputRedirection: outputRedirection) } - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif static func checkNonZeroExit( scriptName: String, environment: [String: String] = ProcessEnv.vars, @@ -498,9 +498,9 @@ fileprivate extension Process { return try await checkNonZeroExit(args: script(scriptName), environment: environment, loggingHandler: loggingHandler) } - #if compiler(>=5.8) - @available(*, noasync) - #endif +// #if compiler(>=5.8) +// @available(*, noasync) +// #endif @discardableResult static func popen( scriptName: String,