Build Information
Failed to build AudienceKit, reference main (c9c2b6), with Swift 6.2 for Wasm on 1 Dec 2026 16:54:37 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e GIT_HTTP_LOW_SPEED_LIMIT="100000" -e GIT_HTTP_LOW_SPEED_TIME="60" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1Build Log
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
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/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: value of type '_' expected to be instance of class or class-constrained type
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: value of type '_' expected to be instance of class or class-constrained type
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:431:23: error: cannot find type 'URLSessionWebSocketTask' in scope
429 | /// The apps' socket: a `URLSessionWebSocketTask`, started as soon as it's made.
430 | public final class WebSocketTaskSocket: CableSocket, @unchecked Sendable {
431 | private let task: URLSessionWebSocketTask
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:433:25: error: cannot find type 'URLSessionWebSocketTask' in scope
431 | private let task: URLSessionWebSocketTask
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
434 | self.task = task
435 | task.resume()
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:100:89: error: extra trailing closure passed in call
98 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in }) {
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
| `- error: extra trailing closure passed in call
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
102 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:226:23: error: cannot find 'URLRequest' in scope
224 | let signedWith = credential()
225 | socketToken = signedWith?.token
226 | var request = URLRequest(url: address ?? Self.url(for: configuration.apiBase(for: signedWith)))
| `- error: cannot find 'URLRequest' in scope
227 | request.setAudienceKitHeaders(environment: configuration.environment, token: signedWith?.token)
228 | let socket = openSocket(request)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:438:51: error: cannot infer contextual base in reference to member 'string'
436 | }
437 |
438 | public func send(_ text: String) { task.send(.string(text)) { _ in } }
| `- error: cannot infer contextual base in reference to member 'string'
439 |
440 | public func receive() async throws -> Data {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:46: error: cannot infer contextual base in reference to member 'goingAway'
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: cannot infer contextual base in reference to member 'goingAway'
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:65: error: 'nil' requires a contextual type
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: 'nil' requires a contextual type
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:68:40: error: cannot find type 'URLRequest' in scope
66 | private let address: URL?
67 | private let endpoint: GraphQLEndpoint
68 | private let openSocket: @Sendable (URLRequest) -> any CableSocket
| `- error: cannot find type 'URLRequest' in scope
69 | private let credential: @Sendable () -> Credential?
70 | private let unauthorized: @Sendable (String?) -> Void
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
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/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: value of type '_' expected to be instance of class or class-constrained type
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: value of type '_' expected to be instance of class or class-constrained type
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:431:23: error: cannot find type 'URLSessionWebSocketTask' in scope
429 | /// The apps' socket: a `URLSessionWebSocketTask`, started as soon as it's made.
430 | public final class WebSocketTaskSocket: CableSocket, @unchecked Sendable {
431 | private let task: URLSessionWebSocketTask
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:433:25: error: cannot find type 'URLSessionWebSocketTask' in scope
431 | private let task: URLSessionWebSocketTask
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
434 | self.task = task
435 | task.resume()
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:100:89: error: extra trailing closure passed in call
98 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in }) {
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
| `- error: extra trailing closure passed in call
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
102 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:226:23: error: cannot find 'URLRequest' in scope
224 | let signedWith = credential()
225 | socketToken = signedWith?.token
226 | var request = URLRequest(url: address ?? Self.url(for: configuration.apiBase(for: signedWith)))
| `- error: cannot find 'URLRequest' in scope
227 | request.setAudienceKitHeaders(environment: configuration.environment, token: signedWith?.token)
228 | let socket = openSocket(request)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:438:51: error: cannot infer contextual base in reference to member 'string'
436 | }
437 |
438 | public func send(_ text: String) { task.send(.string(text)) { _ in } }
| `- error: cannot infer contextual base in reference to member 'string'
439 |
440 | public func receive() async throws -> Data {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:46: error: cannot infer contextual base in reference to member 'goingAway'
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: cannot infer contextual base in reference to member 'goingAway'
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:65: error: 'nil' requires a contextual type
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: 'nil' requires a contextual type
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:68:40: error: cannot find type 'URLRequest' in scope
66 | private let address: URL?
67 | private let endpoint: GraphQLEndpoint
68 | private let openSocket: @Sendable (URLRequest) -> any CableSocket
| `- error: cannot find type 'URLRequest' in scope
69 | private let credential: @Sendable () -> Credential?
70 | private let unauthorized: @Sendable (String?) -> Void
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
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/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: value of type '_' expected to be instance of class or class-constrained type
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: value of type '_' expected to be instance of class or class-constrained type
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:431:23: error: cannot find type 'URLSessionWebSocketTask' in scope
429 | /// The apps' socket: a `URLSessionWebSocketTask`, started as soon as it's made.
430 | public final class WebSocketTaskSocket: CableSocket, @unchecked Sendable {
431 | private let task: URLSessionWebSocketTask
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:433:25: error: cannot find type 'URLSessionWebSocketTask' in scope
431 | private let task: URLSessionWebSocketTask
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
434 | self.task = task
435 | task.resume()
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:100:89: error: extra trailing closure passed in call
98 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in }) {
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
| `- error: extra trailing closure passed in call
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
102 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:226:23: error: cannot find 'URLRequest' in scope
224 | let signedWith = credential()
225 | socketToken = signedWith?.token
226 | var request = URLRequest(url: address ?? Self.url(for: configuration.apiBase(for: signedWith)))
| `- error: cannot find 'URLRequest' in scope
227 | request.setAudienceKitHeaders(environment: configuration.environment, token: signedWith?.token)
228 | let socket = openSocket(request)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:438:51: error: cannot infer contextual base in reference to member 'string'
436 | }
437 |
438 | public func send(_ text: String) { task.send(.string(text)) { _ in } }
| `- error: cannot infer contextual base in reference to member 'string'
439 |
440 | public func receive() async throws -> Data {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:46: error: cannot infer contextual base in reference to member 'goingAway'
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: cannot infer contextual base in reference to member 'goingAway'
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:65: error: 'nil' requires a contextual type
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: 'nil' requires a contextual type
449 | }
450 |
[23/67] Compiling AudienceCore AudienceCable.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:68:40: error: cannot find type 'URLRequest' in scope
66 | private let address: URL?
67 | private let endpoint: GraphQLEndpoint
68 | private let openSocket: @Sendable (URLRequest) -> any CableSocket
| `- error: cannot find type 'URLRequest' in scope
69 | private let credential: @Sendable () -> Credential?
70 | private let unauthorized: @Sendable (String?) -> Void
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
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/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:95:40: error: value of type '_' expected to be instance of class or class-constrained type
93 | /// connection as `unauthorized` (an ended session), so the owner can sign out.
94 | public init(configuration: AudienceKitConfiguration, endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
95 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12),
| `- error: value of type '_' expected to be instance of class or class-constrained type
96 | monitor: (any GraphQLMonitor)? = nil,
97 | credential: @escaping @Sendable () -> Credential?,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:431:23: error: cannot find type 'URLSessionWebSocketTask' in scope
429 | /// The apps' socket: a `URLSessionWebSocketTask`, started as soon as it's made.
430 | public final class WebSocketTaskSocket: CableSocket, @unchecked Sendable {
431 | private let task: URLSessionWebSocketTask
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:433:25: error: cannot find type 'URLSessionWebSocketTask' in scope
431 | private let task: URLSessionWebSocketTask
432 |
433 | public init(_ task: URLSessionWebSocketTask) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
434 | self.task = task
435 | task.resume()
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:100:89: error: extra trailing closure passed in call
98 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in }) {
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
| `- error: extra trailing closure passed in call
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
102 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:226:23: error: cannot find 'URLRequest' in scope
224 | let signedWith = credential()
225 | socketToken = signedWith?.token
226 | var request = URLRequest(url: address ?? Self.url(for: configuration.apiBase(for: signedWith)))
| `- error: cannot find 'URLRequest' in scope
227 | request.setAudienceKitHeaders(environment: configuration.environment, token: signedWith?.token)
228 | let socket = openSocket(request)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:438:51: error: cannot infer contextual base in reference to member 'string'
436 | }
437 |
438 | public func send(_ text: String) { task.send(.string(text)) { _ in } }
| `- error: cannot infer contextual base in reference to member 'string'
439 |
440 | public func receive() async throws -> Data {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:46: error: cannot infer contextual base in reference to member 'goingAway'
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: cannot infer contextual base in reference to member 'goingAway'
449 | }
450 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:448:65: error: 'nil' requires a contextual type
446 | }
447 |
448 | public func close() { task.cancel(with: .goingAway, reason: nil) }
| `- error: 'nil' requires a contextual type
449 | }
450 |
[24/71] Compiling AudienceCore ProposedChanges.swift
[25/71] Compiling AudienceCore PublisherChooser.swift
[26/71] Compiling AudienceCore RequestPacer.swift
[27/71] Compiling AudienceCore ReviewCode.swift
[29/71] Compiling AudienceCore AudienceCards.swift
[30/71] Compiling AudienceCore GraphQLOperationLog.swift
[31/71] Compiling AudienceCore GraphQLValue.swift
[32/71] Compiling AudienceCore Branding.swift
[33/71] Compiling AudienceCore Configuration.swift
[34/71] Compiling AudienceCore AudienceKitSDK.swift
[35/71] Compiling AudienceCore AudienceSession.swift
[40/71] Compiling ArbiterModels SponsoredContent.swift
[41/71] Compiling AudienceCore DiscordConnect.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:118:47: error: cannot find type 'URLRequest' in scope
116 |
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
119 | var request = URLRequest(url: client.tokenEndpoint)
120 | request.httpMethod = "POST"
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:119:23: error: cannot find 'URLRequest' in scope
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
119 | var request = URLRequest(url: client.tokenEndpoint)
| `- error: cannot find 'URLRequest' in scope
120 | request.httpMethod = "POST"
121 | request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:241:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |
240 | let data: Data
241 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
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/swift/Sources/AudienceCore/GoogleSignIn.swift:243:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
241 | let response: URLResponse
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
244 | } catch let error as URLError {
245 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
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/swift/Sources/AudienceCore/GoogleSignIn.swift:247:84: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GraphQLCache.swift:209:65: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
207 | try? data.write(to: url(for: entry.key), options: [.atomic, .completeFileProtectionUntilFirstUserAuthentication])
208 | #else
209 | try? data.write(to: url(for: entry.key), options: [.atomic])
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
210 | #endif
211 | }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 | struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 | public static let atomic: Data.WritingOptions }
| `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[42/71] Compiling AudienceCore Errors.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:118:47: error: cannot find type 'URLRequest' in scope
116 |
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
119 | var request = URLRequest(url: client.tokenEndpoint)
120 | request.httpMethod = "POST"
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:119:23: error: cannot find 'URLRequest' in scope
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
119 | var request = URLRequest(url: client.tokenEndpoint)
| `- error: cannot find 'URLRequest' in scope
120 | request.httpMethod = "POST"
121 | request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:241:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |
240 | let data: Data
241 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
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/swift/Sources/AudienceCore/GoogleSignIn.swift:243:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
241 | let response: URLResponse
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
244 | } catch let error as URLError {
245 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
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/swift/Sources/AudienceCore/GoogleSignIn.swift:247:84: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GraphQLCache.swift:209:65: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
207 | try? data.write(to: url(for: entry.key), options: [.atomic, .completeFileProtectionUntilFirstUserAuthentication])
208 | #else
209 | try? data.write(to: url(for: entry.key), options: [.atomic])
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
210 | #endif
211 | }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 | struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 | public static let atomic: Data.WritingOptions }
| `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[43/71] Compiling AudienceCore FlaggedMessages.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:118:47: error: cannot find type 'URLRequest' in scope
116 |
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
119 | var request = URLRequest(url: client.tokenEndpoint)
120 | request.httpMethod = "POST"
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:119:23: error: cannot find 'URLRequest' in scope
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
119 | var request = URLRequest(url: client.tokenEndpoint)
| `- error: cannot find 'URLRequest' in scope
120 | request.httpMethod = "POST"
121 | request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:241:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |
240 | let data: Data
241 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
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/swift/Sources/AudienceCore/GoogleSignIn.swift:243:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
241 | let response: URLResponse
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
244 | } catch let error as URLError {
245 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
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/swift/Sources/AudienceCore/GoogleSignIn.swift:247:84: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GraphQLCache.swift:209:65: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
207 | try? data.write(to: url(for: entry.key), options: [.atomic, .completeFileProtectionUntilFirstUserAuthentication])
208 | #else
209 | try? data.write(to: url(for: entry.key), options: [.atomic])
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
210 | #endif
211 | }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 | struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 | public static let atomic: Data.WritingOptions }
| `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[44/71] Compiling AudienceCore GoogleSignIn.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:118:47: error: cannot find type 'URLRequest' in scope
116 |
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
119 | var request = URLRequest(url: client.tokenEndpoint)
120 | request.httpMethod = "POST"
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:119:23: error: cannot find 'URLRequest' in scope
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
119 | var request = URLRequest(url: client.tokenEndpoint)
| `- error: cannot find 'URLRequest' in scope
120 | request.httpMethod = "POST"
121 | request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:241:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |
240 | let data: Data
241 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
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/swift/Sources/AudienceCore/GoogleSignIn.swift:243:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
241 | let response: URLResponse
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
244 | } catch let error as URLError {
245 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
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/swift/Sources/AudienceCore/GoogleSignIn.swift:247:84: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GraphQLCache.swift:209:65: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
207 | try? data.write(to: url(for: entry.key), options: [.atomic, .completeFileProtectionUntilFirstUserAuthentication])
208 | #else
209 | try? data.write(to: url(for: entry.key), options: [.atomic])
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
210 | #endif
211 | }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 | struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 | public static let atomic: Data.WritingOptions }
| `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[45/71] Compiling AudienceCore GraphQLCache.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:118:47: error: cannot find type 'URLRequest' in scope
116 |
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
119 | var request = URLRequest(url: client.tokenEndpoint)
120 | request.httpMethod = "POST"
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:119:23: error: cannot find 'URLRequest' in scope
117 | /// The form that trades `code` for tokens at ``GoogleOAuthClient/tokenEndpoint``.
118 | public func tokenRequest(code: String) -> URLRequest {
119 | var request = URLRequest(url: client.tokenEndpoint)
| `- error: cannot find 'URLRequest' in scope
120 | request.httpMethod = "POST"
121 | request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:241:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |
240 | let data: Data
241 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
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/swift/Sources/AudienceCore/GoogleSignIn.swift:243:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
241 | let response: URLResponse
242 | do {
243 | (data, response) = try await urlSession.audienceKitData(for: authorization.tokenRequest(code: code))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
244 | } catch let error as URLError {
245 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GoogleSignIn.swift:247:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
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/swift/Sources/AudienceCore/GoogleSignIn.swift:247:84: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 | throw AudienceKitError.network(error)
246 | }
247 | guard let http = response as? HTTPURLResponse, (200 ..< 300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 | let fault = try? JSONDecoder().decode(GoogleTokenError.self, from: data)
249 | throw AudienceKitError.signInFailed(message: fault?.errorDescription ?? fault?.error ?? Self.googleFailure)
/host/spi-builder-workspace/swift/Sources/AudienceCore/GraphQLCache.swift:209:65: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
207 | try? data.write(to: url(for: entry.key), options: [.atomic, .completeFileProtectionUntilFirstUserAuthentication])
208 | #else
209 | try? data.write(to: url(for: entry.key), options: [.atomic])
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
210 | #endif
211 | }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 | struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 | public static let atomic: Data.WritingOptions }
| `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:76:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | private nonisolated let events = SessionEventBroadcaster()
75 | private nonisolated let credentialStore: any CredentialStore
76 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
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/swift/Sources/AudienceCore/AudienceSession.swift:78:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | private let session: URLSession
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private var resolvedAudienceID: String?
80 | /// The fields each type has in an audience's schema, by audience ID, endpoint and type (``schemaFields(of:endpoint:)``).
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/swift/Sources/AudienceCore/AudienceSession.swift:99:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
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/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: value of type '_' expected to be instance of class or class-constrained type
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:233:99: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 | }
232 |
233 | private func postSignIn(path: String, body: Data, authenticated: Bool) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 | let request = APIRequest(method: "POST", path: path, body: await attested(body), authenticated: authenticated)
235 | return try await perform(request)
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/swift/Sources/AudienceCore/AudienceSession.swift:657:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
658 | -> AudienceCable
659 | {
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/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: value of type '_' expected to be instance of class or class-constrained type
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: value of type '_' expected to be instance of class or class-constrained type
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:725:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
723 | /// default the stored one).
724 | func perform(_ request: APIRequest, token: String? = nil, baseURL: URL? = nil) async throws
725 | -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
726 | {
727 | let urlRequest = try makeURLRequest(request, token: token, baseURL: baseURL ?? configuration.baseURL)
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/swift/Sources/AudienceCore/AudienceSession.swift:766:96: error: cannot find type 'URLRequest' in scope
764 | }
765 |
766 | private func makeURLRequest(_ request: APIRequest, token: String?, baseURL: URL) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
767 | guard var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else {
768 | throw AudienceKitError.missingConfiguration("the base URL is invalid")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1004:11: error: cannot find type 'URLRequest' in scope
1002 | }
1003 |
1004 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
1005 | /// Dresses a request the way every call to the API is dressed, the cable's handshake included: which SDK is
1006 | /// calling (`X-AudienceKit-Client`), the contract version it speaks (`X-AudienceKit-API-Version`), the build's
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1022:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1048:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1046 | private final class TaskBox: @unchecked Sendable {
1047 | private let lock = NSLock()
1048 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1051:22: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
1051 | func set(_ task: URLSessionDataTask) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1052 | let cancelNow = lock.withLock {
1053 | self.task = task
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:207:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
205 | func signIn(path: String, body: Data, authenticated: Bool) async throws -> SignInResult {
206 | var (data, response) = try await postSignIn(path: path, body: body, authenticated: authenticated)
207 | if response.statusCode == 403, RESTErrorBody.decode(data)?.reason == RESTErrorBody.attestationKeyUnknown,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | let attestor = deviceAttestor
209 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:214:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 | case 200 ..< 300:
216 | break
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:225:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | throw AudienceKitError.signInFailed(message: fault?.message ?? fault?.fault?.message)
224 | default:
225 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
226 | }
227 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:328:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
326 | let (data, response) = try await perform(APIRequest(method: "DELETE", path: "/v1/token"),
327 | token: credential.token)
328 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
329 | case 200 ..< 300, 401, 404:
330 | return
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:332:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
330 | return
331 | default:
332 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 | }
334 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:374:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
372 | let request = APIRequest(path: "/v1/branding", queryItems: queryItems, authenticated: false)
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
375 | throw Self.error(forStatus: response.statusCode, data: data)
376 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:375:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
375 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 | }
377 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:396:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
394 | let (data, response) = try await perform(APIRequest(method: "POST", path: "/v1/token/guest", body: body,
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
397 | throw Self.error(forStatus: response.statusCode, data: data)
398 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:397:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
397 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
398 | }
399 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:412:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
410 | authenticated: false)
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
413 | throw Self.error(forStatus: response.statusCode, data: data)
414 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:413:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
413 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
414 | }
415 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:437:99: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
435 | if let host = host ?? configuration.host { queryItems.append(URLQueryItem(name: "host", value: host)) }
436 | let request = APIRequest(path: "/v1/token/methods", queryItems: queryItems, authenticated: false)
437 | guard let (data, response) = try? await perform(request), (200 ..< 300).contains(response.statusCode),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
438 | let policy = try? Self.decode(DeviceAttestationPolicy.self, from: data).deviceAttestation
439 | else { return DeviceAttestationNotice(reason: reason, blocksSignIn: false) }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:688:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
686 | let (data, response) = try await perform(request, token: token, baseURL: baseURL)
687 |
688 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
689 | case 200 ..< 300:
690 | return data
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:695:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
693 | throw AudienceKitError.unauthorized
694 | default:
695 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
696 | }
697 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:731:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
729 |
730 | let data: Data
731 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
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/swift/Sources/AudienceCore/AudienceSession.swift:733:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
731 | let response: URLResponse
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
734 | } catch let error as URLError {
735 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
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/swift/Sources/AudienceCore/AudienceSession.swift:741:36: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:741:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:779:26: error: cannot find 'URLRequest' in scope
777 | }
778 |
779 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
780 | urlRequest.httpMethod = request.method
781 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1056:29: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1054 | return cancelled
1055 | }
1056 | if cancelNow { task.cancel() }
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1057 | }
1058 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1064:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1062 | return self.task
1063 | }
1064 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1065 | }
1066 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1024:39: error: cannot find type 'URLRequest' in scope
1022 | extension URLSession {
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
1025 | let box = TaskBox()
1026 | return try await withTaskCancellationHandler {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:76:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | private nonisolated let events = SessionEventBroadcaster()
75 | private nonisolated let credentialStore: any CredentialStore
76 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
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/swift/Sources/AudienceCore/AudienceSession.swift:78:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | private let session: URLSession
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private var resolvedAudienceID: String?
80 | /// The fields each type has in an audience's schema, by audience ID, endpoint and type (``schemaFields(of:endpoint:)``).
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/swift/Sources/AudienceCore/AudienceSession.swift:99:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
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/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: value of type '_' expected to be instance of class or class-constrained type
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:233:99: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 | }
232 |
233 | private func postSignIn(path: String, body: Data, authenticated: Bool) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 | let request = APIRequest(method: "POST", path: path, body: await attested(body), authenticated: authenticated)
235 | return try await perform(request)
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/swift/Sources/AudienceCore/AudienceSession.swift:657:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
658 | -> AudienceCable
659 | {
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/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: value of type '_' expected to be instance of class or class-constrained type
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: value of type '_' expected to be instance of class or class-constrained type
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:725:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
723 | /// default the stored one).
724 | func perform(_ request: APIRequest, token: String? = nil, baseURL: URL? = nil) async throws
725 | -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
726 | {
727 | let urlRequest = try makeURLRequest(request, token: token, baseURL: baseURL ?? configuration.baseURL)
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/swift/Sources/AudienceCore/AudienceSession.swift:766:96: error: cannot find type 'URLRequest' in scope
764 | }
765 |
766 | private func makeURLRequest(_ request: APIRequest, token: String?, baseURL: URL) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
767 | guard var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else {
768 | throw AudienceKitError.missingConfiguration("the base URL is invalid")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1004:11: error: cannot find type 'URLRequest' in scope
1002 | }
1003 |
1004 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
1005 | /// Dresses a request the way every call to the API is dressed, the cable's handshake included: which SDK is
1006 | /// calling (`X-AudienceKit-Client`), the contract version it speaks (`X-AudienceKit-API-Version`), the build's
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1022:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1048:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1046 | private final class TaskBox: @unchecked Sendable {
1047 | private let lock = NSLock()
1048 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1051:22: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
1051 | func set(_ task: URLSessionDataTask) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1052 | let cancelNow = lock.withLock {
1053 | self.task = task
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:207:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
205 | func signIn(path: String, body: Data, authenticated: Bool) async throws -> SignInResult {
206 | var (data, response) = try await postSignIn(path: path, body: body, authenticated: authenticated)
207 | if response.statusCode == 403, RESTErrorBody.decode(data)?.reason == RESTErrorBody.attestationKeyUnknown,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | let attestor = deviceAttestor
209 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:214:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 | case 200 ..< 300:
216 | break
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:225:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | throw AudienceKitError.signInFailed(message: fault?.message ?? fault?.fault?.message)
224 | default:
225 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
226 | }
227 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:328:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
326 | let (data, response) = try await perform(APIRequest(method: "DELETE", path: "/v1/token"),
327 | token: credential.token)
328 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
329 | case 200 ..< 300, 401, 404:
330 | return
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:332:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
330 | return
331 | default:
332 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 | }
334 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:374:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
372 | let request = APIRequest(path: "/v1/branding", queryItems: queryItems, authenticated: false)
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
375 | throw Self.error(forStatus: response.statusCode, data: data)
376 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:375:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
375 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 | }
377 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:396:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
394 | let (data, response) = try await perform(APIRequest(method: "POST", path: "/v1/token/guest", body: body,
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
397 | throw Self.error(forStatus: response.statusCode, data: data)
398 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:397:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
397 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
398 | }
399 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:412:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
410 | authenticated: false)
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
413 | throw Self.error(forStatus: response.statusCode, data: data)
414 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:413:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
413 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
414 | }
415 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:437:99: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
435 | if let host = host ?? configuration.host { queryItems.append(URLQueryItem(name: "host", value: host)) }
436 | let request = APIRequest(path: "/v1/token/methods", queryItems: queryItems, authenticated: false)
437 | guard let (data, response) = try? await perform(request), (200 ..< 300).contains(response.statusCode),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
438 | let policy = try? Self.decode(DeviceAttestationPolicy.self, from: data).deviceAttestation
439 | else { return DeviceAttestationNotice(reason: reason, blocksSignIn: false) }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:688:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
686 | let (data, response) = try await perform(request, token: token, baseURL: baseURL)
687 |
688 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
689 | case 200 ..< 300:
690 | return data
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:695:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
693 | throw AudienceKitError.unauthorized
694 | default:
695 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
696 | }
697 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:731:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
729 |
730 | let data: Data
731 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
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/swift/Sources/AudienceCore/AudienceSession.swift:733:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
731 | let response: URLResponse
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
734 | } catch let error as URLError {
735 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
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/swift/Sources/AudienceCore/AudienceSession.swift:741:36: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:741:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:779:26: error: cannot find 'URLRequest' in scope
777 | }
778 |
779 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
780 | urlRequest.httpMethod = request.method
781 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1056:29: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1054 | return cancelled
1055 | }
1056 | if cancelNow { task.cancel() }
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1057 | }
1058 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1064:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1062 | return self.task
1063 | }
1064 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1065 | }
1066 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1024:39: error: cannot find type 'URLRequest' in scope
1022 | extension URLSession {
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
1025 | let box = TaskBox()
1026 | return try await withTaskCancellationHandler {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:76:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | private nonisolated let events = SessionEventBroadcaster()
75 | private nonisolated let credentialStore: any CredentialStore
76 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
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/swift/Sources/AudienceCore/AudienceSession.swift:78:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | private let session: URLSession
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private var resolvedAudienceID: String?
80 | /// The fields each type has in an audience's schema, by audience ID, endpoint and type (``schemaFields(of:endpoint:)``).
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/swift/Sources/AudienceCore/AudienceSession.swift:99:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
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/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: value of type '_' expected to be instance of class or class-constrained type
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:233:99: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 | }
232 |
233 | private func postSignIn(path: String, body: Data, authenticated: Bool) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 | let request = APIRequest(method: "POST", path: path, body: await attested(body), authenticated: authenticated)
235 | return try await perform(request)
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/swift/Sources/AudienceCore/AudienceSession.swift:657:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
658 | -> AudienceCable
659 | {
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/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: value of type '_' expected to be instance of class or class-constrained type
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: value of type '_' expected to be instance of class or class-constrained type
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:725:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
723 | /// default the stored one).
724 | func perform(_ request: APIRequest, token: String? = nil, baseURL: URL? = nil) async throws
725 | -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
726 | {
727 | let urlRequest = try makeURLRequest(request, token: token, baseURL: baseURL ?? configuration.baseURL)
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/swift/Sources/AudienceCore/AudienceSession.swift:766:96: error: cannot find type 'URLRequest' in scope
764 | }
765 |
766 | private func makeURLRequest(_ request: APIRequest, token: String?, baseURL: URL) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
767 | guard var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else {
768 | throw AudienceKitError.missingConfiguration("the base URL is invalid")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1004:11: error: cannot find type 'URLRequest' in scope
1002 | }
1003 |
1004 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
1005 | /// Dresses a request the way every call to the API is dressed, the cable's handshake included: which SDK is
1006 | /// calling (`X-AudienceKit-Client`), the contract version it speaks (`X-AudienceKit-API-Version`), the build's
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1022:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1048:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1046 | private final class TaskBox: @unchecked Sendable {
1047 | private let lock = NSLock()
1048 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1051:22: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
1051 | func set(_ task: URLSessionDataTask) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1052 | let cancelNow = lock.withLock {
1053 | self.task = task
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:207:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
205 | func signIn(path: String, body: Data, authenticated: Bool) async throws -> SignInResult {
206 | var (data, response) = try await postSignIn(path: path, body: body, authenticated: authenticated)
207 | if response.statusCode == 403, RESTErrorBody.decode(data)?.reason == RESTErrorBody.attestationKeyUnknown,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | let attestor = deviceAttestor
209 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:214:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 | case 200 ..< 300:
216 | break
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:225:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | throw AudienceKitError.signInFailed(message: fault?.message ?? fault?.fault?.message)
224 | default:
225 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
226 | }
227 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:328:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
326 | let (data, response) = try await perform(APIRequest(method: "DELETE", path: "/v1/token"),
327 | token: credential.token)
328 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
329 | case 200 ..< 300, 401, 404:
330 | return
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:332:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
330 | return
331 | default:
332 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 | }
334 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:374:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
372 | let request = APIRequest(path: "/v1/branding", queryItems: queryItems, authenticated: false)
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
375 | throw Self.error(forStatus: response.statusCode, data: data)
376 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:375:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
375 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 | }
377 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:396:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
394 | let (data, response) = try await perform(APIRequest(method: "POST", path: "/v1/token/guest", body: body,
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
397 | throw Self.error(forStatus: response.statusCode, data: data)
398 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:397:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
397 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
398 | }
399 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:412:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
410 | authenticated: false)
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
413 | throw Self.error(forStatus: response.statusCode, data: data)
414 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:413:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
413 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
414 | }
415 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:437:99: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
435 | if let host = host ?? configuration.host { queryItems.append(URLQueryItem(name: "host", value: host)) }
436 | let request = APIRequest(path: "/v1/token/methods", queryItems: queryItems, authenticated: false)
437 | guard let (data, response) = try? await perform(request), (200 ..< 300).contains(response.statusCode),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
438 | let policy = try? Self.decode(DeviceAttestationPolicy.self, from: data).deviceAttestation
439 | else { return DeviceAttestationNotice(reason: reason, blocksSignIn: false) }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:688:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
686 | let (data, response) = try await perform(request, token: token, baseURL: baseURL)
687 |
688 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
689 | case 200 ..< 300:
690 | return data
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:695:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
693 | throw AudienceKitError.unauthorized
694 | default:
695 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
696 | }
697 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:731:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
729 |
730 | let data: Data
731 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
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/swift/Sources/AudienceCore/AudienceSession.swift:733:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
731 | let response: URLResponse
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
734 | } catch let error as URLError {
735 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
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/swift/Sources/AudienceCore/AudienceSession.swift:741:36: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:741:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:779:26: error: cannot find 'URLRequest' in scope
777 | }
778 |
779 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
780 | urlRequest.httpMethod = request.method
781 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1056:29: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1054 | return cancelled
1055 | }
1056 | if cancelNow { task.cancel() }
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1057 | }
1058 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1064:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1062 | return self.task
1063 | }
1064 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1065 | }
1066 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1024:39: error: cannot find type 'URLRequest' in scope
1022 | extension URLSession {
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
1025 | let box = TaskBox()
1026 | return try await withTaskCancellationHandler {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:76:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | private nonisolated let events = SessionEventBroadcaster()
75 | private nonisolated let credentialStore: any CredentialStore
76 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
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/swift/Sources/AudienceCore/AudienceSession.swift:78:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | private let session: URLSession
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private var resolvedAudienceID: String?
80 | /// The fields each type has in an audience's schema, by audience ID, endpoint and type (``schemaFields(of:endpoint:)``).
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/swift/Sources/AudienceCore/AudienceSession.swift:99:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
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/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: value of type '_' expected to be instance of class or class-constrained type
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:233:99: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 | }
232 |
233 | private func postSignIn(path: String, body: Data, authenticated: Bool) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 | let request = APIRequest(method: "POST", path: path, body: await attested(body), authenticated: authenticated)
235 | return try await perform(request)
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/swift/Sources/AudienceCore/AudienceSession.swift:657:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
658 | -> AudienceCable
659 | {
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/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: value of type '_' expected to be instance of class or class-constrained type
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: value of type '_' expected to be instance of class or class-constrained type
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:725:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
723 | /// default the stored one).
724 | func perform(_ request: APIRequest, token: String? = nil, baseURL: URL? = nil) async throws
725 | -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
726 | {
727 | let urlRequest = try makeURLRequest(request, token: token, baseURL: baseURL ?? configuration.baseURL)
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/swift/Sources/AudienceCore/AudienceSession.swift:766:96: error: cannot find type 'URLRequest' in scope
764 | }
765 |
766 | private func makeURLRequest(_ request: APIRequest, token: String?, baseURL: URL) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
767 | guard var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else {
768 | throw AudienceKitError.missingConfiguration("the base URL is invalid")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1004:11: error: cannot find type 'URLRequest' in scope
1002 | }
1003 |
1004 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
1005 | /// Dresses a request the way every call to the API is dressed, the cable's handshake included: which SDK is
1006 | /// calling (`X-AudienceKit-Client`), the contract version it speaks (`X-AudienceKit-API-Version`), the build's
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1022:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1048:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1046 | private final class TaskBox: @unchecked Sendable {
1047 | private let lock = NSLock()
1048 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1051:22: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
1051 | func set(_ task: URLSessionDataTask) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1052 | let cancelNow = lock.withLock {
1053 | self.task = task
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:207:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
205 | func signIn(path: String, body: Data, authenticated: Bool) async throws -> SignInResult {
206 | var (data, response) = try await postSignIn(path: path, body: body, authenticated: authenticated)
207 | if response.statusCode == 403, RESTErrorBody.decode(data)?.reason == RESTErrorBody.attestationKeyUnknown,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | let attestor = deviceAttestor
209 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:214:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 | case 200 ..< 300:
216 | break
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:225:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | throw AudienceKitError.signInFailed(message: fault?.message ?? fault?.fault?.message)
224 | default:
225 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
226 | }
227 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:328:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
326 | let (data, response) = try await perform(APIRequest(method: "DELETE", path: "/v1/token"),
327 | token: credential.token)
328 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
329 | case 200 ..< 300, 401, 404:
330 | return
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:332:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
330 | return
331 | default:
332 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 | }
334 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:374:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
372 | let request = APIRequest(path: "/v1/branding", queryItems: queryItems, authenticated: false)
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
375 | throw Self.error(forStatus: response.statusCode, data: data)
376 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:375:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
375 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 | }
377 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:396:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
394 | let (data, response) = try await perform(APIRequest(method: "POST", path: "/v1/token/guest", body: body,
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
397 | throw Self.error(forStatus: response.statusCode, data: data)
398 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:397:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
397 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
398 | }
399 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:412:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
410 | authenticated: false)
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
413 | throw Self.error(forStatus: response.statusCode, data: data)
414 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:413:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
413 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
414 | }
415 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:437:99: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
435 | if let host = host ?? configuration.host { queryItems.append(URLQueryItem(name: "host", value: host)) }
436 | let request = APIRequest(path: "/v1/token/methods", queryItems: queryItems, authenticated: false)
437 | guard let (data, response) = try? await perform(request), (200 ..< 300).contains(response.statusCode),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
438 | let policy = try? Self.decode(DeviceAttestationPolicy.self, from: data).deviceAttestation
439 | else { return DeviceAttestationNotice(reason: reason, blocksSignIn: false) }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:688:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
686 | let (data, response) = try await perform(request, token: token, baseURL: baseURL)
687 |
688 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
689 | case 200 ..< 300:
690 | return data
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:695:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
693 | throw AudienceKitError.unauthorized
694 | default:
695 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
696 | }
697 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:731:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
729 |
730 | let data: Data
731 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
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/swift/Sources/AudienceCore/AudienceSession.swift:733:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
731 | let response: URLResponse
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
734 | } catch let error as URLError {
735 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
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/swift/Sources/AudienceCore/AudienceSession.swift:741:36: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:741:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:779:26: error: cannot find 'URLRequest' in scope
777 | }
778 |
779 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
780 | urlRequest.httpMethod = request.method
781 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1056:29: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1054 | return cancelled
1055 | }
1056 | if cancelNow { task.cancel() }
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1057 | }
1058 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1064:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1062 | return self.task
1063 | }
1064 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1065 | }
1066 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1024:39: error: cannot find type 'URLRequest' in scope
1022 | extension URLSession {
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
1025 | let box = TaskBox()
1026 | return try await withTaskCancellationHandler {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:76:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | private nonisolated let events = SessionEventBroadcaster()
75 | private nonisolated let credentialStore: any CredentialStore
76 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
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/swift/Sources/AudienceCore/AudienceSession.swift:78:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | private let session: URLSession
77 | /// The URL session every call goes through, for requests to other hosts (Google's token endpoint).
78 | var urlSession: URLSession { session }
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private var resolvedAudienceID: String?
80 | /// The fields each type has in an audience's schema, by audience ID, endpoint and type (``schemaFields(of:endpoint:)``).
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/swift/Sources/AudienceCore/AudienceSession.swift:99:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
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/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:99:32: error: value of type '_' expected to be instance of class or class-constrained type
97 | configuration: AudienceKitConfiguration,
98 | credentialStore: any CredentialStore = InMemoryCredentialStore(),
99 | session: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
100 | monitor: (any GraphQLMonitor)? = nil,
101 | deviceAttestor: (any DeviceAttestor)? = AppAttestAttestor.platformDefault,
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:233:99: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 | }
232 |
233 | private func postSignIn(path: String, body: Data, authenticated: Bool) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 | let request = APIRequest(method: "POST", path: path, body: await attested(body), authenticated: authenticated)
235 | return try await perform(request)
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/swift/Sources/AudienceCore/AudienceSession.swift:657:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
658 | -> AudienceCable
659 | {
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/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:657:62: error: value of type '_' expected to be instance of class or class-constrained type
655 | /// session the way an HTTP 401 does (``sessionRejected(token:)``). `endpoint` is the view its operations run in.
656 | public nonisolated func makeCable(endpoint: GraphQLEndpoint = .consumer, url: URL? = nil,
657 | session: URLSession = .shared, silenceLimit: Duration = .seconds(12))
| `- error: value of type '_' expected to be instance of class or class-constrained type
658 | -> AudienceCable
659 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:725:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
723 | /// default the stored one).
724 | func perform(_ request: APIRequest, token: String? = nil, baseURL: URL? = nil) async throws
725 | -> (Data, HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
726 | {
727 | let urlRequest = try makeURLRequest(request, token: token, baseURL: baseURL ?? configuration.baseURL)
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/swift/Sources/AudienceCore/AudienceSession.swift:766:96: error: cannot find type 'URLRequest' in scope
764 | }
765 |
766 | private func makeURLRequest(_ request: APIRequest, token: String?, baseURL: URL) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
767 | guard var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else {
768 | throw AudienceKitError.missingConfiguration("the base URL is invalid")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1004:11: error: cannot find type 'URLRequest' in scope
1002 | }
1003 |
1004 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
1005 | /// Dresses a request the way every call to the API is dressed, the cable's handshake included: which SDK is
1006 | /// calling (`X-AudienceKit-Client`), the contract version it speaks (`X-AudienceKit-API-Version`), the build's
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1022:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1048:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1046 | private final class TaskBox: @unchecked Sendable {
1047 | private let lock = NSLock()
1048 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1051:22: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1049 | private var cancelled = false
1050 |
1051 | func set(_ task: URLSessionDataTask) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
1052 | let cancelNow = lock.withLock {
1053 | self.task = task
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:207:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
205 | func signIn(path: String, body: Data, authenticated: Bool) async throws -> SignInResult {
206 | var (data, response) = try await postSignIn(path: path, body: body, authenticated: authenticated)
207 | if response.statusCode == 403, RESTErrorBody.decode(data)?.reason == RESTErrorBody.attestationKeyUnknown,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 | let attestor = deviceAttestor
209 | {
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:214:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 | case 200 ..< 300:
216 | break
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:225:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | throw AudienceKitError.signInFailed(message: fault?.message ?? fault?.fault?.message)
224 | default:
225 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
226 | }
227 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:328:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
326 | let (data, response) = try await perform(APIRequest(method: "DELETE", path: "/v1/token"),
327 | token: credential.token)
328 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
329 | case 200 ..< 300, 401, 404:
330 | return
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:332:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
330 | return
331 | default:
332 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 | }
334 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:374:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
372 | let request = APIRequest(path: "/v1/branding", queryItems: queryItems, authenticated: false)
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
375 | throw Self.error(forStatus: response.statusCode, data: data)
376 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:375:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 | let (data, response) = try await perform(request)
374 | guard (200 ..< 300).contains(response.statusCode) else {
375 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 | }
377 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:396:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
394 | let (data, response) = try await perform(APIRequest(method: "POST", path: "/v1/token/guest", body: body,
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
397 | throw Self.error(forStatus: response.statusCode, data: data)
398 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:397:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
395 | authenticated: false))
396 | guard (200 ..< 300).contains(response.statusCode) else {
397 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
398 | }
399 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:412:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
410 | authenticated: false)
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
413 | throw Self.error(forStatus: response.statusCode, data: data)
414 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:413:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
411 | let (data, response) = try await perform(request)
412 | guard (200 ..< 300).contains(response.statusCode) else {
413 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
414 | }
415 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:437:99: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
435 | if let host = host ?? configuration.host { queryItems.append(URLQueryItem(name: "host", value: host)) }
436 | let request = APIRequest(path: "/v1/token/methods", queryItems: queryItems, authenticated: false)
437 | guard let (data, response) = try? await perform(request), (200 ..< 300).contains(response.statusCode),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
438 | let policy = try? Self.decode(DeviceAttestationPolicy.self, from: data).deviceAttestation
439 | else { return DeviceAttestationNotice(reason: reason, blocksSignIn: false) }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceCable.swift:110:50: error: cannot find type 'URLRequest' in scope
108 | credential: @escaping @Sendable () -> Credential?,
109 | unauthorized: @escaping @Sendable (String?) -> Void = { _ in },
110 | openSocket: @escaping @Sendable (URLRequest) -> any CableSocket) {
| `- error: cannot find type 'URLRequest' in scope
111 | self.configuration = configuration
112 | self.monitor = monitor
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:688:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
686 | let (data, response) = try await perform(request, token: token, baseURL: baseURL)
687 |
688 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
689 | case 200 ..< 300:
690 | return data
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:695:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
693 | throw AudienceKitError.unauthorized
694 | default:
695 | throw Self.error(forStatus: response.statusCode, data: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
696 | }
697 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:731:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
729 |
730 | let data: Data
731 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
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/swift/Sources/AudienceCore/AudienceSession.swift:733:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
731 | let response: URLResponse
732 | do {
733 | (data, response) = try await session.audienceKitData(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'audienceKitData'
734 | } catch let error as URLError {
735 | throw AudienceKitError.network(error)
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:738:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
736 | }
737 |
738 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
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/swift/Sources/AudienceCore/AudienceSession.swift:741:36: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:741:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
739 | throw AudienceKitError.decoding("The response wasn't HTTP.")
740 | }
741 | pacer.observe(status: http.statusCode, retryAfter: http.value(forHTTPHeaderField: "Retry-After"))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
742 | return (data, http)
743 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:779:26: error: cannot find 'URLRequest' in scope
777 | }
778 |
779 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
780 | urlRequest.httpMethod = request.method
781 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1056:29: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1054 | return cancelled
1055 | }
1056 | if cancelNow { task.cancel() }
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1057 | }
1058 |
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1064:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1062 | return self.task
1063 | }
1064 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
1065 | }
1066 | }
/host/spi-builder-workspace/swift/Sources/AudienceCore/AudienceSession.swift:1024:39: error: cannot find type 'URLRequest' in scope
1022 | extension URLSession {
1023 | /// `data(for:)` via a data task, so the same code runs on Linux's Foundation.
1024 | func audienceKitData(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
1025 | let box = TaskBox()
1026 | return try await withTaskCancellationHandler {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[51/71] Compiling ArbiterModels WebResearch.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/DeviceAttestation.swift:147:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | body: try JSONEncoder().encode(body), authenticated: false)
146 | let (data, response) = try await perform(request)
147 | guard (200 ..< 300).contains(response.statusCode) else { return nil }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | return try JSONDecoder().decode(AttestationChallenge.self, from: data)
149 | }
[52/71] Compiling AudienceCore Coordinate.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/DeviceAttestation.swift:147:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | body: try JSONEncoder().encode(body), authenticated: false)
146 | let (data, response) = try await perform(request)
147 | guard (200 ..< 300).contains(response.statusCode) else { return nil }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | return try JSONDecoder().decode(AttestationChallenge.self, from: data)
149 | }
[53/71] Compiling AudienceCore Credential.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/DeviceAttestation.swift:147:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | body: try JSONEncoder().encode(body), authenticated: false)
146 | let (data, response) = try await perform(request)
147 | guard (200 ..< 300).contains(response.statusCode) else { return nil }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | return try JSONDecoder().decode(AttestationChallenge.self, from: data)
149 | }
[54/71] Compiling AudienceCore CredentialStore.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/DeviceAttestation.swift:147:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | body: try JSONEncoder().encode(body), authenticated: false)
146 | let (data, response) = try await perform(request)
147 | guard (200 ..< 300).contains(response.statusCode) else { return nil }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | return try JSONDecoder().decode(AttestationChallenge.self, from: data)
149 | }
[55/71] Compiling AudienceCore DeviceAttestation.swift
/host/spi-builder-workspace/swift/Sources/AudienceCore/DeviceAttestation.swift:147:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | body: try JSONEncoder().encode(body), authenticated: false)
146 | let (data, response) = try await perform(request)
147 | guard (200 ..< 300).contains(response.statusCode) else { return nil }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | return try JSONDecoder().decode(AttestationChallenge.self, from: data)
149 | }
[56/71] Compiling AudienceCore ISO8601.swift
[57/71] Compiling AudienceCore ListingCuration.swift
[58/71] Compiling AudienceCore ListingResearch.swift
[59/71] Compiling AudienceCore PickupOrder.swift
[60/71] Compiling AudienceCore PlatformCredit.swift
[61/71] Compiling ArbiterControl VectorJudge.swift
[62/71] Emitting module ArbiterControl
[63/71] Compiling ArbiterControl ControlCommandLine.swift
[64/71] Compiling ArbiterControl ControlFormat.swift
[65/71] Compiling ArbiterControl ControlProtocol.swift
BUILD FAILURE 6.2 wasm