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

Regex is only available in macOS 9999 or newer #340

Closed
christopherweems opened this issue Apr 24, 2022 · 3 comments
Closed

Regex is only available in macOS 9999 or newer #340

christopherweems opened this issue Apr 24, 2022 · 3 comments
Assignees

Comments

@christopherweems
Copy link

To try out the functionality provided here, download the latest open source development toolchain. Import _StringProcessing in your source file to get access to the API and specify -Xfrontend -enable-experimental-string-processing to get access to the literals.

Following these steps from the README doesn't seem to be all that is necessary to try out the Regex features with the swift-DEVELOPMENT-SNAPSHOT-2022-04-21-a-osx toolchain.

@christopherweems christopherweems changed the title Regex is only available in macOS 9999 or newer Regex is only available in macOS 9999 or newer Apr 24, 2022
@christopherweems
Copy link
Author

christopherweems commented Apr 27, 2022

I've found a workable solution to my problem. If you know you're developing a package that will only support platforms that include the string processing APIs, you can disable availibility checking for now by adding the setting .unsafeFlags(["-Xfrontend", "-disable-availability-checking"]) to your package manifest.

Related thread: https://forums.swift.org/t/new-concurrency-api-not-available-in-latest-toolchain/47389/2

@milseman
Copy link
Collaborator

milseman commented May 6, 2022

@rxwei is this the suggested workaround, and if so should we update the README?

@rxwei
Copy link
Member

rxwei commented May 6, 2022

That is the correct workaround.

@rxwei rxwei closed this as completed May 6, 2022
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

No branches or pull requests

3 participants