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

Update for Swift 5.8 support #164

Merged
merged 1 commit into from
Feb 17, 2023
Merged

Update for Swift 5.8 support #164

merged 1 commit into from
Feb 17, 2023

Conversation

thedavidharris
Copy link
Contributor

Fixes a few build errors on Xcode 14.3

@kean
Copy link
Owner

kean commented Feb 17, 2023

I'm surprised else if let wasn't producing a warning. Thanks!

But can you please explain what changed with regex literals in Swift 5.8? I can't seem to find any references. I don't see I saw any deprecations for the "bare /" syntax.

I just learned about extended delimiters thanks to the PR. It will make sense to replace some regexes:

// Before
 /(.*?) · 200 OK · GET https:\/\/example.com\/api\n/

// After
 #/(.*?) · 200 OK · GET https://example.com/api\n/#

@thedavidharris
Copy link
Contributor Author

But can you please explain what changed with regex literals in Swift 5.8? I can't seem to find any references. I don't see I saw any deprecations for the "bare /" syntax.

I couldn't find anything either, was wondering if you might know from looking at this. For whatever reason it wouldn't compile and pick up the regex literal even when extracting to a separate variable.

@thedavidharris
Copy link
Contributor Author

thedavidharris commented Feb 17, 2023

I think it's just behind a flag now: https://github.com/apple/swift/blob/c82e17acb7d54fad674699b9c9b2804203d5a992/include/swift/Option/Options.td#L721. -enable-upcoming-feature BareSlashRegexLiterals would also do it in Xcode.

Unsure why that was working before though.

@kean kean merged commit dd8cd04 into kean:main Feb 17, 2023
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.

2 participants