AcmeSwift
AcmeSwift copied to clipboard
Added Sendable to public structs and enums
I was in the process of prepping my app for having 0 warnings from SwiftSetting.enableExperimentalFeature("StrictConcurrency"), and some Sendable issues surfaced from AcmeSwift.
Adding Sendable to most public enums and structs made the warnings go away, without introducing new ones.
I could not add Sendable to AccountCredentials because it references Crypto.P256.Signing.PrivateKey which is not Sendable yet.
I also tried bumping the swift-tools-version to 5.10 and applying StrictConcurrency to this project, and no warnings were raised. I did not add this to the PR, because I am not sure when you want to bump the required version of Swift.
I could not add Sendable to AccountCredentials because it references Crypto.P256.Signing.PrivateKey which is not Sendable yet.
We might want to either prefix the import with @preconcurrency, or tag AccountCredentials as @unchecked Sendable, since PrivateKey is a non-mutable struct and should be safe to use in this scenario.
Is this something you want me to do in this PR, or would it make more sense to take these changes as-is and revisit the leftovers later?
I'm happy to take these changes as-is, just need to take a few moments to test and validate
Is this something you want me to do in this PR, or would it make more sense to take these changes as-is and revisit the leftovers later?
Thanks for your PR. You are very welcome to "revisit the leftovers" any time!