Skip to content
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

Fix doc comments and availability annotations in Process.swift #484

Open
wants to merge 2 commits 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
29 changes: 14 additions & 15 deletions Sources/TSCBasic/Process/Process.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public struct ProcessResult: CustomStringConvertible, Sendable {
/// The environment with which the process was launched.
public let environmentBlock: ProcessEnvironmentBlock

@available(*, deprecated, renamed: "env")
@available(*, deprecated, renamed: "environmentBlock")
public var environment: [String:String] {
Dictionary<String, String>(uniqueKeysWithValues: self.environmentBlock.map { ($0.key.value, $0.value) })
}
Expand Down Expand Up @@ -100,7 +100,7 @@ public struct ProcessResult: CustomStringConvertible, Sendable {
self.init(arguments: arguments, environmentBlock: environmentBlock, exitStatus: exitStatus, output: output, stderrOutput: stderrOutput)
}

@available(*, deprecated, message: "use `init(arguments:environmentBlock:exitStatusCode:output:stderrOutput:)`")
@available(*, deprecated, message: "use `init(arguments:environmentBlock:exitStatusCode:normal:output:stderrOutput:)`")
public init(
arguments: [String],
environment: [String:String],
Expand Down Expand Up @@ -363,7 +363,7 @@ public final class Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - workingDirectory: The path to the directory under which to run the process.
/// - outputRedirection: How process redirects its output. Default value is .collect.
Expand Down Expand Up @@ -412,10 +412,9 @@ public final class Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - outputRedirection: How process redirects its output. Default value is .collect.
/// - verbose: If true, launch() will print the arguments of the subprocess before launching it.
/// - startNewProcessGroup: If true, a new progress group is created for the child making it
/// continue running even if the parent is killed or interrupted. Default value is true.
/// - loggingHandler: Handler for logging messages
Expand Down Expand Up @@ -996,7 +995,7 @@ extension Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
static public func popen(
Expand Down Expand Up @@ -1029,7 +1028,7 @@ extension Process {
///
/// - Parameters:
/// - args: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
static public func popen(
Expand All @@ -1055,7 +1054,7 @@ extension Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process output (stdout + stderr).
Expand Down Expand Up @@ -1089,7 +1088,7 @@ extension Process {
///
/// - Parameters:
/// - args: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process output (stdout + stderr).
Expand Down Expand Up @@ -1120,7 +1119,7 @@ extension Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - queue: Queue to use for callbacks
Expand Down Expand Up @@ -1176,7 +1175,7 @@ extension Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process result.
Expand Down Expand Up @@ -1214,7 +1213,7 @@ extension Process {
///
/// - Parameters:
/// - args: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process result.
Expand Down Expand Up @@ -1245,7 +1244,7 @@ extension Process {
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process output (stdout + stderr).
Expand Down Expand Up @@ -1287,8 +1286,8 @@ extension Process {
/// Execute a subprocess and get its (UTF-8) output if it has a non zero exit.
///
/// - Parameters:
/// - arguments: The arguments for the subprocess.
/// - environment: The environment to pass to subprocess. By default the current process environment
/// - args: The arguments for the subprocess.
/// - environmentBlock: The environment to pass to subprocess. By default the current process environment
/// will be inherited.
/// - loggingHandler: Handler for logging messages
/// - Returns: The process output (stdout + stderr).
Expand Down