Skip to content

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

Merged
merged 4 commits into from
May 22, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented May 20, 2018

  • 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().

- 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().
@spevans
Copy link
Contributor Author

spevans commented May 20, 2018

@swift-ci please test

Copy link
Contributor

@parkera parkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@spevans
Copy link
Contributor Author

spevans commented May 21, 2018

@swift-ci please test

self.launchPath = newValue?.path
}

@available(*, deprecated: 4, renamed: "executableURL")
Copy link
Contributor

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:)

Copy link
Contributor

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, …)

Copy link
Contributor Author

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.

@spevans
Copy link
Contributor Author

spevans commented May 21, 2018

@swift-ci please test

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented May 22, 2018

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented May 22, 2018

@swift-ci please test

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented May 22, 2018

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented May 22, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit b1647ac into swiftlang:master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants