The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of SnapAuth, reference 0.2.0 (0b3b92), with Swift 6.0 for macOS (SPM) on 16 Sep 2024 16:35:23 UTC.

Swift 6 data race errors: 2

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/snapauthapp/sdk-swift.git
Reference: 0.2.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/snapauthapp/sdk-swift
 * tag               0.2.0      -> FETCH_HEAD
HEAD is now at 0b3b920 Remove erroneous assertion (#34)
Cloned https://github.com/snapauthapp/sdk-swift.git
Revision (git rev-parse @):
0b3b920cc4f822e0cca96ab4c8da1e7bce0eea3e
SUCCESS checkout https://github.com/snapauthapp/sdk-swift.git at 0.2.0
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/snapauthapp/sdk-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-117DEE11B69C53C9.txt
[3/13] Compiling SnapAuth Base64URL.swift
[4/13] Compiling SnapAuth API.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/API.swift:117:13: warning: immutable property will not be decoded because it is declared with an initial value which cannot be overwritten
115 |     let user: AuthenticatingUser?
116 |     struct SACredential: Codable {
117 |         let type: String = "public-key"
    |             |- warning: immutable property will not be decoded because it is declared with an initial value which cannot be overwritten
    |             |- note: set the initial value via the initializer or explicitly define a CodingKeys enum including a 'type' case to silence this warning
    |             `- note: make the property mutable instead
118 |         let rawId: Base64URL
119 |         let response: SACredential.Response
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/ApiClient.swift:41:13: warning: immutable value 'response' was never used; consider removing it
39 |
40 |         let data: Data
41 |         let response: URLResponse
   |             `- warning: immutable value 'response' was never used; consider removing it
42 |         do {
43 |             (data, response) = try await URLSession.shared.data(for: request)
[5/13] Compiling SnapAuth ApiClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/API.swift:117:13: warning: immutable property will not be decoded because it is declared with an initial value which cannot be overwritten
115 |     let user: AuthenticatingUser?
116 |     struct SACredential: Codable {
117 |         let type: String = "public-key"
    |             |- warning: immutable property will not be decoded because it is declared with an initial value which cannot be overwritten
    |             |- note: set the initial value via the initializer or explicitly define a CodingKeys enum including a 'type' case to silence this warning
    |             `- note: make the property mutable instead
118 |         let rawId: Base64URL
119 |         let response: SACredential.Response
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/ApiClient.swift:41:13: warning: immutable value 'response' was never used; consider removing it
39 |
40 |         let data: Data
41 |         let response: URLResponse
   |             `- warning: immutable value 'response' was never used; consider removing it
42 |         do {
43 |             (data, response) = try await URLSession.shared.data(for: request)
[6/13] Compiling SnapAuth PresentationAnchor.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/PresentationAnchor.swift:6:17: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
 4 | // FIXME: Figure out better fallback mechanisms here.
 5 | // This will cause a new window to open _and remain open_
 6 | fileprivate let defaultPresentationAnchor: ASPresentationAnchor = NSApplication.shared.mainWindow ?? ASPresentationAnchor()
   |                 `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
 7 | #else
 8 | fileprivate let defaultPresentationAnchor: ASPresentationAnchor = (UIApplication.shared.connectedScenes.first as? UIWindowScene)?.windows.first?.rootViewController?.view.window ?? ASPresentationAnchor()
[7/14] Emitting module SnapAuth
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/PresentationAnchor.swift:6:17: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
 4 | // FIXME: Figure out better fallback mechanisms here.
 5 | // This will cause a new window to open _and remain open_
 6 | fileprivate let defaultPresentationAnchor: ASPresentationAnchor = NSApplication.shared.mainWindow ?? ASPresentationAnchor()
   |                 `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
 7 | #else
 8 | fileprivate let defaultPresentationAnchor: ASPresentationAnchor = (UIApplication.shared.connectedScenes.first as? UIWindowScene)?.windows.first?.rootViewController?.view.window ?? ASPresentationAnchor()
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/SnapAuth.swift:44:27: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<SnapAuth.Authenticator>' may have shared mutable state; this is an error in the Swift 6 language mode
 40 |
 41 |     /// Permitted authenticator types
 42 |     public enum Authenticator: CaseIterable {
    |                 `- note: consider making enum 'Authenticator' conform to the 'Sendable' protocol
 43 |         /// Allow all available authenticator types to be used
 44 |         public static let all = Set(Authenticator.allCases)
    |                           |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<SnapAuth.Authenticator>' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
    |                           `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 45 |
 46 |         /// Prompt for passkeys.
[8/14] Compiling SnapAuth Errors.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/Errors.swift:68:9: warning: switch must be exhaustive; this is an error in the Swift 6 language mode
66 | extension ASAuthorizationError.Code {
67 |     var snapAuthError: SnapAuthError {
68 |         switch self {
   |         |- warning: switch must be exhaustive; this is an error in the Swift 6 language mode
   |         `- note: add missing case: '.matchedExcludedCredential'
69 |         case .canceled: return .canceled
70 |         case .failed: return .failed
[9/14] Compiling SnapAuth SnapAuth+BuildRequests.swift
[10/14] Compiling SnapAuth SnapAuth+ASACPCP.swift
[11/14] Compiling SnapAuth SnapAuth+ASACD.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/SnapAuth+ASACD.swift:130:9: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
128 |         logger.debug("made a body")
129 | //        logger.debug("user id \(assertion.userID.base64EncodedString())")
130 |         Task {
    |         `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
131 |             let response = await api.makeRequest(
132 |                 path: "/assertion/process",
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/SnapAuth+ASACD.swift:82:9: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 80 |         let body = SAProcessRegisterRequest(credential: credential)
 81 |
 82 |         Task {
    |         `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
 83 |             let response = await api.makeRequest(
 84 |                 path: "/attestation/process",
[12/14] Compiling SnapAuth SnapAuth+AutoFill.swift
[13/14] Compiling SnapAuth SnapAuth.swift
/Users/admin/builder/spi-builder-workspace/Sources/SnapAuth/SnapAuth.swift:44:27: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<SnapAuth.Authenticator>' may have shared mutable state; this is an error in the Swift 6 language mode
 40 |
 41 |     /// Permitted authenticator types
 42 |     public enum Authenticator: CaseIterable {
    |                 `- note: consider making enum 'Authenticator' conform to the 'Sendable' protocol
 43 |         /// Allow all available authenticator types to be used
 44 |         public static let all = Set(Authenticator.allCases)
    |                           |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<SnapAuth.Authenticator>' may have shared mutable state; this is an error in the Swift 6 language mode
    |                           |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
    |                           `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 45 |
 46 |         /// Prompt for passkeys.
[14/14] Compiling SnapAuth SnapAuthDelegate.swift
Build complete! (14.42s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SnapAuth",
  "name" : "SnapAuth",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "12.0"
    },
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "tvos",
      "version" : "16.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    }
  ],
  "products" : [
    {
      "name" : "SnapAuth",
      "targets" : [
        "SnapAuth"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SnapAuthTests",
      "module_type" : "SwiftTarget",
      "name" : "SnapAuthTests",
      "path" : "Tests/SnapAuthTests",
      "sources" : [
        "Base64URLTests.swift"
      ],
      "target_dependencies" : [
        "SnapAuth"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SnapAuth",
      "module_type" : "SwiftTarget",
      "name" : "SnapAuth",
      "path" : "Sources/SnapAuth",
      "product_memberships" : [
        "SnapAuth"
      ],
      "sources" : [
        "API.swift",
        "ApiClient.swift",
        "Base64URL.swift",
        "Errors.swift",
        "PresentationAnchor.swift",
        "SnapAuth+ASACD.swift",
        "SnapAuth+ASACPCP.swift",
        "SnapAuth+AutoFill.swift",
        "SnapAuth+BuildRequests.swift",
        "SnapAuth.swift",
        "SnapAuthDelegate.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.10"
}
Done.