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

[Feature] Complete Swift Strict Concurrency Check support #3324

Open
gabe4coding opened this issue Feb 22, 2024 · 5 comments
Open

[Feature] Complete Swift Strict Concurrency Check support #3324

gabe4coding opened this issue Feb 22, 2024 · 5 comments
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@gabe4coding
Copy link

Problem

Trying to migrate the app to the "complete" Swift Strict Concurrency check, and we have a blocker with Stripe, that declares a static var (STPPaymentConfiguration Singleton), which cannot be referenced since mutable.
@preconcurrency directive is not working.
So far, we are forced to use the "targeted" check, to silence this error on the compiler, preventing a complete migration.

Solution

Add the support to Swift Strict Concurrency check "complete" to the library.

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Feb 22, 2024
@davidme-stripe
Copy link
Contributor

Hello, thanks for filing this! I took a look, and unfortunately the STPPaymentConfiguration is just the tip of the iceberg: We have a lot of code that doesn't meet these requirements. We'll keep this issue open to track our work on this.

@rbenna
Copy link

rbenna commented Jun 19, 2024

Hi @davidme-stripe, I've already opened a PR to fix that, this small change will let us enable the complete strict concurrency check in our app.

@r-thefork
Copy link

Indeed, merging @rbenna's PR would unblock developers.

@porter-stripe
Copy link
Collaborator

@gabe4coding can you share how you are including our SDK in your app? I have tried to reproduce this issue on the latest version of Xcode 16 beta but am not able to. I have Swift 6 enabled and concurrency check set to complete.

@tt-pkaminski
Copy link

Just to ask about another complete concurrency warning I'm seeing related to Stripe:

Main actor-isolated instance method 'authenticationPresentingViewController()' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode

For STPAuthenticationContext's func authenticationPresentingViewController() -> UIViewController method, can we assume this will be called from the MainActor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

6 participants