Skip to content

Change RegularExpression back to NSRegularExpression #645

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 1 commit into from
Sep 22, 2016

Conversation

pushkarnk
Copy link
Member

No description provided.

@phausler
Copy link
Contributor

@swift-ci please test and merge

@pushkarnk
Copy link
Member Author

pushkarnk commented Sep 22, 2016

@phausler : Thanks for running the ci test. The URLSession data task test timed out here :-( Can you please trigger the test again?

@parkera
Copy link
Contributor

parkera commented Sep 22, 2016

@swift-ci please test and merge

@swift-ci swift-ci merged commit 9cbae6a into swiftlang:master Sep 22, 2016
@pushkarnk pushkarnk deleted the nsreg branch September 24, 2016 04:30
@colemancda
Copy link
Contributor

colemancda commented Apr 7, 2017

@parkera Any explanation why this was changed? I don't see any JIRA ticket or Swift evolution discussed related to this. Now we have to include a bunch of typealias for Swift 3.0 backwards compatibility. e.g orlandos-nl/BSON@9f3dfc8

@ikesyo
Copy link
Member

ikesyo commented Apr 7, 2017

@colemancda See https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md#proposed-solution.

If the class is planned to have a value-type equivalent in the near future, then keep the NS prefix. Examples: NSAttributedString, NSRegularExpression, NSPredicate.

The class was named as RegularExpression mistakenly at swift-corelibs-foundation (Linux) in Swift 3.0. So I think this is a bug fix.

You should consistently use NSRegularExpression:

#if os(Linux)
#if swift(>=3.1)
#else
public typealias NSRegularExpression = RegularExpression
#endif
#endif

@parkera
Copy link
Contributor

parkera commented Apr 7, 2017

Yah, the darwin version is NSRegularExpression as of Swift 3.0 and our charter here is to match that.

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.

6 participants