Build Information
Successful build of PushNotifications, reference 4.0.0 (037435
), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 18:48:38 UTC.
Swift 6 data race errors: 5
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.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.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/pusher/push-notifications-swift.git
Reference: 4.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/pusher/push-notifications-swift
* tag 4.0.0 -> FETCH_HEAD
HEAD is now at 0374352 Merge pull request #174 from pusher/release/4.0.0
Cloned https://github.com/pusher/push-notifications-swift.git
Revision (git rev-parse @):
0374352e6a54071a4e3d2ddf674ba56a84630ba6
SUCCESS checkout https://github.com/pusher/push-notifications-swift.git at 4.0.0
Fetching https://github.com/mattgallagher/CwlCatchException.git
Fetching https://github.com/AliSoftware/OHHTTPStubs
Fetching https://github.com/Quick/Nimble
Fetching https://github.com/mattgallagher/CwlPreconditionTesting.git
[1/455] Fetching cwlcatchexception
[29/1712] Fetching cwlcatchexception, cwlpreconditiontesting
[947/9600] Fetching cwlcatchexception, cwlpreconditiontesting, ohhttpstubs
[9601/28818] Fetching cwlcatchexception, cwlpreconditiontesting, ohhttpstubs, nimble
Fetched https://github.com/AliSoftware/OHHTTPStubs from cache (2.92s)
Fetched https://github.com/mattgallagher/CwlCatchException.git from cache (2.92s)
Fetched https://github.com/mattgallagher/CwlPreconditionTesting.git from cache (2.92s)
Fetched https://github.com/Quick/Nimble from cache (2.92s)
Computing version for https://github.com/AliSoftware/OHHTTPStubs
Computed https://github.com/AliSoftware/OHHTTPStubs at 9.1.0 (0.68s)
Computing version for https://github.com/Quick/Nimble
Computed https://github.com/Quick/Nimble at 9.0.0 (0.68s)
Computing version for https://github.com/mattgallagher/CwlPreconditionTesting.git
Computed https://github.com/mattgallagher/CwlPreconditionTesting.git at 2.0.0 (0.90s)
Computing version for https://github.com/mattgallagher/CwlCatchException.git
Computed https://github.com/mattgallagher/CwlCatchException.git at 2.0.0 (0.77s)
Creating working copy for https://github.com/mattgallagher/CwlCatchException.git
Working copy of https://github.com/mattgallagher/CwlCatchException.git resolved at 2.0.0
Creating working copy for https://github.com/Quick/Nimble
Working copy of https://github.com/Quick/Nimble resolved at 9.0.0
Creating working copy for https://github.com/mattgallagher/CwlPreconditionTesting.git
Working copy of https://github.com/mattgallagher/CwlPreconditionTesting.git resolved at 2.0.0
Creating working copy for https://github.com/AliSoftware/OHHTTPStubs
Working copy of https://github.com/AliSoftware/OHHTTPStubs resolved at 9.1.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": "push-notifications-swift",
"name": "PushNotifications",
"url": "https://github.com/pusher/push-notifications-swift.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/push-notifications-swift",
"dependencies": [
{
"identity": "nimble",
"name": "Nimble",
"url": "https://github.com/Quick/Nimble",
"version": "9.2.1",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Nimble",
"dependencies": [
{
"identity": "cwlpreconditiontesting",
"name": "CwlPreconditionTesting",
"url": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"version": "2.2.2",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/CwlPreconditionTesting",
"dependencies": [
{
"identity": "cwlcatchexception",
"name": "CwlCatchException",
"url": "https://github.com/mattgallagher/CwlCatchException.git",
"version": "2.2.1",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/CwlCatchException",
"dependencies": [
]
}
]
}
]
},
{
"identity": "ohhttpstubs",
"name": "OHHTTPStubs",
"url": "https://github.com/AliSoftware/OHHTTPStubs",
"version": "9.1.0",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/OHHTTPStubs",
"dependencies": [
]
}
]
}
]
}
Fetching https://github.com/pusher/push-notifications-swift.git
[1/5469] Fetching push-notifications-swift
Fetched https://github.com/pusher/push-notifications-swift.git from cache (1.13s)
Fetching https://github.com/Quick/Nimble from cache
Fetching https://github.com/AliSoftware/OHHTTPStubs from cache
Fetched https://github.com/Quick/Nimble from cache (0.58s)
Fetched https://github.com/AliSoftware/OHHTTPStubs from cache (0.58s)
Computing version for https://github.com/AliSoftware/OHHTTPStubs
Computed https://github.com/AliSoftware/OHHTTPStubs at 9.1.0 (0.04s)
Computing version for https://github.com/Quick/Nimble
Computed https://github.com/Quick/Nimble at 9.2.1 (0.68s)
Fetching https://github.com/mattgallagher/CwlPreconditionTesting.git from cache
Fetched https://github.com/mattgallagher/CwlPreconditionTesting.git from cache (0.46s)
Computing version for https://github.com/mattgallagher/CwlPreconditionTesting.git
Computed https://github.com/mattgallagher/CwlPreconditionTesting.git at 2.2.2 (0.67s)
Fetching https://github.com/mattgallagher/CwlCatchException.git from cache
Fetched https://github.com/mattgallagher/CwlCatchException.git from cache (0.44s)
Computing version for https://github.com/mattgallagher/CwlCatchException.git
Computed https://github.com/mattgallagher/CwlCatchException.git at 2.2.1 (0.68s)
Creating working copy for https://github.com/mattgallagher/CwlCatchException.git
Working copy of https://github.com/mattgallagher/CwlCatchException.git resolved at 2.2.1
Creating working copy for https://github.com/Quick/Nimble
Working copy of https://github.com/Quick/Nimble resolved at 9.2.1
Creating working copy for https://github.com/AliSoftware/OHHTTPStubs
Working copy of https://github.com/AliSoftware/OHHTTPStubs resolved at 9.1.0
Creating working copy for https://github.com/mattgallagher/CwlPreconditionTesting.git
Working copy of https://github.com/mattgallagher/CwlPreconditionTesting.git resolved at 2.2.2
Creating working copy for https://github.com/pusher/push-notifications-swift.git
Working copy of https://github.com/pusher/push-notifications-swift.git resolved at 4.0.0 (0374352)
warning: '.resolve-product-dependencies': dependency 'push-notifications-swift' is not used by any target
Found 2 product dependencies
- Nimble
- OHHTTPStubs
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/pusher/push-notifications-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.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--7754E27361AE5C74.txt
[3/42] Emitting module PushNotifications
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | }
16 |
17 | private static var instance: PushNotifications?
| |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'instance' 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
18 | internal static var tokenProvider = [String: TokenProvider]()
19 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
6 | static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
| |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncEventHandlers' 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
7 |
8 | static func obtain(instanceId: String) -> ServerSyncEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | class ServerSyncProcessHandler {
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
| |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncHandlers' 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
6 | static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
7 | return serverSyncHandlersQueue.sync {
[4/46] Compiling PushNotifications MultipleInvalidInterestsError.swift
[5/46] Compiling PushNotifications PersistenceConstants.swift
[6/46] Compiling PushNotifications PublishId.swift
[7/46] Compiling PushNotifications PushNotificationsAPIError.swift
[8/46] Compiling PushNotifications SystemVersion.swift
[9/46] Compiling PushNotifications Token.swift
[10/46] Compiling PushNotifications PropertyListReadable.swift
[11/46] Compiling PushNotifications PushNotificationsNetworkable.swift
[12/46] Compiling PushNotifications MD5.swift
[13/46] Compiling PushNotifications AuthData.swift
[14/46] Compiling PushNotifications Constants.swift
[15/46] Compiling PushNotifications Device.swift
[16/46] Compiling PushNotifications FeatureFlags.swift
[17/46] Compiling PushNotifications RemoteNotificationType.swift
[18/46] Compiling PushNotifications SDK.swift
[19/46] Compiling PushNotifications ServerSyncEvent.swift
[20/46] Compiling PushNotifications ServerSyncJob.swift
[21/46] Compiling PushNotifications Array+CalculateMD5Hash.swift
[22/46] Compiling PushNotifications Encodable+Encode.swift
[23/46] Compiling PushNotifications String+HexStringToData.swift
[24/46] Compiling PushNotifications URL+NetworkService.swift
[25/46] Compiling PushNotifications DeviceTokenHelper.swift
[26/46] Compiling PushNotifications NetworkService.swift
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:236:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
234 | let httpURLResponse = response as? HTTPURLResponse
235 | else {
236 | result = .failure(.genericError(reason: "Error!"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
237 | semaphore.signal()
238 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:242:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
240 |
241 | if error != nil {
242 | result = .failure(.genericError(reason: "\(error!.localizedDescription)"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
243 | semaphore.signal()
244 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:250:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
248 | switch statusCode {
249 | case 200..<300:
250 | result = .success(data)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
251 |
252 | case 400:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:255:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
253 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
254 |
255 | result = .failure(.badRequest(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
256 |
257 | case 401, 403:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:262:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
260 | // Hack, until we add error codes in the server.
261 | if reason?.description.contains("device token") ?? false {
262 | result = .failure(.badDeviceToken(reason: reason!.description))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:264:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | result = .failure(.badDeviceToken(reason: reason!.description))
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
265 | }
266 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:268:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
266 |
267 | case 404:
268 | result = .failure(.deviceNotFound)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
269 |
270 | default:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:273:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
271 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
272 |
273 | result = .failure(.genericError(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
274 | }
275 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
6 | static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
| |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncEventHandlers' 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
7 |
8 | static func obtain(instanceId: String) -> ServerSyncEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncEventHandler {
| `- note: class 'ServerSyncEventHandler' does not conform to the 'Sendable' protocol
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
:
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| `- warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | class ServerSyncProcessHandler {
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
| |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncHandlers' 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
6 | static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
7 | return serverSyncHandlersQueue.sync {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
[27/46] Compiling PushNotifications ServerSyncEventHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:236:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
234 | let httpURLResponse = response as? HTTPURLResponse
235 | else {
236 | result = .failure(.genericError(reason: "Error!"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
237 | semaphore.signal()
238 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:242:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
240 |
241 | if error != nil {
242 | result = .failure(.genericError(reason: "\(error!.localizedDescription)"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
243 | semaphore.signal()
244 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:250:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
248 | switch statusCode {
249 | case 200..<300:
250 | result = .success(data)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
251 |
252 | case 400:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:255:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
253 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
254 |
255 | result = .failure(.badRequest(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
256 |
257 | case 401, 403:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:262:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
260 | // Hack, until we add error codes in the server.
261 | if reason?.description.contains("device token") ?? false {
262 | result = .failure(.badDeviceToken(reason: reason!.description))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:264:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | result = .failure(.badDeviceToken(reason: reason!.description))
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
265 | }
266 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:268:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
266 |
267 | case 404:
268 | result = .failure(.deviceNotFound)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
269 |
270 | default:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:273:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
271 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
272 |
273 | result = .failure(.genericError(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
274 | }
275 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
6 | static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
| |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncEventHandlers' 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
7 |
8 | static func obtain(instanceId: String) -> ServerSyncEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncEventHandler {
| `- note: class 'ServerSyncEventHandler' does not conform to the 'Sendable' protocol
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
:
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| `- warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | class ServerSyncProcessHandler {
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
| |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncHandlers' 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
6 | static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
7 | return serverSyncHandlersQueue.sync {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
[28/46] Compiling PushNotifications ServerSyncJobStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:236:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
234 | let httpURLResponse = response as? HTTPURLResponse
235 | else {
236 | result = .failure(.genericError(reason: "Error!"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
237 | semaphore.signal()
238 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:242:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
240 |
241 | if error != nil {
242 | result = .failure(.genericError(reason: "\(error!.localizedDescription)"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
243 | semaphore.signal()
244 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:250:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
248 | switch statusCode {
249 | case 200..<300:
250 | result = .success(data)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
251 |
252 | case 400:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:255:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
253 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
254 |
255 | result = .failure(.badRequest(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
256 |
257 | case 401, 403:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:262:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
260 | // Hack, until we add error codes in the server.
261 | if reason?.description.contains("device token") ?? false {
262 | result = .failure(.badDeviceToken(reason: reason!.description))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:264:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | result = .failure(.badDeviceToken(reason: reason!.description))
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
265 | }
266 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:268:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
266 |
267 | case 404:
268 | result = .failure(.deviceNotFound)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
269 |
270 | default:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:273:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
271 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
272 |
273 | result = .failure(.genericError(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
274 | }
275 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
6 | static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
| |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncEventHandlers' 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
7 |
8 | static func obtain(instanceId: String) -> ServerSyncEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncEventHandler {
| `- note: class 'ServerSyncEventHandler' does not conform to the 'Sendable' protocol
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
:
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| `- warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | class ServerSyncProcessHandler {
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
| |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncHandlers' 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
6 | static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
7 | return serverSyncHandlersQueue.sync {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
[29/46] Compiling PushNotifications ServerSyncProcessHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:236:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
234 | let httpURLResponse = response as? HTTPURLResponse
235 | else {
236 | result = .failure(.genericError(reason: "Error!"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
237 | semaphore.signal()
238 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:242:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
240 |
241 | if error != nil {
242 | result = .failure(.genericError(reason: "\(error!.localizedDescription)"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
243 | semaphore.signal()
244 | return
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:250:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
248 | switch statusCode {
249 | case 200..<300:
250 | result = .success(data)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
251 |
252 | case 400:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:255:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
253 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
254 |
255 | result = .failure(.badRequest(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
256 |
257 | case 401, 403:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:262:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
260 | // Hack, until we add error codes in the server.
261 | if reason?.description.contains("device token") ?? false {
262 | result = .failure(.badDeviceToken(reason: reason!.description))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:264:21: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | result = .failure(.badDeviceToken(reason: reason!.description))
263 | } else {
264 | result = .failure(.badJWT(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
265 | }
266 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:268:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
266 |
267 | case 404:
268 | result = .failure(.deviceNotFound)
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
269 |
270 | default:
/Users/admin/builder/spi-builder-workspace/Sources/Services/NetworkService.swift:273:17: warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
271 | let reason = try? JSONDecoder().decode(Reason.self, from: data)
272 |
273 | result = .failure(.genericError(reason: reason?.description ?? "Unknown API error"))
| `- warning: mutation of captured var 'result' in concurrently-executing code; this is an error in the Swift 6 language mode
274 | }
275 |
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
6 | static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
| |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncEventHandlers' 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
7 |
8 | static func obtain(instanceId: String) -> ServerSyncEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncEventHandler {
| `- note: class 'ServerSyncEventHandler' does not conform to the 'Sendable' protocol
4 |
5 | static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
:
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| `- warning: capture of 'self' with non-sendable type 'ServerSyncEventHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | class ServerSyncProcessHandler {
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
| |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'serverSyncHandlers' 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
6 | static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
7 | return serverSyncHandlersQueue.sync {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
58 | default:
59 | self.handleMessageQueue.async {
60 | self.handleMessage(serverSyncJob: job)
| `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | func sendMessage(serverSyncJob: ServerSyncJob) {
67 | self.sendMessageQueue.async {
68 | self.jobQueue.append(serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ServerSyncProcessHandler {
| `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
4 | private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
5 | private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
:
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |
70 | self.handleMessageQueue.async {
71 | self.handleMessage(serverSyncJob: serverSyncJob)
| `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | }
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | enum ServerSyncJob {
| `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
4 | case startJob(instanceId: String, token: String)
5 | case refreshTokenJob(newToken: String)
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
/Users/admin/builder/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:36:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
34 | switch event {
35 | case .interestsChangedEvent(let interests):
36 | self.interestsChangedDelegates.forEach({ delegate in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
37 | if let delegate = delegate() {
38 | delegate.interestsSetOnDeviceDidChange(interests: interests)
[30/46] Compiling PushNotifications PushNotificationsError.swift
[31/46] Compiling PushNotifications PusherAlreadyRegisteredError.swift
[32/46] Compiling PushNotifications Reason.swift
[33/46] Compiling PushNotifications Register.swift
[34/46] Compiling PushNotifications HTTPMethod.swift
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[35/46] Compiling PushNotifications InstanceId.swift
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[36/46] Compiling PushNotifications InterestValidationError.swift
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[37/46] Compiling PushNotifications Interests.swift
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[38/46] Compiling PushNotifications Metadata.swift
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[39/46] Compiling PushNotifications ReportEventType.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[40/46] Compiling PushNotifications RetryStrategy.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[41/46] Compiling PushNotifications TokenProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[42/46] Compiling PushNotifications PushNotifications.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | let macosVersion: String?
7 |
8 | internal static var current: Metadata = {
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' 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
9 | let sdkVersion = SDK.version
10 | let systemVersion = SystemVersion.version
[43/46] Compiling PushNotifications PushNotificationsStatic.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | }
16 |
17 | private static var instance: PushNotifications?
| |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'instance' 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
18 | internal static var tokenProvider = [String: TokenProvider]()
19 |
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:30: warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:12:26: note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
10 | open var registeredForRemoteNotifications: Bool { get }
11 | @available(macOS 10.7, *)
12 | @MainActor open func registerForRemoteNotifications(matching types: NSApplication.RemoteNotificationType)
| `- note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
13 | @available(macOS 10.7, *)
14 | @available(swift, obsoleted: 3, renamed: "registerForRemoteNotifications(matching:)")
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:23: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:2:31: note: class property declared here
1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
2 | @MainActor open class var shared: NSApplication { get }
| `- note: class property declared here
3 | @available(swift, obsoleted: 3, renamed: "shared")
4 | open class var sharedApplication: NSApplication { get }
/Users/admin/builder/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:51:24: warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | urlSession.dataTask(with: urlRequest, completionHandler: { data, response, error in
50 | guard let data = data else {
51 | return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Token is nil"))
| |- warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> 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'
52 | }
53 | guard let httpURLResponse = response as? HTTPURLResponse else {
[44/46] Compiling PushNotifications BeamsTokenProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | }
16 |
17 | private static var instance: PushNotifications?
| |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'instance' 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
18 | internal static var tokenProvider = [String: TokenProvider]()
19 |
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:30: warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:12:26: note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
10 | open var registeredForRemoteNotifications: Bool { get }
11 | @available(macOS 10.7, *)
12 | @MainActor open func registerForRemoteNotifications(matching types: NSApplication.RemoteNotificationType)
| `- note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
13 | @available(macOS 10.7, *)
14 | @available(swift, obsoleted: 3, renamed: "registerForRemoteNotifications(matching:)")
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:23: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:2:31: note: class property declared here
1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
2 | @MainActor open class var shared: NSApplication { get }
| `- note: class property declared here
3 | @available(swift, obsoleted: 3, renamed: "shared")
4 | open class var sharedApplication: NSApplication { get }
/Users/admin/builder/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:51:24: warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | urlSession.dataTask(with: urlRequest, completionHandler: { data, response, error in
50 | guard let data = data else {
51 | return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Token is nil"))
| |- warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> 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'
52 | }
53 | guard let httpURLResponse = response as? HTTPURLResponse else {
[45/46] Compiling PushNotifications DeviceStateStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | }
16 |
17 | private static var instance: PushNotifications?
| |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'instance' 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
18 | internal static var tokenProvider = [String: TokenProvider]()
19 |
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:30: warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:12:26: note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
10 | open var registeredForRemoteNotifications: Bool { get }
11 | @available(macOS 10.7, *)
12 | @MainActor open func registerForRemoteNotifications(matching types: NSApplication.RemoteNotificationType)
| `- note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
13 | @available(macOS 10.7, *)
14 | @available(swift, obsoleted: 3, renamed: "registerForRemoteNotifications(matching:)")
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:23: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:2:31: note: class property declared here
1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
2 | @MainActor open class var shared: NSApplication { get }
| `- note: class property declared here
3 | @available(swift, obsoleted: 3, renamed: "shared")
4 | open class var sharedApplication: NSApplication { get }
/Users/admin/builder/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:51:24: warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | urlSession.dataTask(with: urlRequest, completionHandler: { data, response, error in
50 | guard let data = data else {
51 | return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Token is nil"))
| |- warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> 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'
52 | }
53 | guard let httpURLResponse = response as? HTTPURLResponse else {
[46/46] Compiling PushNotifications EventTypeHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | }
16 |
17 | private static var instance: PushNotifications?
| |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'instance' 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
18 | internal static var tokenProvider = [String: TokenProvider]()
19 |
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | private static var instance: PushNotifications?
18 | internal static var tokenProvider = [String: TokenProvider]()
| |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'tokenProvider' 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
19 |
20 | /**
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:30: warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: call to main actor-isolated instance method 'registerForRemoteNotifications(matching:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:12:26: note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
10 | open var registeredForRemoteNotifications: Bool { get }
11 | @available(macOS 10.7, *)
12 | @MainActor open func registerForRemoteNotifications(matching types: NSApplication.RemoteNotificationType)
| `- note: calls to instance method 'registerForRemoteNotifications(matching:)' from outside of its actor context are implicitly asynchronous
13 | @available(macOS 10.7, *)
14 | @available(swift, obsoleted: 3, renamed: "registerForRemoteNotifications(matching:)")
/Users/admin/builder/spi-builder-workspace/Sources/PushNotificationsStatic.swift:90:23: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | }
88 | #elseif os(OSX)
89 | private static func registerForPushNotifications(options: NSApplication.RemoteNotificationType) {
| `- note: add '@MainActor' to make static method 'registerForPushNotifications(options:)' part of global actor 'MainActor'
90 | NSApplication.shared.registerForRemoteNotifications(matching: options)
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
91 | }
92 | #endif
AppKit.NSApplication:2:31: note: class property declared here
1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
2 | @MainActor open class var shared: NSApplication { get }
| `- note: class property declared here
3 | @available(swift, obsoleted: 3, renamed: "shared")
4 | open class var sharedApplication: NSApplication { get }
/Users/admin/builder/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:51:24: warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | urlSession.dataTask(with: urlRequest, completionHandler: { data, response, error in
50 | guard let data = data else {
51 | return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Token is nil"))
| |- warning: capture of 'completion' with non-sendable type '(String, (any Error)?) -> 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'
52 | }
53 | guard let httpURLResponse = response as? HTTPURLResponse else {
Build complete! (20.69s)
Build complete.
{
"dependencies" : [
{
"identity" : "nimble",
"requirement" : {
"range" : [
{
"lower_bound" : "9.0.0",
"upper_bound" : "10.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Quick/Nimble"
},
{
"identity" : "ohhttpstubs",
"requirement" : {
"range" : [
{
"lower_bound" : "9.1.0",
"upper_bound" : "10.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/AliSoftware/OHHTTPStubs"
}
],
"manifest_display_name" : "PushNotifications",
"name" : "PushNotifications",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.10"
},
{
"name" : "ios",
"version" : "10.0"
}
],
"products" : [
{
"name" : "PushNotifications",
"targets" : [
"PushNotifications"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"swift_languages_versions" : [
"5"
],
"targets" : [
{
"c99name" : "PushNotificationsTests",
"module_type" : "SwiftTarget",
"name" : "PushNotificationsTests",
"path" : "Tests",
"product_dependencies" : [
"Nimble",
"OHHTTPStubs",
"OHHTTPStubsSwift"
],
"sources" : [
"Extensions/Array+ContainsSameElements.swift",
"Integration/ApplicationStartTests.swift",
"Integration/ClearAllStateTest.swift",
"Integration/DeviceInterestsTest.swift",
"Integration/DeviceRegistrationTests.swift",
"Integration/MultipleClassInstanceSupportTest.swift",
"Integration/MultipleInstanceSupportTest.swift",
"Integration/ReportEventTypeTests.swift",
"Integration/SetUserIdTest.swift",
"Integration/StopTests.swift",
"Integration/TestAPIClientHelper.swift",
"Integration/TestHelper.swift",
"Unit/Extensions/ArrayContainsSameElementsTests.swift",
"Unit/Helpers/DeviceTokenHelperTests.swift",
"Unit/Helpers/InterestsMD5HashTests.swift",
"Unit/Models/AuthDataTests.swift",
"Unit/Models/ConstantsTests.swift",
"Unit/Models/FeatureFlagsTests.swift",
"Unit/Models/InterestsTests.swift",
"Unit/Models/PublishIdTests.swift",
"Unit/Models/ReasonTests.swift",
"Unit/Models/RegisterTests.swift",
"Unit/Models/SDKTests.swift",
"Unit/Models/SystemVersionTests.swift",
"Unit/Services/BeamsTokenProviderTests.swift",
"Unit/Services/DeviceStateStoreTests.swift",
"Unit/Services/DeviceTests.swift",
"Unit/Services/EventTypeHandlerTests.swift",
"Unit/Services/InstanceDeviceStateStoreTests.swift",
"Unit/Services/InterestPersistableTests.swift",
"Unit/Services/ServerSyncJobStoreTests.swift",
"Unit/Services/ServerSyncProcessHandlerTests.swift",
"Unit/Services/UserPersistableTests.swift"
],
"target_dependencies" : [
"PushNotifications"
],
"type" : "test"
},
{
"c99name" : "PushNotifications",
"module_type" : "SwiftTarget",
"name" : "PushNotifications",
"path" : "Sources",
"product_memberships" : [
"PushNotifications"
],
"sources" : [
"Extensions/Array+CalculateMD5Hash.swift",
"Extensions/Encodable+Encode.swift",
"Extensions/String+HexStringToData.swift",
"Extensions/URL+NetworkService.swift",
"Helpers/DeviceTokenHelper.swift",
"Helpers/MD5.swift",
"Models/AuthData.swift",
"Models/Constants.swift",
"Models/Device.swift",
"Models/FeatureFlags.swift",
"Models/HTTPMethod.swift",
"Models/InstanceId.swift",
"Models/InterestValidationError.swift",
"Models/Interests.swift",
"Models/Metadata.swift",
"Models/MultipleInvalidInterestsError.swift",
"Models/PersistenceConstants.swift",
"Models/PublishId.swift",
"Models/PushNotificationsAPIError.swift",
"Models/PushNotificationsError.swift",
"Models/PusherAlreadyRegisteredError.swift",
"Models/Reason.swift",
"Models/Register.swift",
"Models/RemoteNotificationType.swift",
"Models/SDK.swift",
"Models/ServerSyncEvent.swift",
"Models/ServerSyncJob.swift",
"Models/SystemVersion.swift",
"Models/Token.swift",
"Protocols/PropertyListReadable.swift",
"Protocols/PushNotificationsNetworkable.swift",
"Protocols/ReportEventType.swift",
"Protocols/RetryStrategy.swift",
"Protocols/TokenProvider.swift",
"PushNotifications.swift",
"PushNotificationsStatic.swift",
"Services/BeamsTokenProvider.swift",
"Services/DeviceStateStore.swift",
"Services/EventTypeHandler.swift",
"Services/NetworkService.swift",
"Services/ServerSyncEventHandler.swift",
"Services/ServerSyncJobStore.swift",
"Services/ServerSyncProcessHandler.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Done.