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 Realtime, reference 0.0.2 (0b985c), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 05:09:56 UTC.

Swift 6 data race errors: 7

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/supabase-community/realtime-swift.git
Reference: 0.0.2
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/supabase-community/realtime-swift
 * tag               0.0.2      -> FETCH_HEAD
HEAD is now at 0b985c6 Remove Starscream Dependency and bump minimum support platform (#11)
Cloned https://github.com/supabase-community/realtime-swift.git
Revision (git rev-parse @):
0b985c687fe963f6bd818ff77a35c27247b98bb4
SUCCESS checkout https://github.com/supabase-community/realtime-swift.git at 0.0.2
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "realtime-swift",
      "name": "Realtime",
      "url": "https://github.com/supabase-community/realtime-swift.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/realtime-swift",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/supabase-community/realtime-swift.git
[1/377] Fetching realtime-swift
Fetched https://github.com/supabase-community/realtime-swift.git from cache (0.73s)
Creating working copy for https://github.com/supabase-community/realtime-swift.git
Working copy of https://github.com/supabase-community/realtime-swift.git resolved at 0.0.2 (0b985c6)
warning: '.resolve-product-dependencies': dependency 'realtime-swift' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/supabase-community/realtime-swift.git
https://github.com/supabase-community/realtime-swift.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Realtime",
  "name" : "Realtime",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Realtime",
      "targets" : [
        "Realtime"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "RealtimeTests",
      "module_type" : "SwiftTarget",
      "name" : "RealtimeTests",
      "path" : "Tests/RealtimeTests",
      "sources" : [
        "ChannelTopicTests.swift",
        "RealtimeTests.swift"
      ],
      "target_dependencies" : [
        "Realtime"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Realtime",
      "module_type" : "SwiftTarget",
      "name" : "Realtime",
      "path" : "Sources/Realtime",
      "product_memberships" : [
        "Realtime"
      ],
      "sources" : [
        "Channel.swift",
        "Defaults.swift",
        "Delegated.swift",
        "HeartbeatTimer.swift",
        "Message.swift",
        "Push.swift",
        "RealtimeClient.swift",
        "SocketError.swift",
        "StateChangeCallbacks.swift",
        "TimeoutTimer.swift",
        "Transport.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/13] Compiling Realtime StateChangeCallbacks.swift
[4/13] Compiling Realtime SocketError.swift
[5/14] Compiling Realtime TimeoutTimer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/TimeoutTimer.swift:98:14: warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 96 | class TimerQueue {
 97 |   // Can be overriden in tests
 98 |   static var main = TimerQueue()
    |              |- warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |              |- note: convert 'main' to a 'let' constant to make 'Sendable' shared state immutable
    |              |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
    |              `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 99 |
100 |   func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
[6/14] Compiling Realtime RealtimeClient.swift
[7/14] Compiling Realtime Message.swift
[8/14] Compiling Realtime Push.swift
[9/14] Compiling Realtime Delegated.swift
[10/14] Emitting module Realtime
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:32:21: warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 30 |
 31 |   /// Default reconnect algorithm for the socket
 32 |   public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'reconnectSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |     tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
 34 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:37:21: warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 35 |
 36 |   /** Default rejoin algorithm for individual channels */
 37 |   public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'rejoinSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 38 |     tries > 3 ? 10 : [1, 2, 5][tries - 1]
 39 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:42:21: warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
 40 |
 41 |   /// Default encode function, utilizing JSONSerialization.data
 42 |   public static let encode: ([String: Any]) -> Data = { json in
    |                     |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 43 |     try! JSONSerialization
 44 |       .data(
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:50:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
 48 |
 49 |   /// Default decode function, utilizing JSONSerialization.jsonObject
 50 |   public static let decode: (Data) -> [String: Any]? = { data in
    |                     |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 51 |     guard
 52 |       let json =
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/TimeoutTimer.swift:98:14: warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 96 | class TimerQueue {
 97 |   // Can be overriden in tests
 98 |   static var main = TimerQueue()
    |              |- warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |              |- note: convert 'main' to a 'let' constant to make 'Sendable' shared state immutable
    |              |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
    |              `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 99 |
100 |   func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Transport.swift:130:14: warning: non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
128 | /// your own WebSocket library or implementation.
129 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
130 | public class URLSessionTransport: NSObject, Transport, URLSessionWebSocketDelegate {
    |              `- warning: non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
131 |   /// The URL to connect to
132 |   internal let url: URL
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Transport.swift:135:15: warning: stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode
133 |
134 |   /// The underling URLsession. Assigned during `connect()`
135 |   private var session: URLSession?
    |               `- warning: stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode
136 |
137 |   /// The ongoing task. Assigned during `connect()`
[11/14] Compiling Realtime Channel.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:32:21: warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 30 |
 31 |   /// Default reconnect algorithm for the socket
 32 |   public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'reconnectSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |     tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
 34 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:37:21: warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 35 |
 36 |   /** Default rejoin algorithm for individual channels */
 37 |   public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'rejoinSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 38 |     tries > 3 ? 10 : [1, 2, 5][tries - 1]
 39 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:42:21: warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
 40 |
 41 |   /// Default encode function, utilizing JSONSerialization.data
 42 |   public static let encode: ([String: Any]) -> Data = { json in
    |                     |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 43 |     try! JSONSerialization
 44 |       .data(
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:50:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
 48 |
 49 |   /// Default decode function, utilizing JSONSerialization.jsonObject
 50 |   public static let decode: (Data) -> [String: Any]? = { data in
    |                     |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 51 |     guard
 52 |       let json =
[12/14] Compiling Realtime Defaults.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:32:21: warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 30 |
 31 |   /// Default reconnect algorithm for the socket
 32 |   public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'reconnectSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |     tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
 34 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:37:21: warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
 35 |
 36 |   /** Default rejoin algorithm for individual channels */
 37 |   public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in
    |                     |- warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'rejoinSteppedBackOff' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 38 |     tries > 3 ? 10 : [1, 2, 5][tries - 1]
 39 |   }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:42:21: warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
 40 |
 41 |   /// Default encode function, utilizing JSONSerialization.data
 42 |   public static let encode: ([String: Any]) -> Data = { json in
    |                     |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '([String : Any]) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 43 |     try! JSONSerialization
 44 |       .data(
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Defaults.swift:50:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
 48 |
 49 |   /// Default decode function, utilizing JSONSerialization.jsonObject
 50 |   public static let decode: (Data) -> [String: Any]? = { data in
    |                     |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> [String : Any]?' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
    |                     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 51 |     guard
 52 |       let json =
[13/14] Compiling Realtime HeartbeatTimer.swift
[14/14] Compiling Realtime Transport.swift
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Transport.swift:130:14: warning: non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
128 | /// your own WebSocket library or implementation.
129 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
130 | public class URLSessionTransport: NSObject, Transport, URLSessionWebSocketDelegate {
    |              `- warning: non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
131 |   /// The URL to connect to
132 |   internal let url: URL
/Users/admin/builder/spi-builder-workspace/Sources/Realtime/Transport.swift:135:15: warning: stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode
133 |
134 |   /// The underling URLsession. Assigned during `connect()`
135 |   private var session: URLSession?
    |               `- warning: stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode
136 |
137 |   /// The ongoing task. Assigned during `connect()`
Build complete! (5.24s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Realtime",
  "name" : "Realtime",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Realtime",
      "targets" : [
        "Realtime"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "RealtimeTests",
      "module_type" : "SwiftTarget",
      "name" : "RealtimeTests",
      "path" : "Tests/RealtimeTests",
      "sources" : [
        "ChannelTopicTests.swift",
        "RealtimeTests.swift"
      ],
      "target_dependencies" : [
        "Realtime"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Realtime",
      "module_type" : "SwiftTarget",
      "name" : "Realtime",
      "path" : "Sources/Realtime",
      "product_memberships" : [
        "Realtime"
      ],
      "sources" : [
        "Channel.swift",
        "Defaults.swift",
        "Delegated.swift",
        "HeartbeatTimer.swift",
        "Message.swift",
        "Push.swift",
        "RealtimeClient.swift",
        "SocketError.swift",
        "StateChangeCallbacks.swift",
        "TimeoutTimer.swift",
        "Transport.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.