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 EventSourceHttpBody, reference 0.1.5 (b000e6), with Swift 6.0 (beta) for macOS (SPM) on 16 Sep 2024 10:37: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/exyte/EventSourceHttpBody.git
Reference: 0.1.5
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/exyte/EventSourceHttpBody
 * tag               0.1.5      -> FETCH_HEAD
HEAD is now at b000e62 Support older versions
Cloned https://github.com/exyte/EventSourceHttpBody.git
Revision (git rev-parse @):
b000e62b83206dd6e00f2066cf08c96f232a4168
SUCCESS checkout https://github.com/exyte/EventSourceHttpBody.git at 0.1.5
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/exyte/EventSourceHttpBody.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/6] Emitting module EventSourceHttpBody
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:76:12: warning: non-final class 'EventSource' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 74 | }
 75 |
 76 | open class EventSource: NSObject, EventSourceProtocol, URLSessionDataDelegate {
    |            `- warning: non-final class 'EventSource' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 77 |     static let DefaultRetryTime = 3000
 78 |
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:81:29: warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
 79 |     public let urlRequest: URLRequest
 80 |     public var url: URL { urlRequest.url! }
 81 |     private(set) public var lastEventId: String?
    |                             `- warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
 82 |     private(set) public var retryTime = EventSource.DefaultRetryTime
 83 |     private(set) public var headers: [String: String]
[4/6] Compiling EventSourceHttpBody EventStreamParser.swift
[5/6] Compiling EventSourceHttpBody Event.swift
[6/6] Compiling EventSourceHttpBody EventSource.swift
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:76:12: warning: non-final class 'EventSource' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 74 | }
 75 |
 76 | open class EventSource: NSObject, EventSourceProtocol, URLSessionDataDelegate {
    |            `- warning: non-final class 'EventSource' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 77 |     static let DefaultRetryTime = 3000
 78 |
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:81:29: warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
 79 |     public let urlRequest: URLRequest
 80 |     public var url: URL { urlRequest.url! }
 81 |     private(set) public var lastEventId: String?
    |                             `- warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
 82 |     private(set) public var retryTime = EventSource.DefaultRetryTime
 83 |     private(set) public var headers: [String: String]
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:235:35: warning: capture of 'eventHandler' with non-sendable type '(String?, String?, String?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
233 |
234 |             if let eventName = event.event, let eventHandler = eventListeners[eventName] {
235 |                 mainQueue.async { eventHandler(event.id, event.event, event.data) }
    |                                   |- warning: capture of 'eventHandler' with non-sendable type '(String?, String?, String?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                                   `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
236 |             }
237 |         }
Build complete! (6.07s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "EventSourceHttpBody",
  "name" : "EventSourceHttpBody",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "8.0"
    },
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "EventSourceHttpBody",
      "targets" : [
        "EventSourceHttpBody"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "EventSourceHttpBody",
      "module_type" : "SwiftTarget",
      "name" : "EventSourceHttpBody",
      "path" : "EventSource",
      "product_memberships" : [
        "EventSourceHttpBody"
      ],
      "sources" : [
        "Event.swift",
        "EventSource.swift",
        "EventStreamParser.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.