The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build BilibiliKit, reference 3.1.2 (0b4a24), with Swift 6.2 (beta) for Linux on 18 Jun 2025 13:54:08 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ApolloZhu/BilibiliKit.git
Reference: 3.1.2
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/ApolloZhu/BilibiliKit
 * tag               3.1.2      -> FETCH_HEAD
HEAD is now at 0b4a247 Use a less popular video for testing
Cloned https://github.com/ApolloZhu/BilibiliKit.git
Revision (git rev-parse @):
0b4a247ebd1414854703fba50064fc95292d4747
SUCCESS checkout https://github.com/ApolloZhu/BilibiliKit.git at 3.1.2
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.2
Building package at path:  $PWD
https://github.com/ApolloZhu/BilibiliKit.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:f81a7bd7aa87a0f81848d48c5bcc03f5f78deebd37fa5f9be9913077205d3687
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.2-latest
Building for debugging...
[0/11] Write sources
[4/11] Write swift-version-24593BA9C3E375BF.txt
[6/19] Compiling BKFoundation BKSession.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:63:45: error: cannot find type 'URLRequest' in scope
61 |     /// - Parameter url: the url to post to.
62 |     /// - Returns: post request to url with optinal cookie.
63 |     public func postRequest(to url: URL) -> URLRequest {
   |                                             `- error: cannot find type 'URLRequest' in scope
64 |         var mutableRequest = request(to: url)
65 |         mutableRequest.httpMethod = "POST"
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:74:41: error: cannot find type 'URLRequest' in scope
72 |     /// - Parameter url: the url to request.
73 |     /// - Returns: request to url with optional cookie.
74 |     public func request(to url: URL) -> URLRequest {
   |                                         `- error: cannot find type 'URLRequest' in scope
75 |         var request = URLRequest(url: url)
76 |         request.addValue("io.github.apollozhu.bilibilikit",
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:75:23: error: cannot find 'URLRequest' in scope
73 |     /// - Returns: request to url with optional cookie.
74 |     public func request(to url: URL) -> URLRequest {
75 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
76 |         request.addValue("io.github.apollozhu.bilibilikit",
77 |                          forHTTPHeaderField: "User-Agent")
[7/19] Compiling BKFoundation URLSession+Extensions.swift
/host/spi-builder-workspace/Sources/BKFoundation/URLSession+Extensions.swift:78:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
 76 | }
 77 |
 78 | extension URLSession {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
 79 |     /// Shared url session, alias of URLSession.shared
 80 |     public static var _bk: URLSession { return .shared }
/host/spi-builder-workspace/Sources/BKFoundation/URLSession+Extensions.swift:109:20: error: cannot find type 'URLRequest' in scope
107 |     ///   - handler: code to process an optional `Wrapped` instance.
108 |     public class func get<Wrapper: BKDataWrapper>(
109 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
110 |         unwrap wrapperType: Wrapper.Type,
111 |         then handler: @escaping BKHandler<Wrapper.Wrapped>)
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/19] Emitting module BKFoundation
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:147:32: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |     /// such an optimization, but pull requests are welcome should your method
146 |     /// works better and more efficient.
147 |     public init?(httpCookies: [HTTPCookie]) {
    |                                `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |         var usefulCookies = [String: String]()
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' 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 HTTPCookie = AnyObject
  |                  `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:22:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     /// bilibili or network is giving us some hard times.
21 |     public enum ResponseErrorReason {
22 |         case urlSessionError(Error?, response: URLResponse?)
   |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |         case accessDenied
24 |         case reason(String, code: Int? = nil)
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/BKFoundation/BKSession.swift:63:45: error: cannot find type 'URLRequest' in scope
61 |     /// - Parameter url: the url to post to.
62 |     /// - Returns: post request to url with optinal cookie.
63 |     public func postRequest(to url: URL) -> URLRequest {
   |                                             `- error: cannot find type 'URLRequest' in scope
64 |         var mutableRequest = request(to: url)
65 |         mutableRequest.httpMethod = "POST"
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:74:41: error: cannot find type 'URLRequest' in scope
72 |     /// - Parameter url: the url to request.
73 |     /// - Returns: request to url with optional cookie.
74 |     public func request(to url: URL) -> URLRequest {
   |                                         `- error: cannot find type 'URLRequest' in scope
75 |         var request = URLRequest(url: url)
76 |         request.addValue("io.github.apollozhu.bilibilikit",
/host/spi-builder-workspace/Sources/BKFoundation/URL+Extensions.swift:11:1: warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringInterpolation', 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'FoundationEssentials' introduce this conformance in the future
 9 | import Foundation
10 |
11 | extension URL: ExpressibleByStringInterpolation {
   | |- warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringInterpolation', 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'FoundationEssentials' introduce this conformance in the future
   | `- note: add '@retroactive' to silence this warning
12 |     /// Initialize url with string literals.
13 |     ///
/host/spi-builder-workspace/Sources/BKFoundation/URLSession+Extensions.swift:78:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
 76 | }
 77 |
 78 | extension URLSession {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
 79 |     /// Shared url session, alias of URLSession.shared
 80 |     public static var _bk: URLSession { return .shared }
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[9/19] Compiling BKFoundation BKApp.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKApp.swift:31:31: error: type 'URLSession' (aka 'AnyObject') has no member '_bk'
29 |     public static func fetchKey(_ handler: @escaping BKHandler<String>) {
30 |         func raise(_ error: BKError) { handler(.failure(error)) }
31 |         let task = URLSession._bk.dataTask(with: playerURL) { data, res, err in
   |                               `- error: type 'URLSession' (aka 'AnyObject') has no member '_bk'
32 |             guard let data = data else {
33 |                 return raise(.responseError(
/host/spi-builder-workspace/Sources/BKFoundation/BKApp.swift:34:61: error: argument type '_' expected to be an instance of a class or class-constrained type
32 |             guard let data = data else {
33 |                 return raise(.responseError(
34 |                     reason: .urlSessionError(err, response: res)))
   |                                                             `- error: argument type '_' expected to be an instance of a class or class-constrained type
35 |             }
36 |             guard let raw = String(data: data, encoding: .utf8) else {
[10/19] Compiling BKFoundation BKCookie.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:147:32: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |     /// such an optimization, but pull requests are welcome should your method
146 |     /// works better and more efficient.
147 |     public init?(httpCookies: [HTTPCookie]) {
    |                                `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |         var usefulCookies = [String: String]()
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' 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 HTTPCookie = AnyObject
  |                  `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:149:48: error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'domain'
147 |     public init?(httpCookies: [HTTPCookie]) {
148 |         var usefulCookies = [String: String]()
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
    |                                                `- error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'domain'
150 |             && CodingKeys.allCases.contains(where: { $0.rawValue == cookie.name }) {
151 |                 usefulCookies[cookie.name] = cookie.value
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:150:76: error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'name'
148 |         var usefulCookies = [String: String]()
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
150 |             && CodingKeys.allCases.contains(where: { $0.rawValue == cookie.name }) {
    |                                                                            `- error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'name'
151 |                 usefulCookies[cookie.name] = cookie.value
152 |         }
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:151:38: error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'name'
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
150 |             && CodingKeys.allCases.contains(where: { $0.rawValue == cookie.name }) {
151 |                 usefulCookies[cookie.name] = cookie.value
    |                                      `- error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'name'
152 |         }
153 |         self.init(dictionary: usefulCookies)
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:151:53: error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'value'
149 |         for cookie in httpCookies where cookie.domain.hasSuffix("bilibili.com")
150 |             && CodingKeys.allCases.contains(where: { $0.rawValue == cookie.name }) {
151 |                 usefulCookies[cookie.name] = cookie.value
    |                                                     `- error: value of type 'HTTPCookie' (aka 'AnyObject') has no member 'value'
152 |         }
153 |         self.init(dictionary: usefulCookies)
[11/19] Compiling BKFoundation Either.swift
[12/19] Compiling BKFoundation URL+Extensions.swift
/host/spi-builder-workspace/Sources/BKFoundation/URL+Extensions.swift:11:1: warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringInterpolation', 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'FoundationEssentials' introduce this conformance in the future
 9 | import Foundation
10 |
11 | extension URL: ExpressibleByStringInterpolation {
   | |- warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringInterpolation', 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'FoundationEssentials' introduce this conformance in the future
   | `- note: add '@retroactive' to silence this warning
12 |     /// Initialize url with string literals.
13 |     ///
[13/19] Compiling BKFoundation BKError.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:22:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     /// bilibili or network is giving us some hard times.
21 |     public enum ResponseErrorReason {
22 |         case urlSessionError(Error?, response: URLResponse?)
   |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |         case accessDenied
24 |         case reason(String, code: Int? = nil)
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
BUILD FAILURE 6.2 linux