Build Information
Failed to build astrologyapi, reference main (037a4f), with Swift 6.2 for Wasm on 12 May 2026 08:16:06 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/astrologyapi/astro-api-swift.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/astrologyapi/astro-api-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 037a4f5 added .spi.yml
Cloned https://github.com/astrologyapi/astro-api-swift.git
Revision (git rev-parse @):
037a4f5d6ef2607c5079fb03f69e995be297b3eb
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/astrologyapi/astro-api-swift.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.2
Building package at path: $PWD
https://github.com/astrologyapi/astro-api-swift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:2a8b2d9e022a9894c61e0736af7cdaa1ee64c002dbb133a55c0d7e8980b3ad16
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/19] Emitting module AstrologyAPI
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |
39 | public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | ) {
48 | self.userId = userId
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: value of type '_' expected to be instance of class or class-constrained type
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:16: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
38 |
39 | public init(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:255:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | }
254 |
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:263:56: error: cannot find type 'URLRequest' in scope
261 | }
262 |
263 | private func applyAuthentication(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
264 | if config.apiKey.contains("ak-") {
265 | request.setValue(config.apiKey, forHTTPHeaderField: "x-astrologyapi-key")
[4/21] Compiling AstrologyAPI PDFBranding.swift
[5/21] Compiling AstrologyAPI ChineseNamespace.swift
[6/21] Compiling AstrologyAPI WesternNamespace.swift
[7/21] Compiling AstrologyAPI WesternTransitNamespace.swift
[8/21] Compiling AstrologyAPI NumerologyNamespace.swift
[9/21] Compiling AstrologyAPI PDFNamespace.swift
[10/21] Compiling AstrologyAPI LalKitabNamespace.swift
[11/21] Compiling AstrologyAPI LocationNamespace.swift
[12/21] Compiling AstrologyAPI TarotNamespace.swift
[13/21] Compiling AstrologyAPI VedicNamespace.swift
[14/21] Compiling AstrologyAPI HoroscopesNamespace.swift
[15/21] Compiling AstrologyAPI KPNamespace.swift
[16/21] Compiling AstrologyAPI BirthData.swift
[17/21] Compiling AstrologyAPI Enums.swift
[18/21] Compiling AstrologyAPI NumeroData.swift
[19/21] Compiling AstrologyAPI AstrologyAPI.swift
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: value of type '_' expected to be instance of class or class-constrained type
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/Errors/AstrologyAPIError.swift:79:69: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
77 | ) -> AstrologyAPIError {
78 | // Try to extract a human-readable message from the response body.
79 | let message = extractMessage(from: data) ?? HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
80 |
81 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |
39 | public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | ) {
48 | self.userId = userId
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:16: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
38 |
39 | public init(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:255:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | }
254 |
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:263:56: error: cannot find type 'URLRequest' in scope
261 | }
262 |
263 | private func applyAuthentication(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
264 | if config.apiKey.contains("ak-") {
265 | request.setValue(config.apiKey, forHTTPHeaderField: "x-astrologyapi-key")
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:159:23: error: cannot find 'URLRequest' in scope
157 | }
158 |
159 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
160 | request.httpMethod = "POST"
161 | request.setValue(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:186:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // Execute
186 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:188:60: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
186 | let (data, response): (Data, URLResponse)
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
189 | } catch {
190 | // Network-level failures — retry if attempts remain
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | }
206 |
207 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | }
206 |
207 | 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.
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:214:31: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | let statusCode = http.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 |
216 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:257:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
258 | let seconds = TimeInterval(raw)
259 | else { return nil }
[20/21] Compiling AstrologyAPI AstrologyAPIError.swift
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: value of type '_' expected to be instance of class or class-constrained type
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/Errors/AstrologyAPIError.swift:79:69: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
77 | ) -> AstrologyAPIError {
78 | // Try to extract a human-readable message from the response body.
79 | let message = extractMessage(from: data) ?? HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
80 |
81 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |
39 | public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | ) {
48 | self.userId = userId
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:16: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
38 |
39 | public init(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:255:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | }
254 |
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:263:56: error: cannot find type 'URLRequest' in scope
261 | }
262 |
263 | private func applyAuthentication(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
264 | if config.apiKey.contains("ak-") {
265 | request.setValue(config.apiKey, forHTTPHeaderField: "x-astrologyapi-key")
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:159:23: error: cannot find 'URLRequest' in scope
157 | }
158 |
159 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
160 | request.httpMethod = "POST"
161 | request.setValue(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:186:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // Execute
186 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:188:60: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
186 | let (data, response): (Data, URLResponse)
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
189 | } catch {
190 | // Network-level failures — retry if attempts remain
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | }
206 |
207 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | }
206 |
207 | 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.
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:214:31: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | let statusCode = http.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 |
216 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:257:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
258 | let seconds = TimeInterval(raw)
259 | else { return nil }
[21/21] Compiling AstrologyAPI HTTPClient.swift
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:35: error: value of type '_' expected to be instance of class or class-constrained type
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
47 | ) {
48 | self.userId = userId
/host/spi-builder-workspace/Sources/AstrologyAPI/Errors/AstrologyAPIError.swift:79:69: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
77 | ) -> AstrologyAPIError {
78 | // Try to extract a human-readable message from the response body.
79 | let message = extractMessage(from: data) ?? HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
80 |
81 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |
39 | public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:46:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | pdfBranding: PDFBranding? = nil,
45 | maxRetries: Int = 3,
46 | urlSession: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | ) {
48 | self.userId = userId
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:37:16: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
35 |
36 | /// Custom URLSession. Defaults to `URLSession.shared`.
37 | public let urlSession: URLSession
| `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AstrologyAPIConfiguration' has non-Sendable type 'URLSession' (aka 'AnyObject')
38 |
39 | public init(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:255:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | }
254 |
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:263:56: error: cannot find type 'URLRequest' in scope
261 | }
262 |
263 | private func applyAuthentication(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
264 | if config.apiKey.contains("ak-") {
265 | request.setValue(config.apiKey, forHTTPHeaderField: "x-astrologyapi-key")
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:159:23: error: cannot find 'URLRequest' in scope
157 | }
158 |
159 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
160 | request.httpMethod = "POST"
161 | request.setValue(
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:186:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // Execute
186 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:188:60: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
186 | let (data, response): (Data, URLResponse)
187 | do {
188 | (data, response) = try await config.urlSession.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
189 | } catch {
190 | // Network-level failures — retry if attempts remain
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
205 | }
206 |
207 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:207:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | }
206 |
207 | 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.
208 | throw AstrologyAPIError.networkError(
209 | message: "Non-HTTP response received",
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:214:31: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
212 | }
213 |
214 | let statusCode = http.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
215 |
216 | switch statusCode {
/host/spi-builder-workspace/Sources/AstrologyAPI/HTTP/HTTPClient.swift:257:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
255 | private func retryAfterValue(from response: HTTPURLResponse) -> TimeInterval? {
256 | guard
257 | let raw = response.value(forHTTPHeaderField: "Retry-After"),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
258 | let seconds = TimeInterval(raw)
259 | else { return nil }
BUILD FAILURE 6.2 wasm