Build Information
Successful build of Starscream, reference master (a21fca
), with Swift 6.1 for macOS (SPM) on 28 Apr 2025 03:41:31 UTC.
Swift 6 data race errors: 1
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/Azoy/Starscream.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Azoy/Starscream
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at a21fca8 Remove weak from protocol
Cloned https://github.com/Azoy/Starscream.git
Revision (git rev-parse @):
a21fca8e9dc83cf3a88a3ba9be15ff17a7e4e8d6
SUCCESS checkout https://github.com/Azoy/Starscream.git at master
Fetching https://github.com/Azoy/zlib-spm.git
Fetching https://github.com/Azoy/common-crypto-spm.git
[1/27] Fetching common-crypto-spm
[28/59] Fetching common-crypto-spm, zlib-spm
Fetched https://github.com/Azoy/zlib-spm.git from cache (0.69s)
Fetched https://github.com/Azoy/common-crypto-spm.git from cache (0.69s)
Computing version for https://github.com/Azoy/common-crypto-spm.git
Computed https://github.com/Azoy/common-crypto-spm.git at 1.2.0 (1.28s)
Computing version for https://github.com/Azoy/zlib-spm.git
Computed https://github.com/Azoy/zlib-spm.git at 1.2.0 (0.55s)
Creating working copy for https://github.com/Azoy/zlib-spm.git
Working copy of https://github.com/Azoy/zlib-spm.git resolved at 1.2.0
Creating working copy for https://github.com/Azoy/common-crypto-spm.git
Working copy of https://github.com/Azoy/common-crypto-spm.git resolved at 1.2.0
========================================
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": "starscream",
"name": "Starscream",
"url": "https://github.com/Azoy/Starscream.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Starscream",
"dependencies": [
{
"identity": "zlib-spm",
"name": "SSCZLib",
"url": "https://github.com/Azoy/zlib-spm.git",
"version": "1.2.0",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/zlib-spm",
"dependencies": [
]
},
{
"identity": "common-crypto-spm",
"name": "SSCommonCrypto",
"url": "https://github.com/Azoy/common-crypto-spm.git",
"version": "1.2.0",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/common-crypto-spm",
"dependencies": [
]
}
]
}
]
}
Fetching https://github.com/Azoy/Starscream.git
[1/2131] Fetching starscream
Fetched https://github.com/Azoy/Starscream.git from cache (1.01s)
Fetching https://github.com/Azoy/common-crypto-spm.git from cache
Fetching https://github.com/Azoy/zlib-spm.git from cache
Fetched https://github.com/Azoy/common-crypto-spm.git from cache (0.45s)
Fetched https://github.com/Azoy/zlib-spm.git from cache (0.45s)
Computing version for https://github.com/Azoy/common-crypto-spm.git
Computed https://github.com/Azoy/common-crypto-spm.git at 1.2.0 (0.50s)
Computing version for https://github.com/Azoy/zlib-spm.git
Computed https://github.com/Azoy/zlib-spm.git at 1.2.0 (0.02s)
Creating working copy for https://github.com/Azoy/Starscream.git
Working copy of https://github.com/Azoy/Starscream.git resolved at master (a21fca8)
Creating working copy for https://github.com/Azoy/common-crypto-spm.git
Working copy of https://github.com/Azoy/common-crypto-spm.git resolved at 1.2.0
Creating working copy for https://github.com/Azoy/zlib-spm.git
Working copy of https://github.com/Azoy/zlib-spm.git resolved at 1.2.0
warning: 'common-crypto-spm': ignoring declared target(s) 'SSCommonCrypto' in the system package
warning: 'zlib-spm': ignoring declared target(s) 'SSCZLib' in the system package
warning: '.resolve-product-dependencies': dependency 'starscream' is not used by any target
Found 2 product dependencies
- SSCZLib
- SSCommonCrypto
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/Azoy/Starscream.git
https://github.com/Azoy/Starscream.git
{
"dependencies" : [
{
"identity" : "zlib-spm",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Azoy/zlib-spm.git"
},
{
"identity" : "common-crypto-spm",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Azoy/common-crypto-spm.git"
}
],
"manifest_display_name" : "Starscream",
"name" : "Starscream",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Starscream",
"targets" : [
"Starscream"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "Starscream",
"module_type" : "SwiftTarget",
"name" : "Starscream",
"path" : "Sources",
"product_memberships" : [
"Starscream"
],
"sources" : [
"Compression.swift",
"SSLSecurity.swift",
"WebSocket.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
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/6] Compiling Starscream Compression.swift
/Users/admin/builder/spi-builder-workspace/Sources/Compression.swift:83:29: warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
81 |
82 | repeat {
83 | strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafeMutablePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
84 | strm.avail_out = CUnsignedInt(buffer.count)
85 |
/Users/admin/builder/spi-builder-workspace/Sources/Compression.swift:145:33: warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
143 |
144 | repeat {
145 | strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafeMutablePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
146 | strm.avail_out = CUnsignedInt(buffer.count)
147 |
[4/6] Emitting module Starscream
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1335:13: warning: let 'emptyBuffer' is not concurrency-safe because non-'Sendable' type 'UnsafeBufferPointer<UInt8>' may have shared mutable state; this is an error in the Swift 6 language mode
1333 | }
1334 |
1335 | private let emptyBuffer = UnsafeBufferPointer<UInt8>(start: nil, count: 0)
| |- warning: let 'emptyBuffer' is not concurrency-safe because non-'Sendable' type 'UnsafeBufferPointer<UInt8>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'emptyBuffer' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | #if swift(>=4)
Swift.UnsafeBufferPointer:1:23: note: generic struct 'UnsafeBufferPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeBufferPointer<Element> : Copyable where Element : ~Copyable {
| `- note: generic struct 'UnsafeBufferPointer' does not conform to the 'Sendable' protocol
2 | public let count: Int
3 | @inlinable public init(start: UnsafePointer<Element>?, count: Int)
[5/6] Compiling Starscream SSLSecurity.swift
/Users/admin/builder/spi-builder-workspace/Sources/SSLSecurity.swift:101:31: warning: capture of 'certs' with non-sendable type '[SSLCert]' in a '@Sendable' closure
29 | }
30 |
31 | open class SSLCert {
| `- note: class 'SSLCert' does not conform to the 'Sendable' protocol
32 | var certData: Data?
33 | var key: SecKey?
:
99 | if self.usePublicKeys {
100 | DispatchQueue.global(qos: .default).async {
101 | let pubKeys = certs.reduce([SecKey]()) { (pubKeys: [SecKey], cert: SSLCert) -> [SecKey] in
| `- warning: capture of 'certs' with non-sendable type '[SSLCert]' in a '@Sendable' closure
102 | var pubKeys = pubKeys
103 | if let data = cert.certData, cert.key == nil {
/Users/admin/builder/spi-builder-workspace/Sources/SSLSecurity.swift:104:36: warning: capture of 'self' with non-sendable type 'SSLSecurity' in a '@Sendable' closure
56 | }
57 |
58 | open class SSLSecurity : SSLTrustValidator {
| `- note: class 'SSLSecurity' does not conform to the 'Sendable' protocol
59 | public var validatedDN = true //should the domain name be validated?
60 | public var validateEntireChain = true //should the entire cert chain be validated
:
102 | var pubKeys = pubKeys
103 | if let data = cert.certData, cert.key == nil {
104 | cert.key = self.extractPublicKey(data)
| `- warning: capture of 'self' with non-sendable type 'SSLSecurity' in a '@Sendable' closure
105 | }
106 | if let key = cert.key {
/Users/admin/builder/spi-builder-workspace/Sources/SSLSecurity.swift:104:36: warning: capture of 'self' with non-sendable type 'SSLSecurity' in an isolated closure; this is an error in the Swift 6 language mode
56 | }
57 |
58 | open class SSLSecurity : SSLTrustValidator {
| `- note: class 'SSLSecurity' does not conform to the 'Sendable' protocol
59 | public var validatedDN = true //should the domain name be validated?
60 | public var validateEntireChain = true //should the entire cert chain be validated
:
102 | var pubKeys = pubKeys
103 | if let data = cert.certData, cert.key == nil {
104 | cert.key = self.extractPublicKey(data)
| `- warning: capture of 'self' with non-sendable type 'SSLSecurity' in an isolated closure; this is an error in the Swift 6 language mode
105 | }
106 | if let key = cert.key {
[6/6] Compiling Starscream WebSocket.swift
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1335:13: warning: let 'emptyBuffer' is not concurrency-safe because non-'Sendable' type 'UnsafeBufferPointer<UInt8>' may have shared mutable state; this is an error in the Swift 6 language mode
1333 | }
1334 |
1335 | private let emptyBuffer = UnsafeBufferPointer<UInt8>(start: nil, count: 0)
| |- warning: let 'emptyBuffer' is not concurrency-safe because non-'Sendable' type 'UnsafeBufferPointer<UInt8>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'emptyBuffer' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | #if swift(>=4)
Swift.UnsafeBufferPointer:1:23: note: generic struct 'UnsafeBufferPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeBufferPointer<Element> : Copyable where Element : ~Copyable {
| `- note: generic struct 'UnsafeBufferPointer' does not conform to the 'Sendable' protocol
2 | public let count: Int
3 | @inlinable public init(start: UnsafePointer<Element>?, count: Int)
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:215:20: warning: capture of 'outStream' with non-sendable type 'OutputStream' in a '@Sendable' closure
213 | var out = timeout// wait X seconds before giving up
214 | FoundationStream.sharedWorkQueue.async { [weak self] in
215 | while !outStream.hasSpaceAvailable {
| `- warning: capture of 'outStream' with non-sendable type 'OutputStream' in a '@Sendable' closure
216 | usleep(100) // wait until the socket is ready
217 | out -= 100
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSStream.h:73:12: note: class 'OutputStream' does not conform to the 'Sendable' protocol
71 | // NSOutputStream is an abstract class representing the base functionality of a write stream.
72 | // Subclassers are required to implement these methods.
73 | @interface NSOutputStream : NSStream
| `- note: class 'OutputStream' does not conform to the 'Sendable' protocol
74 | - (NSInteger)write:(const uint8_t *)buffer maxLength:(NSUInteger)len;
75 | // writes the bytes from the specified buffer to the stream up to len bytes. Returns the number of bytes actually written.
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:219:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
217 | out -= 100
218 | if out < 0 {
219 | completion(WSError(type: .writeTimeoutError, message: "Timed out waiting for the socket to be ready for a write", code: 0))
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
220 | return
221 | } else if let error = outStream.streamError {
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:224:27: warning: capture of 'self' with non-sendable type 'FoundationStream?' in a '@Sendable' closure
134 | }
135 |
136 | open class FoundationStream : NSObject, WSStream, StreamDelegate {
| `- note: class 'FoundationStream' does not conform to the 'Sendable' protocol
137 | private static let sharedWorkQueue = DispatchQueue(label: "com.vluxe.starscream.websocket", attributes: [])
138 | private var inputStream: InputStream?
:
222 | completion(error)
223 | return // disconnectStream will be called.
224 | } else if self == nil {
| `- warning: capture of 'self' with non-sendable type 'FoundationStream?' in a '@Sendable' closure
225 | completion(WSError(type: .closeError, message: "socket object has been dereferenced", code: 0))
226 | return
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:217:17: warning: mutation of captured var 'out' in concurrently-executing code
215 | while !outStream.hasSpaceAvailable {
216 | usleep(100) // wait until the socket is ready
217 | out -= 100
| `- warning: mutation of captured var 'out' in concurrently-executing code
218 | if out < 0 {
219 | completion(WSError(type: .writeTimeoutError, message: "Timed out waiting for the socket to be ready for a write", code: 0))
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:218:20: warning: reference to captured var 'out' in concurrently-executing code
216 | usleep(100) // wait until the socket is ready
217 | out -= 100
218 | if out < 0 {
| `- warning: reference to captured var 'out' in concurrently-executing code
219 | completion(WSError(type: .writeTimeoutError, message: "Timed out waiting for the socket to be ready for a write", code: 0))
220 | return
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:514:17: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
512 | let milliseconds = Int(seconds * 1_000)
513 | callbackQueue.asyncAfter(deadline: .now() + .milliseconds(milliseconds)) { [weak self] in
514 | self?.disconnectStream(nil)
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
515 | }
516 | fallthrough
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:671:59: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
669 | let operation = BlockOperation()
670 | operation.addExecutionBlock { [weak self, weak operation] in
671 | guard let sOperation = operation, let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
672 | guard !sOperation.isCancelled else { return }
673 | // Do the pinning now if needed
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:826:35: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
824 | if canDispatch {
825 | callbackQueue.async { [weak self] in
826 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
827 | s.onConnect?()
828 | s.delegate?.websocketDidConnect(socket: s)
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1081:39: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
1079 | if canDispatch {
1080 | callbackQueue.async { [weak self] in
1081 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
1082 | let pongData: Data? = data.count > 0 ? data : nil
1083 | s.onPong?(pongData)
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1168:39: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
1166 | if canDispatch {
1167 | callbackQueue.async { [weak self] in
1168 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
1169 | s.onText?(str)
1170 | s.delegate?.websocketDidReceiveMessage(socket: s, text: str)
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1171:104: warning: capture of 'response' with non-sendable type 'WebSocket.WSResponse' in a '@Sendable' closure
370 | let supportedSSLSchemes = ["wss", "https"]
371 |
372 | public class WSResponse {
| `- note: class 'WSResponse' does not conform to the 'Sendable' protocol
373 | var isFin = false
374 | public var code: OpCode = .continueFrame
:
1169 | s.onText?(str)
1170 | s.delegate?.websocketDidReceiveMessage(socket: s, text: str)
1171 | s.advancedDelegate?.websocketDidReceiveMessage(socket: s, text: str, response: response)
| `- warning: capture of 'response' with non-sendable type 'WebSocket.WSResponse' in a '@Sendable' closure
1172 | }
1173 | }
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1178:39: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
1176 | let data = response.buffer! // local copy so it is perverse for writing
1177 | callbackQueue.async { [weak self] in
1178 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
1179 | s.onData?(data as Data)
1180 | s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1179:35: warning: capture of 'data' with non-sendable type 'NSMutableData' in a '@Sendable' closure
1177 | callbackQueue.async { [weak self] in
1178 | guard let s = self else { return }
1179 | s.onData?(data as Data)
| `- warning: capture of 'data' with non-sendable type 'NSMutableData' in a '@Sendable' closure
1180 | s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)
1181 | s.advancedDelegate?.websocketDidReceiveData(socket: s, data: data as Data, response: response)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSData.h:192:12: note: class 'NSMutableData' does not conform to the 'Sendable' protocol
190 | /**************** Mutable Data ****************/
191 |
192 | @interface NSMutableData : NSData
| `- note: class 'NSMutableData' does not conform to the 'Sendable' protocol
193 |
194 | @property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1181:110: warning: capture of 'response' with non-sendable type 'WebSocket.WSResponse' in a '@Sendable' closure
370 | let supportedSSLSchemes = ["wss", "https"]
371 |
372 | public class WSResponse {
| `- note: class 'WSResponse' does not conform to the 'Sendable' protocol
373 | var isFin = false
374 | public var code: OpCode = .continueFrame
:
1179 | s.onData?(data as Data)
1180 | s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)
1181 | s.advancedDelegate?.websocketDidReceiveData(socket: s, data: data as Data, response: response)
| `- warning: capture of 'response' with non-sendable type 'WebSocket.WSResponse' in a '@Sendable' closure
1182 | }
1183 | }
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1208:27: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
1206 | operation.addExecutionBlock { [weak self, weak operation] in
1207 | //stream isn't ready, let's wait
1208 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
1209 | guard let sOperation = operation else { return }
1210 | var offset = 2
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1211:47: warning: capture of 'code' with non-sendable type 'WebSocket.OpCode' in a '@Sendable' closure
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
330 |
331 | public enum OpCode : UInt8 {
| `- note: consider making enum 'OpCode' conform to the 'Sendable' protocol
332 | case continueFrame = 0x0
333 | case textFrame = 0x1
:
1209 | guard let sOperation = operation else { return }
1210 | var offset = 2
1211 | var firstByte:UInt8 = s.FinMask | code.rawValue
| `- warning: capture of 'code' with non-sendable type 'WebSocket.OpCode' in a '@Sendable' closure
1212 | var data = data
1213 | if [.textFrame, .binaryFrame].contains(code), let compressor = s.compressionState.compressor {
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1264:72: warning: capture of 'writeCompletion' with non-sendable type '(() -> ())?' in a '@Sendable' closure
1262 | }
1263 | if total >= offset {
1264 | if let queue = self?.callbackQueue, let callback = writeCompletion {
| |- warning: capture of 'writeCompletion' with non-sendable type '(() -> ())?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1265 | queue.async {
1266 | callback()
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1266:29: warning: capture of 'callback' with non-sendable type '() -> ()' in a '@Sendable' closure
1264 | if let queue = self?.callbackQueue, let callback = writeCompletion {
1265 | queue.async {
1266 | callback()
| |- warning: capture of 'callback' with non-sendable type '() -> ()' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1267 | }
1268 | }
/Users/admin/builder/spi-builder-workspace/Sources/WebSocket.swift:1289:27: warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
327 |
328 |
329 | open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelegate {
| `- note: class 'WebSocket' does not conform to the 'Sendable' protocol
330 |
331 | public enum OpCode : UInt8 {
:
1287 | guard canDispatch else {return}
1288 | callbackQueue.async { [weak self] in
1289 | guard let s = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebSocket?' in a '@Sendable' closure
1290 | s.onDisconnect?(error)
1291 | s.delegate?.websocketDidDisconnect(socket: s, error: error)
Build complete! (5.16s)
warning: 'common-crypto-spm': ignoring declared target(s) 'SSCommonCrypto' in the system package
warning: 'zlib-spm': ignoring declared target(s) 'SSCZLib' in the system package
warning: 'spi-builder-workspace': dependency 'zlib-spm' is not used by any target
warning: 'spi-builder-workspace': dependency 'common-crypto-spm' is not used by any target
Build complete.
{
"dependencies" : [
{
"identity" : "zlib-spm",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Azoy/zlib-spm.git"
},
{
"identity" : "common-crypto-spm",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Azoy/common-crypto-spm.git"
}
],
"manifest_display_name" : "Starscream",
"name" : "Starscream",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Starscream",
"targets" : [
"Starscream"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "Starscream",
"module_type" : "SwiftTarget",
"name" : "Starscream",
"path" : "Sources",
"product_memberships" : [
"Starscream"
],
"sources" : [
"Compression.swift",
"SSLSecurity.swift",
"WebSocket.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Done.