The Swift Package Index logo.Swift Package Index

Build Information

Failed to build OpenLibraryKit, reference v0.1.0 (a7956b), with Swift 6.2 for Wasm on 5 May 2026 07:56:21 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-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

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/QiyangStudio/OpenLibraryKit.git
Reference: v0.1.0
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/QiyangStudio/OpenLibraryKit
 * tag               v0.1.0     -> FETCH_HEAD
HEAD is now at a7956b1 Initial OpenLibraryKit implementation
Cloned https://github.com/QiyangStudio/OpenLibraryKit.git
Revision (git rev-parse @):
a7956b10a1920411cf6ee2d51a171e2fdee8d1ab
SUCCESS checkout https://github.com/QiyangStudio/OpenLibraryKit.git at v0.1.0
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/QiyangStudio/OpenLibraryKit.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-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/8] Emitting module OpenLibraryKit
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:5:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | public struct OpenLibraryClient: Sendable {
  4 |     public var baseURL: URL
  5 |     public var session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 |     public var decoder: JSONDecoder
  7 |     public var covers: OpenLibraryCovers
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/OpenLibraryKit/OpenLibraryClient.swift:14:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
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/OpenLibraryKit/OpenLibraryClient.swift:14:32: error: value of type '_' expected to be instance of class or class-constrained type
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                                `- error: value of type '_' expected to be instance of class or class-constrained type
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:14:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                                `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:243:20: error: cannot find type 'URLRequest' in scope
241 |
242 |     private func send<Response: Decodable>(
243 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
244 |         as type: Response.Type = Response.self,
245 |         preprocess: @Sendable (Data) -> Data = { $0 }
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:275:56: error: cannot find type 'URLRequest' in scope
273 |     }
274 |
275 |     private func applyDefaultHeaders(to request: inout URLRequest) {
    |                                                        `- error: cannot find type 'URLRequest' in scope
276 |         for (field, value) in defaultHeaders {
277 |             request.setValue(value, forHTTPHeaderField: field)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:5:16: error: stored property 'session' of 'Sendable'-conforming struct 'OpenLibraryClient' has non-Sendable type 'URLSession' (aka 'AnyObject')
  3 | public struct OpenLibraryClient: Sendable {
  4 |     public var baseURL: URL
  5 |     public var session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming struct 'OpenLibraryClient' has non-Sendable type 'URLSession' (aka 'AnyObject')
  6 |     public var decoder: JSONDecoder
  7 |     public var covers: OpenLibraryCovers
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryEndpoint.swift:22:45: error: cannot find type 'URLRequest' in scope
 20 |     case legacyBooks(bibkeys: [String], command: LegacyBookCommand?, format: String)
 21 |
 22 |     func urlRequest(baseURL: URL) throws -> URLRequest {
    |                                             `- error: cannot find type 'URLRequest' in scope
 23 |         let url = try makeURL(baseURL: baseURL)
 24 |         return URLRequest(url: url)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryRateLimiting.swift:31:22: error: cannot find 'DispatchTime' in scope
29 |     public init(requestsPerSecond: Double) {
30 |         self.requestsPerSecond = requestsPerSecond
31 |         self.now = { DispatchTime.now().uptimeNanoseconds }
   |                      `- error: cannot find 'DispatchTime' in scope
32 |         self.sleep = { nanoseconds in
33 |             try? await Task.sleep(nanoseconds: nanoseconds)
[4/8] Compiling OpenLibraryKit OpenLibraryError.swift
[5/8] Compiling OpenLibraryKit OpenLibraryEndpoint.swift
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryEndpoint.swift:22:45: error: cannot find type 'URLRequest' in scope
 20 |     case legacyBooks(bibkeys: [String], command: LegacyBookCommand?, format: String)
 21 |
 22 |     func urlRequest(baseURL: URL) throws -> URLRequest {
    |                                             `- error: cannot find type 'URLRequest' in scope
 23 |         let url = try makeURL(baseURL: baseURL)
 24 |         return URLRequest(url: url)
[6/8] Compiling OpenLibraryKit OpenLibraryRateLimiting.swift
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryRateLimiting.swift:31:22: error: cannot find 'DispatchTime' in scope
29 |     public init(requestsPerSecond: Double) {
30 |         self.requestsPerSecond = requestsPerSecond
31 |         self.now = { DispatchTime.now().uptimeNanoseconds }
   |                      `- error: cannot find 'DispatchTime' in scope
32 |         self.sleep = { nanoseconds in
33 |             try? await Task.sleep(nanoseconds: nanoseconds)
[7/8] Compiling OpenLibraryKit OpenLibraryClient.swift
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:5:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | public struct OpenLibraryClient: Sendable {
  4 |     public var baseURL: URL
  5 |     public var session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 |     public var decoder: JSONDecoder
  7 |     public var covers: OpenLibraryCovers
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/OpenLibraryKit/OpenLibraryClient.swift:14:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
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/OpenLibraryKit/OpenLibraryClient.swift:14:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                                `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:14:32: error: value of type '_' expected to be instance of class or class-constrained type
 12 |     public init(
 13 |         baseURL: URL = URL(string: "https://openlibrary.org")!,
 14 |         session: URLSession = .shared,
    |                                `- error: value of type '_' expected to be instance of class or class-constrained type
 15 |         decoder: JSONDecoder = OpenLibraryClient.makeDefaultDecoder(),
 16 |         covers: OpenLibraryCovers = OpenLibraryCovers(),
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:243:20: error: cannot find type 'URLRequest' in scope
241 |
242 |     private func send<Response: Decodable>(
243 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
244 |         as type: Response.Type = Response.self,
245 |         preprocess: @Sendable (Data) -> Data = { $0 }
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:275:56: error: cannot find type 'URLRequest' in scope
273 |     }
274 |
275 |     private func applyDefaultHeaders(to request: inout URLRequest) {
    |                                                        `- error: cannot find type 'URLRequest' in scope
276 |         for (field, value) in defaultHeaders {
277 |             request.setValue(value, forHTTPHeaderField: field)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:5:16: error: stored property 'session' of 'Sendable'-conforming struct 'OpenLibraryClient' has non-Sendable type 'URLSession' (aka 'AnyObject')
  3 | public struct OpenLibraryClient: Sendable {
  4 |     public var baseURL: URL
  5 |     public var session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming struct 'OpenLibraryClient' has non-Sendable type 'URLSession' (aka 'AnyObject')
  6 |     public var decoder: JSONDecoder
  7 |     public var covers: OpenLibraryCovers
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:208:23: error: cannot find 'URLRequest' in scope
206 |         }
207 |
208 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
209 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
210 |         return try await send(request, as: SearchInsideResponse.self, preprocess: Self.unwrapJSONPIfNeeded)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:210:88: error: extra argument 'preprocess' in call
208 |         var request = URLRequest(url: url)
209 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
210 |         return try await send(request, as: SearchInsideResponse.self, preprocess: Self.unwrapJSONPIfNeeded)
    |                                                                                        `- error: extra argument 'preprocess' in call
211 |     }
212 |
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryEndpoint.swift:22:45: error: cannot find type 'URLRequest' in scope
 20 |     case legacyBooks(bibkeys: [String], command: LegacyBookCommand?, format: String)
 21 |
 22 |     func urlRequest(baseURL: URL) throws -> URLRequest {
    |                                             `- error: cannot find type 'URLRequest' in scope
 23 |         let url = try makeURL(baseURL: baseURL)
 24 |         return URLRequest(url: url)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:239:31: error: cannot find 'URLRequest' in scope
237 |             throw .invalidRequest(underlying: OpenLibraryError.invalidURLComponents)
238 |         }
239 |         return try await send(URLRequest(url: url), as: type)
    |                               `- error: cannot find 'URLRequest' in scope
240 |     }
241 |
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:252:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 |
251 |         let data: Data
252 |         let response: URLResponse
    |                       `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 |
254 |         do {
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/OpenLibraryKit/OpenLibraryClient.swift:255:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
253 |
254 |         do {
255 |             (data, response) = try await session.data(for: request)
    |                                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
256 |         } catch {
257 |             throw .transport(error)
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:260:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
258 |         }
259 |
260 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                           `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
261 |             throw .invalidResponse
262 |         }
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:260:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 |         }
259 |
260 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
261 |             throw .invalidResponse
262 |         }
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/OpenLibraryKit/OpenLibraryClient.swift:264:51: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
262 |         }
263 |
264 |         guard (200 ..< 300).contains(httpResponse.statusCode) else {
    |                                                   `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
265 |             throw .httpStatus(code: httpResponse.statusCode, body: data)
266 |         }
/host/spi-builder-workspace/Sources/OpenLibraryKit/OpenLibraryClient.swift:265:50: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
263 |
264 |         guard (200 ..< 300).contains(httpResponse.statusCode) else {
265 |             throw .httpStatus(code: httpResponse.statusCode, body: data)
    |                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
266 |         }
267 |
[8/8] Compiling OpenLibraryKit OpenLibraryModels.swift
BUILD FAILURE 6.2 wasm