Build Information
Successful build of EventSource with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 2
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/inaka/EventSource.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/inaka/EventSource
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 78934b3 Merge pull request #134 from daniel-andersen/master
Cloned https://github.com/inaka/EventSource.git
Revision (git rev-parse @):
78934b361891c7d0fa3d399d128e959f0c94d267
SUCCESS checkout https://github.com/inaka/EventSource.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/inaka/EventSource.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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-6F35C1178C84523A.txt
[3/6] Compiling EventSource EventStreamParser.swift
[4/6] Compiling EventSource Event.swift
[5/6] Emitting module EventSource
/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:80:29: warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
78 |
79 | public let url: URL
80 | 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
81 | private(set) public var retryTime = EventSource.DefaultRetryTime
82 | private(set) public var headers: [String: String]
[6/6] Compiling EventSource 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:80:29: warning: stored property 'lastEventId' of 'Sendable'-conforming class 'EventSource' is mutable; this is an error in the Swift 6 language mode
78 |
79 | public let url: URL
80 | 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
81 | private(set) public var retryTime = EventSource.DefaultRetryTime
82 | private(set) public var headers: [String: String]
/Users/admin/builder/spi-builder-workspace/EventSource/EventSource.swift:237: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
235 |
236 | if let eventName = event.event, let eventHandler = eventListeners[eventName] {
237 | 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'
238 | }
239 | }
Build complete! (17.93s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "EventSource",
"name" : "EventSource",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "8.0"
},
{
"name" : "macos",
"version" : "10.10"
}
],
"products" : [
{
"name" : "EventSource",
"targets" : [
"EventSource"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "EventSourceTests",
"module_type" : "SwiftTarget",
"name" : "EventSourceTests",
"path" : "EventSourceTests",
"sources" : [
"EventSourceTests.swift",
"EventStreamParserTests.swift",
"EventTests.swift",
"Mock/URLSessionDataTaskMock.swift"
],
"target_dependencies" : [
"EventSource"
],
"type" : "test"
},
{
"c99name" : "EventSource",
"module_type" : "SwiftTarget",
"name" : "EventSource",
"path" : "EventSource",
"product_memberships" : [
"EventSource"
],
"sources" : [
"Event.swift",
"EventSource.swift",
"EventStreamParser.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
Done.