Build Information
Failed to build AudienceKit, reference main (c9c2b6), with Swift 6.1 for Wasm on 1 Dec 2026 16:54:52 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344844-1":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
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:101:41: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
102 | }
103 | }
/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 |
[36/71] Compiling AudienceCore GraphQLEndpoint.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[37/71] Compiling AudienceCore GraphQLMonitor.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[38/71] Compiling AudienceCore GraphQLOperationLog.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[39/71] Compiling AudienceCore GraphQLValue.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[40/71] Compiling AudienceCore GuestAndCodes.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[41/71] Compiling ArbiterModels WebResearch.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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)
[42/71] Compiling AudienceCore Errors.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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)
[43/71] Compiling AudienceCore FlaggedMessages.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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)
[44/71] Compiling AudienceCore GoogleSignIn.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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)
[45/71] Compiling AudienceCore GraphQLCache.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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)
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[56/71] Compiling ArbiterControl ControlProtocol.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344844-1":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:682e410fc91ab5999f19d11857cdf53a769955f0afba08ac71c90ca6404bb679
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/57] Compiling ArbiterModels Network.swift
[3/57] Compiling ArbiterModels Research.swift
[4/59] Compiling ArbiterControl VectorJudge.swift
[5/59] Emitting module ArbiterControl
[6/59] Compiling ArbiterModels GlamFastLane.swift
[7/59] Compiling ArbiterModels JSONValue.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/59] Emitting module AudienceCore
/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: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:101:41: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
99 | self.init(configuration: configuration, endpoint: endpoint, url: url, silenceLimit: silenceLimit,
100 | monitor: monitor, credential: credential, unauthorized: unauthorized) {
101 | WebSocketTaskSocket(session.webSocketTask(with: $0))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
102 | }
103 | }
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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/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"
[9/63] Compiling ArbiterModels EmbeddingCatalogData.swift
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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 {
[10/63] Compiling ArbiterModels ArbiterPrompts.swift
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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 {
[11/63] Compiling ArbiterModels Checks.swift
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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 {
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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 {
/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: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: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
1020 | }
1021 |
1022 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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 {
[14/63] Compiling ArbiterModels AIWorkers.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 | }
[15/63] Compiling ArbiterModels Applets.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 | }
[16/63] Compiling ArbiterModels Embeddings.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 | }
[17/63] Compiling ArbiterModels EngineSettings.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 | }
[18/63] Compiling ArbiterModels Decisions.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 | }
[19/63] Compiling ArbiterModels SponsoredContent.swift
[20/63] Compiling ArbiterModels WebResearch.swift
[27/63] Emitting module ArbiterModels
[30/63] Compiling ArbiterModels Glam.swift
[31/63] Compiling ArbiterModels GlamCopyText.swift
[33/64] Compiling ArbiterControl ControlProtocol.swift
[34/64] Compiling ArbiterControl ControlCommandLine.swift
[35/64] Compiling ArbiterControl ControlFormat.swift
[36/64] Compiling ArbiterControl ControlSocket.swift
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:44:59: error: value of type 'sockaddr_un' has no member 'sun_path'
42 | address.sun_family = sa_family_t(AF_UNIX)
43 | let bytes = Array(path.utf8)
44 | let capacity = MemoryLayout.size(ofValue: address.sun_path)
| `- error: value of type 'sockaddr_un' has no member 'sun_path'
45 | guard !bytes.isEmpty, bytes.count < capacity else { throw ControlSocketError.pathTooLong(path) }
46 | withUnsafeMutableBytes(of: &address.sun_path) { raw in
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:46:45: error: value of type 'sockaddr_un' has no member 'sun_path'
44 | let capacity = MemoryLayout.size(ofValue: address.sun_path)
45 | guard !bytes.isEmpty, bytes.count < capacity else { throw ControlSocketError.pathTooLong(path) }
46 | withUnsafeMutableBytes(of: &address.sun_path) { raw in
| `- error: value of type 'sockaddr_un' has no member 'sun_path'
47 | raw.copyBytes(from: bytes)
48 | raw[bytes.count] = 0
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:60:18: error: cannot find 'socket' in scope
58 | let fd = socket(AF_UNIX, SOCK_STREAM, 0)
59 | #else
60 | let fd = socket(AF_UNIX, Int32(SOCK_STREAM.rawValue), 0)
| `- error: cannot find 'socket' in scope
61 | #endif
62 | guard fd >= 0 else { throw ControlSocketError.system("socket", errno) }
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:60:40: error: cannot find 'SOCK_STREAM' in scope
58 | let fd = socket(AF_UNIX, SOCK_STREAM, 0)
59 | #else
60 | let fd = socket(AF_UNIX, Int32(SOCK_STREAM.rawValue), 0)
| `- error: cannot find 'SOCK_STREAM' in scope
61 | #endif
62 | guard fd >= 0 else { throw ControlSocketError.system("socket", errno) }
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:79:36: error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
77 |
78 | static func setTimeout(_ fd: Int32, seconds: Int) {
79 | var time = timeval(tv_sec: seconds, tv_usec: 0)
| `- error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
80 | setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
81 | setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:80:9: error: cannot find 'setsockopt' in scope
78 | static func setTimeout(_ fd: Int32, seconds: Int) {
79 | var time = timeval(tv_sec: seconds, tv_usec: 0)
80 | setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
| `- error: cannot find 'setsockopt' in scope
81 | setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
82 | }
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:80:36: error: cannot find 'SO_RCVTIMEO' in scope
78 | static func setTimeout(_ fd: Int32, seconds: Int) {
79 | var time = timeval(tv_sec: seconds, tv_usec: 0)
80 | setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
| `- error: cannot find 'SO_RCVTIMEO' in scope
81 | setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
82 | }
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:81:9: error: cannot find 'setsockopt' in scope
79 | var time = timeval(tv_sec: seconds, tv_usec: 0)
80 | setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
81 | setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
| `- error: cannot find 'setsockopt' in scope
82 | }
83 |
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:81:36: error: cannot find 'SO_SNDTIMEO' in scope
79 | var time = timeval(tv_sec: seconds, tv_usec: 0)
80 | setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
81 | setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &time, socklen_t(MemoryLayout<timeval>.size))
| `- error: cannot find 'SO_SNDTIMEO' in scope
82 | }
83 |
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:92:59: error: cannot find 'MSG_NOSIGNAL' in scope
90 | let wrote = write(fd, pointer, left)
91 | #else
92 | let wrote = send(fd, pointer, left, Int32(MSG_NOSIGNAL))
| `- error: cannot find 'MSG_NOSIGNAL' in scope
93 | #endif
94 | if wrote < 0 {
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:173:20: error: cannot find 'umask' in scope
171 | let fd = try ControlSocket.makeSocket()
172 | // Made with 0600 from the start: no moment where another user could connect.
173 | let mask = umask(0o177)
| `- error: cannot find 'umask' in scope
174 | let bound = ControlSocket.withAddress(address) { bind(fd, $0, $1) }
175 | umask(mask)
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:174:58: error: cannot find 'bind' in scope
172 | // Made with 0600 from the start: no moment where another user could connect.
173 | let mask = umask(0o177)
174 | let bound = ControlSocket.withAddress(address) { bind(fd, $0, $1) }
| `- error: cannot find 'bind' in scope
175 | umask(mask)
176 | guard bound == 0 else {
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:175:9: error: cannot find 'umask' in scope
173 | let mask = umask(0o177)
174 | let bound = ControlSocket.withAddress(address) { bind(fd, $0, $1) }
175 | umask(mask)
| `- error: cannot find 'umask' in scope
176 | guard bound == 0 else {
177 | let code = errno
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:182:15: error: cannot find 'listen' in scope
180 | }
181 | chmod(path, 0o600)
182 | guard listen(fd, 16) == 0 else {
| `- error: cannot find 'listen' in scope
183 | let code = errno
184 | close(fd)
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:192:22: error: cannot find 'Thread' in scope
190 | stopped = false
191 | lock.unlock()
192 | let thread = Thread { [weak self] in self?.acceptLoop(fd) }
| `- error: cannot find 'Thread' in scope
193 | thread.name = "arbiterctl.accept"
194 | thread.start()
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:229:52: error: cannot find 'getuid' in scope
227 | private func serve(_ connection: Int32) {
228 | ControlSocket.setTimeout(connection, seconds: 10)
229 | guard ControlSocket.peerUID(connection) == getuid() else {
| `- error: cannot find 'getuid' in scope
230 | // Another user's process: no answer at all.
231 | close(connection)
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:235:9: error: cannot find 'DispatchQueue' in scope
233 | }
234 | let handler = self.handler
235 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
236 | let response: ControlResponse
237 | do {
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:241:28: error: cannot find 'DispatchSemaphore' in scope
239 | let request = try JSONDecoder().decode(ControlRequest.self, from: line)
240 | let box = ResponseBox()
241 | let done = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
242 | Task {
243 | box.value = await handler(request)
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:235:36: error: cannot infer contextual base in reference to member 'userInitiated'
233 | }
234 | let handler = self.handler
235 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
236 | let response: ControlResponse
237 | do {
/host/spi-builder-workspace/swift/Sources/ArbiterControl/ControlSocket.swift:299:59: error: cannot find 'Glibc' in scope
297 | let result = ControlSocket.withAddress(address) { Darwin.connect(fd, $0, $1) }
298 | #else
299 | let result = ControlSocket.withAddress(address) { Glibc.connect(fd, $0, $1) }
| `- error: cannot find 'Glibc' in scope
300 | #endif
301 | if result != 0 {
BUILD FAILURE 6.1 wasm