Build Information
Failed to build ArtAdk, reference main (fa50d4), with Swift 6.1 for Linux on 29 Apr 2026 15:09:12 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/aiotrixdev/art-swift-adk.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/aiotrixdev/art-swift-adk
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at fa50d49 Merge pull request #4 from aiotrixdev/release/release-1
Cloned https://github.com/aiotrixdev/art-swift-adk.git
Revision (git rev-parse @):
fa50d49a12c6def2d81396e685a567126e2f2f82
SUCCESS checkout https://github.com/aiotrixdev/art-swift-adk.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/aiotrixdev/art-swift-adk.git
https://github.com/aiotrixdev/art-swift-adk.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:a7bfd71e9384436264431030299dc8a2d42d0664a168cfa1a5dd84c9bc592ccf
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest
Fetching https://github.com/bitmark-inc/tweetnacl-swiftwrap
[1/421] Fetching tweetnacl-swiftwrap
Fetched https://github.com/bitmark-inc/tweetnacl-swiftwrap from cache (0.30s)
Computing version for https://github.com/bitmark-inc/tweetnacl-swiftwrap
Computed https://github.com/bitmark-inc/tweetnacl-swiftwrap at 1.1.0 (3.61s)
Creating working copy for https://github.com/bitmark-inc/tweetnacl-swiftwrap
Working copy of https://github.com/bitmark-inc/tweetnacl-swiftwrap resolved at 1.1.0
Building for debugging...
[0/4] Write sources
[2/4] Compiling CTweetNacl ctweetnacl.c
[3/4] Write swift-version-24593BA9C3E375BF.txt
[5/7] Emitting module TweetNacl
[6/7] Compiling TweetNacl TweetNacl.swift
[7/7] Compiling TweetNacl Constant.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/26] Emitting module ArtAdk
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:6: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
4 |
5 | // MARK: - Singleton
6 | private static var _instance: Auth?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | private static let lock = NSLock()
8 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:4:23: warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | public final class Constant {
4 | public static var ROOT: String = "/"
| |- warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'ROOT' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'ROOT' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:5:23: warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public final class Constant {
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
| |- warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_FILE_NAME' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_FILE_NAME' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:6:23: warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
| |- warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'BASE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'BASE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:7:23: warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
| |- warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'WS_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'WS_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:8:23: warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
| |- warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'SSE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'SSE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:9:23: warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
| |- warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LPOLL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'LPOLL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
11 | }
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:10:23: warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
| |- warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_JSON_PATH' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_JSON_PATH' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | }
12 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:19: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
17 |
18 | // MARK: Singleton
19 | private static var _instance: Socket?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
[10/28] Compiling ArtAdk LiveObjSubscription.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:51:27: error: cannot find 'URLRequest' in scope
49 | guard let url = components.url else { continue }
50 |
51 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
52 | req.timeoutInterval = 35 // longer than server hold time
53 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:57:61: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
55 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
56 |
57 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
58 | guard let http = response as? HTTPURLResponse else { continue }
59 |
[11/28] Compiling ArtAdk LongPollClient.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:51:27: error: cannot find 'URLRequest' in scope
49 | guard let url = components.url else { continue }
50 |
51 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
52 | req.timeoutInterval = 35 // longer than server hold time
53 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:57:61: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
55 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
56 |
57 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
58 | guard let http = response as? HTTPURLResponse else { continue }
59 |
[12/28] Compiling ArtAdk SocketTypes.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:226:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 | private func loadConfig() async -> AuthenticationConfig {
225 | guard let url = URL(string: Constant.CONFIG_JSON_PATH),
226 | let (data, _) = try? await URLSession.shared.data(from: url),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 | let json = try? JSONSerialization.jsonObject(with: data) as? [String: String] else {
228 | return AuthenticationConfig()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:248:19: error: cannot find 'URLRequest' in scope
246 | throw ARTError.serverError("Malformed public key URL")
247 | }
248 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
249 | req.httpMethod = "POST"
250 | req.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:257:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
255 | req.httpBody = try JSONSerialization.data(withJSONObject: ["public_key": keyPair.publicKey])
256 |
257 | let (_, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
258 | guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
259 | throw ARTError.serverError("Error updating keypair")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:295:19: error: cannot find 'URLRequest' in scope
293 | throw ARTError.serverError("Malformed API URL: \(endpoint)")
294 | }
295 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
296 | req.httpMethod = options.method.uppercased()
297 | req.setValue("Bearer \(authData.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:309:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
307 | }
308 |
309 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
310 | guard let http = response as? HTTPURLResponse else {
311 | throw ARTError.serverError("No HTTP response")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:321:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
319 | guard http.statusCode >= 200 && http.statusCode < 300 else {
320 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
321 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
322 | throw ARTError.serverError("API \(endpoint) failed: \(msg)")
323 | }
[13/28] Compiling ArtAdk Adk.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:226:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 | private func loadConfig() async -> AuthenticationConfig {
225 | guard let url = URL(string: Constant.CONFIG_JSON_PATH),
226 | let (data, _) = try? await URLSession.shared.data(from: url),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 | let json = try? JSONSerialization.jsonObject(with: data) as? [String: String] else {
228 | return AuthenticationConfig()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:248:19: error: cannot find 'URLRequest' in scope
246 | throw ARTError.serverError("Malformed public key URL")
247 | }
248 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
249 | req.httpMethod = "POST"
250 | req.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:257:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
255 | req.httpBody = try JSONSerialization.data(withJSONObject: ["public_key": keyPair.publicKey])
256 |
257 | let (_, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
258 | guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
259 | throw ARTError.serverError("Error updating keypair")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:295:19: error: cannot find 'URLRequest' in scope
293 | throw ARTError.serverError("Malformed API URL: \(endpoint)")
294 | }
295 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
296 | req.httpMethod = options.method.uppercased()
297 | req.setValue("Bearer \(authData.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:309:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
307 | }
308 |
309 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
310 | guard let http = response as? HTTPURLResponse else {
311 | throw ARTError.serverError("No HTTP response")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:321:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
319 | guard http.statusCode >= 200 && http.statusCode < 300 else {
320 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
321 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
322 | throw ARTError.serverError("API \(endpoint) failed: \(msg)")
323 | }
[14/28] Compiling ArtAdk AuthTypes.swift
[15/28] Compiling ArtAdk ChannelTypes.swift
[16/28] Compiling ArtAdk CryptoTypes.swift
[17/28] Compiling ArtAdk CRDTUtils.swift
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:4:23: warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | public final class Constant {
4 | public static var ROOT: String = "/"
| |- warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'ROOT' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'ROOT' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:5:23: warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public final class Constant {
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
| |- warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_FILE_NAME' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_FILE_NAME' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:6:23: warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
| |- warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'BASE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'BASE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:7:23: warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
| |- warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'WS_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'WS_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:8:23: warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
| |- warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'SSE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'SSE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:9:23: warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
| |- warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LPOLL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'LPOLL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
11 | }
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:10:23: warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
| |- warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_JSON_PATH' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_JSON_PATH' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | }
12 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[18/28] Compiling ArtAdk Constant.swift
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:4:23: warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | public final class Constant {
4 | public static var ROOT: String = "/"
| |- warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'ROOT' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'ROOT' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:5:23: warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public final class Constant {
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
| |- warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_FILE_NAME' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_FILE_NAME' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:6:23: warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
| |- warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'BASE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'BASE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:7:23: warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
| |- warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'WS_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'WS_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:8:23: warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
| |- warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'SSE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'SSE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:9:23: warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
| |- warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LPOLL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'LPOLL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
11 | }
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:10:23: warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
| |- warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_JSON_PATH' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_JSON_PATH' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | }
12 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[19/28] Compiling ArtAdk CryptoBox.swift
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:4:23: warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | public final class Constant {
4 | public static var ROOT: String = "/"
| |- warning: static property 'ROOT' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'ROOT' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'ROOT' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:5:23: warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public final class Constant {
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
| |- warning: static property 'CONFIG_FILE_NAME' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_FILE_NAME' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_FILE_NAME' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:6:23: warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 | public static var ROOT: String = "/"
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
| |- warning: static property 'BASE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'BASE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'BASE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:7:23: warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var CONFIG_FILE_NAME: String = "adk-services.json"
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
| |- warning: static property 'WS_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'WS_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'WS_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:8:23: warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
6 | public static var BASE_URL: String = ""
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
| |- warning: static property 'SSE_URL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'SSE_URL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'SSE_URL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:9:23: warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
7 | public static var WS_URL: String = "/v1/connect"
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
| |- warning: static property 'LPOLL' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LPOLL' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'LPOLL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
11 | }
/host/spi-builder-workspace/Sources/ArtAdk/Config/Constant.swift:10:23: warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | public static var SSE_URL: String = "/v1/connect/sse"
9 | public static var LPOLL: String = "/v1/longpoll"
10 | public static var CONFIG_JSON_PATH: String = "/adk-services.json"
| |- warning: static property 'CONFIG_JSON_PATH' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'CONFIG_JSON_PATH' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'CONFIG_JSON_PATH' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | }
12 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[20/28] Compiling ArtAdk HelperFunctions.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Interception.swift:32:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
30 |
31 | public func reconnect() {
32 | Task { try? await validateInterception() }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
33 | }
34 |
[21/28] Compiling ArtAdk Interception.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Interception.swift:32:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
30 |
31 | public func reconnect() {
32 | Task { try? await validateInterception() }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
33 | }
34 |
[22/28] Compiling ArtAdk Auth.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:6: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
4 |
5 | // MARK: - Singleton
6 | private static var _instance: Auth?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | private static let lock = NSLock()
8 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
[23/28] Compiling ArtAdk CRDT.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:6: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
4 |
5 | // MARK: - Singleton
6 | private static var _instance: Auth?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | private static let lock = NSLock()
8 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
[24/28] Compiling ArtAdk CRDTTypes.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:6: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
4 |
5 | // MARK: - Singleton
6 | private static var _instance: Auth?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | private static let lock = NSLock()
8 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
[25/28] Compiling ArtAdk BaseSubscription.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/BaseSubscription.swift:248:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
246 | channelConfig.channelName != "art_secure" else { return }
247 |
248 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
249 | if isListening {
| `- note: closure captures 'self' which is accessible to code in the current task
250 | await validateSubscription(process: "presence")
251 | }
[26/28] Compiling ArtAdk EventEmitter.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/BaseSubscription.swift:248:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
246 | channelConfig.channelName != "art_secure" else { return }
247 |
248 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
249 | if isListening {
| `- note: closure captures 'self' which is accessible to code in the current task
250 | await validateSubscription(process: "presence")
251 | }
[27/28] Compiling ArtAdk Socket.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:19: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
17 |
18 | // MARK: Singleton
19 | private static var _instance: Socket?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:54: error: cannot infer contextual base in reference to member 'default'
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: cannot infer contextual base in reference to member 'default'
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:94: error: 'nil' requires a contextual type
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:173:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
171 | group.addTask { [weak self] in
172 | guard let self else { return }
173 | let task = self.urlSession.webSocketTask(with: wsURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
174 |
175 | task.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:190:27: error: cannot infer contextual base in reference to member 'completed'
188 | private func safeClose(timeout: Double = 1.0) async {
189 | guard let task = websocket else { return }
190 | if task.state == .completed { websocket = nil; return }
| `- error: cannot infer contextual base in reference to member 'completed'
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:32: error: cannot infer contextual base in reference to member 'normalClosure'
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:55: error: 'nil' requires a contextual type
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:218:27: error: cannot find 'URLRequest' in scope
216 |
217 | do {
218 | var req = URLRequest(url: sseURL)
| `- error: cannot find 'URLRequest' in scope
219 | req.setValue("text/event-stream", forHTTPHeaderField: "Accept")
220 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:518:52: error: cannot infer contextual base in reference to member 'running'
516 | public func sendMessage(_ message: String) -> Bool {
517 |
518 | guard let task = websocket, task.state == .running else {
| `- error: cannot infer contextual base in reference to member 'running'
519 | withSocketLock { pendingSendMessages.append(message) }
520 | return false
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:20: error: cannot infer contextual base in reference to member 'string'
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer contextual base in reference to member 'string'
523 | if let error { self?.emitter.emit("error", error) }
524 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:51: error: cannot infer type of closure parameter 'error' without a type annotation
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
523 | if let error { self?.emitter.emit("error", error) }
524 | }
[28/28] Compiling ArtAdk Subscription.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:19: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
17 |
18 | // MARK: Singleton
19 | private static var _instance: Socket?
| |- 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: add '@MainActor' to make static property '_instance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:54: error: cannot infer contextual base in reference to member 'default'
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: cannot infer contextual base in reference to member 'default'
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:94: error: 'nil' requires a contextual type
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:173:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
171 | group.addTask { [weak self] in
172 | guard let self else { return }
173 | let task = self.urlSession.webSocketTask(with: wsURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
174 |
175 | task.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:190:27: error: cannot infer contextual base in reference to member 'completed'
188 | private func safeClose(timeout: Double = 1.0) async {
189 | guard let task = websocket else { return }
190 | if task.state == .completed { websocket = nil; return }
| `- error: cannot infer contextual base in reference to member 'completed'
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:32: error: cannot infer contextual base in reference to member 'normalClosure'
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:55: error: 'nil' requires a contextual type
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:218:27: error: cannot find 'URLRequest' in scope
216 |
217 | do {
218 | var req = URLRequest(url: sseURL)
| `- error: cannot find 'URLRequest' in scope
219 | req.setValue("text/event-stream", forHTTPHeaderField: "Accept")
220 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:518:52: error: cannot infer contextual base in reference to member 'running'
516 | public func sendMessage(_ message: String) -> Bool {
517 |
518 | guard let task = websocket, task.state == .running else {
| `- error: cannot infer contextual base in reference to member 'running'
519 | withSocketLock { pendingSendMessages.append(message) }
520 | return false
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:20: error: cannot infer contextual base in reference to member 'string'
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer contextual base in reference to member 'string'
523 | if let error { self?.emitter.emit("error", error) }
524 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:51: error: cannot infer type of closure parameter 'error' without a type annotation
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
523 | if let error { self?.emitter.emit("error", error) }
524 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:a7bfd71e9384436264431030299dc8a2d42d0664a168cfa1a5dd84c9bc592ccf
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/4] Compiling TweetNacl Constant.swift
[3/4] Compiling TweetNacl TweetNacl.swift
[4/4] Emitting module TweetNacl
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/23] Emitting module ArtAdk
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
[7/25] Compiling ArtAdk LiveObjSubscription.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:51:27: error: cannot find 'URLRequest' in scope
49 | guard let url = components.url else { continue }
50 |
51 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
52 | req.timeoutInterval = 35 // longer than server hold time
53 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:57:61: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
55 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
56 |
57 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
58 | guard let http = response as? HTTPURLResponse else { continue }
59 |
[8/25] Compiling ArtAdk LongPollClient.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:51:27: error: cannot find 'URLRequest' in scope
49 | guard let url = components.url else { continue }
50 |
51 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
52 | req.timeoutInterval = 35 // longer than server hold time
53 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/LongPollClient.swift:57:61: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
55 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
56 |
57 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
58 | guard let http = response as? HTTPURLResponse else { continue }
59 |
[9/25] Compiling ArtAdk HelperFunctions.swift
[10/25] Compiling ArtAdk Interception.swift
[11/25] Compiling ArtAdk SocketTypes.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:226:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 | private func loadConfig() async -> AuthenticationConfig {
225 | guard let url = URL(string: Constant.CONFIG_JSON_PATH),
226 | let (data, _) = try? await URLSession.shared.data(from: url),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 | let json = try? JSONSerialization.jsonObject(with: data) as? [String: String] else {
228 | return AuthenticationConfig()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:248:19: error: cannot find 'URLRequest' in scope
246 | throw ARTError.serverError("Malformed public key URL")
247 | }
248 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
249 | req.httpMethod = "POST"
250 | req.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:257:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
255 | req.httpBody = try JSONSerialization.data(withJSONObject: ["public_key": keyPair.publicKey])
256 |
257 | let (_, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
258 | guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
259 | throw ARTError.serverError("Error updating keypair")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:295:19: error: cannot find 'URLRequest' in scope
293 | throw ARTError.serverError("Malformed API URL: \(endpoint)")
294 | }
295 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
296 | req.httpMethod = options.method.uppercased()
297 | req.setValue("Bearer \(authData.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:309:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
307 | }
308 |
309 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
310 | guard let http = response as? HTTPURLResponse else {
311 | throw ARTError.serverError("No HTTP response")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:321:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
319 | guard http.statusCode >= 200 && http.statusCode < 300 else {
320 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
321 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
322 | throw ARTError.serverError("API \(endpoint) failed: \(msg)")
323 | }
[12/25] Compiling ArtAdk Adk.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:226:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 | private func loadConfig() async -> AuthenticationConfig {
225 | guard let url = URL(string: Constant.CONFIG_JSON_PATH),
226 | let (data, _) = try? await URLSession.shared.data(from: url),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 | let json = try? JSONSerialization.jsonObject(with: data) as? [String: String] else {
228 | return AuthenticationConfig()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:248:19: error: cannot find 'URLRequest' in scope
246 | throw ARTError.serverError("Malformed public key URL")
247 | }
248 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
249 | req.httpMethod = "POST"
250 | req.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:257:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
255 | req.httpBody = try JSONSerialization.data(withJSONObject: ["public_key": keyPair.publicKey])
256 |
257 | let (_, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
258 | guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
259 | throw ARTError.serverError("Error updating keypair")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:295:19: error: cannot find 'URLRequest' in scope
293 | throw ARTError.serverError("Malformed API URL: \(endpoint)")
294 | }
295 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
296 | req.httpMethod = options.method.uppercased()
297 | req.setValue("Bearer \(authData.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:309:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
307 | }
308 |
309 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
310 | guard let http = response as? HTTPURLResponse else {
311 | throw ARTError.serverError("No HTTP response")
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Adk.swift:321:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
319 | guard http.statusCode >= 200 && http.statusCode < 300 else {
320 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
321 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
322 | throw ARTError.serverError("API \(endpoint) failed: \(msg)")
323 | }
[13/25] Compiling ArtAdk BaseSubscription.swift
[14/25] Compiling ArtAdk EventEmitter.swift
[15/25] Compiling ArtAdk CRDTUtils.swift
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[16/25] Compiling ArtAdk Constant.swift
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[17/25] Compiling ArtAdk CryptoBox.swift
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:16: error: cannot find 'SecRandomCopyBytes' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'SecRandomCopyBytes' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:75:35: error: cannot find 'kSecRandomDefault' in scope
73 | var nonce = Data(count: CryptoBox.nonceLength)
74 | let result = nonce.withUnsafeMutableBytes {
75 | SecRandomCopyBytes(kSecRandomDefault, CryptoBox.nonceLength, $0.baseAddress!)
| `- error: cannot find 'kSecRandomDefault' in scope
76 | }
77 |
/host/spi-builder-workspace/Sources/ArtAdk/Crypto/CryptoBox.swift:78:28: error: cannot find 'errSecSuccess' in scope
76 | }
77 |
78 | guard result == errSecSuccess else {
| `- error: cannot find 'errSecSuccess' in scope
79 | throw NSError(domain: "CryptoBox", code: -1, userInfo: [NSLocalizedDescriptionKey: "Random generation failed"])
80 | }
[18/25] Compiling ArtAdk AuthTypes.swift
[19/25] Compiling ArtAdk ChannelTypes.swift
[20/25] Compiling ArtAdk CryptoTypes.swift
[21/25] Compiling ArtAdk Socket.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:54: error: cannot infer contextual base in reference to member 'default'
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: cannot infer contextual base in reference to member 'default'
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:94: error: 'nil' requires a contextual type
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:173:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
171 | group.addTask { [weak self] in
172 | guard let self else { return }
173 | let task = self.urlSession.webSocketTask(with: wsURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
174 |
175 | task.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:190:27: error: cannot infer contextual base in reference to member 'completed'
188 | private func safeClose(timeout: Double = 1.0) async {
189 | guard let task = websocket else { return }
190 | if task.state == .completed { websocket = nil; return }
| `- error: cannot infer contextual base in reference to member 'completed'
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:32: error: cannot infer contextual base in reference to member 'normalClosure'
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:55: error: 'nil' requires a contextual type
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:218:27: error: cannot find 'URLRequest' in scope
216 |
217 | do {
218 | var req = URLRequest(url: sseURL)
| `- error: cannot find 'URLRequest' in scope
219 | req.setValue("text/event-stream", forHTTPHeaderField: "Accept")
220 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:518:52: error: cannot infer contextual base in reference to member 'running'
516 | public func sendMessage(_ message: String) -> Bool {
517 |
518 | guard let task = websocket, task.state == .running else {
| `- error: cannot infer contextual base in reference to member 'running'
519 | withSocketLock { pendingSendMessages.append(message) }
520 | return false
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:20: error: cannot infer contextual base in reference to member 'string'
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer contextual base in reference to member 'string'
523 | if let error { self?.emitter.emit("error", error) }
524 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:51: error: cannot infer type of closure parameter 'error' without a type annotation
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
523 | if let error { self?.emitter.emit("error", error) }
524 | }
[22/25] Compiling ArtAdk Subscription.swift
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:8:32: error: cannot find type 'URLSessionWebSocketTask' in scope
6 | // MARK: - WebSocket event callbacks
7 | public struct WebSocketEvents {
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:10:32: error: cannot find type 'URLSessionWebSocketTask' in scope
8 | public var onOpen: ((URLSessionWebSocketTask.CloseCode?) -> Void)?
9 | public var onError: ((Error) -> Void)?
10 | public var onClose: ((URLSessionWebSocketTask.CloseCode, String?) -> Void)?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
11 | public var onConnection: ((ConnectionDetail) -> Void)?
12 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:21:28: error: cannot find type 'URLSessionWebSocketTask' in scope
19 | private static var _instance: Socket?
20 | // MARK: - State
21 | private var websocket: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
22 | private var credentials: AuthenticationConfig = AuthenticationConfig()
23 | private var subscriptions: [String: BaseSubscription] = [:]
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:41:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | private var sseTask: Task<Void, Never>?
41 | private var urlSession: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |
43 | // MARK: - Event emitter
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:644:19: error: cannot find type 'URLSessionWebSocketDelegate' in scope
642 |
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
646 | didOpenWithProtocol protocol_: String?) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:66: error: cannot find type 'URLSessionWebSocketTask' in scope
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:645:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
643 | // MARK: - URLSessionWebSocketDelegate
644 | extension Socket: URLSessionWebSocketDelegate {
645 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
646 | didOpenWithProtocol protocol_: String?) {
647 | isConnectionActive = false // wait for art_ready event
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:652:24: error: cannot find type 'URLSessionWebSocketTask' in scope
650 | public func urlSession(
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
654 | reason: Data?
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:653:33: error: cannot find type 'URLSessionWebSocketTask' in scope
651 | _ session: URLSession,
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
654 | reason: Data?
655 | ) {
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:651:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
649 |
650 | public func urlSession(
651 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
652 | webSocketTask: URLSessionWebSocketTask,
653 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:54: error: cannot infer contextual base in reference to member 'default'
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: cannot infer contextual base in reference to member 'default'
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:67:94: error: 'nil' requires a contextual type
65 | self.decrypt = decrypt
66 | super.init()
67 | self.urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
68 |
69 | self.lpClient = LongPollClient(opts: LongPollOptions(
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:173:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
171 | group.addTask { [weak self] in
172 | guard let self else { return }
173 | let task = self.urlSession.webSocketTask(with: wsURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
174 |
175 | task.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:190:27: error: cannot infer contextual base in reference to member 'completed'
188 | private func safeClose(timeout: Double = 1.0) async {
189 | guard let task = websocket else { return }
190 | if task.state == .completed { websocket = nil; return }
| `- error: cannot infer contextual base in reference to member 'completed'
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:32: error: cannot infer contextual base in reference to member 'normalClosure'
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:192:55: error: 'nil' requires a contextual type
190 | if task.state == .completed { websocket = nil; return }
191 | await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
192 | task.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
193 | DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
194 | cont.resume()
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:218:27: error: cannot find 'URLRequest' in scope
216 |
217 | do {
218 | var req = URLRequest(url: sseURL)
| `- error: cannot find 'URLRequest' in scope
219 | req.setValue("text/event-stream", forHTTPHeaderField: "Accept")
220 |
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:518:52: error: cannot infer contextual base in reference to member 'running'
516 | public func sendMessage(_ message: String) -> Bool {
517 |
518 | guard let task = websocket, task.state == .running else {
| `- error: cannot infer contextual base in reference to member 'running'
519 | withSocketLock { pendingSendMessages.append(message) }
520 | return false
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:20: error: cannot infer contextual base in reference to member 'string'
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer contextual base in reference to member 'string'
523 | if let error { self?.emitter.emit("error", error) }
524 | }
/host/spi-builder-workspace/Sources/ArtAdk/WebSocket/Socket.swift:522:51: error: cannot infer type of closure parameter 'error' without a type annotation
520 | return false
521 | }
522 | task.send(.string(message)) { [weak self] error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
523 | if let error { self?.emitter.emit("error", error) }
524 | }
[23/25] Compiling ArtAdk Auth.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
[24/25] Compiling ArtAdk CRDT.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
[25/25] Compiling ArtAdk CRDTTypes.swift
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:206:51: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
204 |
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:96:19: error: cannot find 'URLRequest' in scope
94 | throw ARTError.authenticationFailed("Malformed auth token URL")
95 | }
96 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
97 | req.httpMethod = "POST"
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:100:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
98 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
99 |
100 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
101 | try validateHTTPResponse(response, data: data)
102 |
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:104:46: error: type of expression is ambiguous without a type annotation
102 |
103 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
104 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
105 | throw ARTError.authenticationFailed("Unexpected token response shape")
106 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:133:19: error: cannot find 'URLRequest' in scope
131 | throw ARTError.authenticationFailed("Malformed auth refresh URL")
132 | }
133 | var req = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
134 | req.httpMethod = "POST"
135 | headers.forEach { req.setValue($1, forHTTPHeaderField: $0) }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:139:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
137 | req.httpBody = try JSONSerialization.data(withJSONObject: ["refresh_token": authData.refreshToken])
138 |
139 | let (data, response) = try await URLSession.shared.data(for: req)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
140 |
141 | if let httpResp = response as? HTTPURLResponse, httpResp.statusCode == 500 {
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:152:46: error: type of expression is ambiguous without a type annotation
150 |
151 | let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
152 | guard let tokenData = (json?["data"] as? [String: Any]) else {
| `- error: type of expression is ambiguous without a type annotation
153 | throw ARTError.authenticationFailed("Unexpected refresh response shape")
154 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | // MARK: - HTTP helper
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:20: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:208:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
206 | private func validateHTTPResponse(_ response: URLResponse, data: Data) throws {
207 | guard let http = response as? HTTPURLResponse else { return }
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:32: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
211 | throw ARTError.authenticationFailed(msg)
212 | }
/host/spi-builder-workspace/Sources/ArtAdk/Auth/Auth.swift:210:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | guard http.statusCode >= 200 && http.statusCode < 300 else {
209 | let msg = (try? JSONSerialization.jsonObject(with: data) as? [String: Any])?["message"] as? String
210 | ?? HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 | throw ARTError.authenticationFailed(msg)
212 | }
BUILD FAILURE 6.1 linux