-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Migrate code to use Swift Regex #6598
base: main
Are you sure you want to change the base?
Conversation
Swift stdlib Regex APIs are supported starting with macOS 13.0, while SwiftPM needs to support macOS 12.0. I reckon this will need to wait until we can bump the macOS deployment version, for which I can't give an estimate right now I'm afraid. |
The last time we bump the macOS deployment is by #6138 . Why SwiftPM needs to support macOS 12.0? (Due to CI machine is currently not full on macOS 13 or something else?) And I'd like to know is there a clear vision what range of OS version we should support on? (Like most Swift Package will only maintain support for at most 3 version eg. Swift 5.6 5.7 5.8) Currently SwiftPM supports macOS 12 and macOS 13. And I believe when (macOS 13)+1 is released, maybe we can consider to drop macOS 12 support. |
#6138 was merged very recently. I'm inclined to think that the next deployment target bump won't happen at least until new macOS is released and widely available (including CI), but I can't comment on future plans, versions, and schedules. |
Windows support for Regex is questionable. There is no Swift in Swift yet due to bugs with SILOptimizer. We need to ensure that this doesn't regress Windows. |
@Kyle-Ye Thanks, this is a good change, but we'll have to wait as Max and Saleem are saying. Would you prefer that we keep this as a draft until a later point or close it? |
I'll make this into draft and waiting for the blocking problem to be fixed. |
@Kyle-Ye would you mind resolving conflicts on this one? Thanks! |
Yeah. I see #7313 is finally merged. I'll update the PR later today. |
b24e0c2
to
ec95df5
Compare
@swift-ci please test |
Would you mind sharing with us the latest status of Regex support on Windows? cc @compnerd |
ec95df5
to
1c38d02
Compare
@swift-ci please test |
@swift-ci test windows |
@swift-ci smoke test |
After this one is merged we'll have to follow up on swiftlang/swift-tools-support-core#467 too. |
Doug was splitting out the regex bits such that bootstrapping isn't required and only the swift-syntax bits are. This is untested, but I believe might be done? I would say that run with cross-repository testing with swiftlang/swift#71349 to get the tests to build and run. I believe that @bnbarham might try to make some time to help get this enabled by default. |
Motivation:
Migrate part of regex code to use Swift Regex. (Safer and Easier)
We should also consider to deprecate the
TSCBasic.RegEx
Modifications:
Migrate part of the regex code to use Swift Regex
Result:
Safer, Easier and less code if we use Swift Regex.
Requirement/Dependency:
Bump minimal supported OS version to macOS 13