-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Process: Deprecate old methods and properties, implement run() #1558
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
Conversation
- Mark launchPath and currentDirectoryPath as deprecated, replace with executableURL and currentDirectoryURL. - Implement run() and Process.run(_:arguments:terminationHandler:) and mark launch() and Process.launchedProcess(path:arguments:) as deprecated. - Update DarwinCompatibility Tests to 10.13 to use run().
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@swift-ci please test |
Foundation/Process.swift
Outdated
self.launchPath = newValue?.path | ||
} | ||
|
||
@available(*, deprecated: 4, renamed: "executableURL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is allowed, I don't think the semantics for this are well-defined. (The '4' in the deprecated:
portion is meant to be the version of the platform specified just after @available(
, but in this case there's none.)
The semantically appropriate thing to do here, I think, is just to mark it:
@available(*, deprecated, renamed:…)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless it is undocumented that the Swift version is used even if the tag is not @available(swift, …)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if a version number was required, its fixed now.
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test and merge |
Mark launchPath and currentDirectoryPath as deprecated,
replace with executableURL and currentDirectoryURL.
Implement run() and Process.run(_:arguments:terminationHandler:)
and mark launch() and Process.launchedProcess(path:arguments:) as
deprecated.
Update DarwinCompatibility Tests to 10.13 to use run().