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

Won't build for Swift 6 #793

Closed
4 tasks done
jcbriones opened this issue Aug 8, 2024 · 1 comment
Closed
4 tasks done

Won't build for Swift 6 #793

jcbriones opened this issue Aug 8, 2024 · 1 comment

Comments

@jcbriones
Copy link

jcbriones commented Aug 8, 2024

Using Xcode 16 and Swift 6 throws a compile time error: concurrent perform isn't thread safe from what I remember the error was.

DispatchQueue.concurrentPerform(iterations: numberStrings.count) { index in
    let numberString = numberStrings[index]
    do {
        let phoneNumber = try self.parse(numberString, withRegion: region, ignoreType: ignoreType)
        buffer.baseAddress!.advanced(by: index).initialize(to: phoneNumber)
    } catch {
        buffer.baseAddress!.advanced(by: index).initialize(to: PhoneNumber.notPhoneNumber())
        hasError = true
    }
}

New Issue Checklist

Steps to reproduce

Download Xcode 16 beta 5 and run the plugin.

Expected result

No compile time errors

Actual result

Giving a compile time error

Environment

macOS 15.1, iOS 18.0 simulator, swift 6.

@bguidolim
Copy link
Collaborator

Hey @jcbriones

Please, don't get me wrong, but the New Issue Checklist exists for a reason.

[x] Updated PhoneNumberKit to the latest version = https://github.com/marmelroy/PhoneNumberKit/releases/tag/3.8.0
[x] I searched for existing GitHub issues = #790 and #791

Check the latest version and let me know if you are still facing the issue.

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

2 participants