The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Srt2BilibiliKit with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4609320-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ApolloZhu/srt2bilibilikit.git
Reference: master
Cloned https://github.com/ApolloZhu/srt2bilibilikit.git into spi-builder-workspace
SUCCESS checkout https://github.com/ApolloZhu/srt2bilibilikit.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4609320-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Fetching https://github.com/ApolloZhu/BilibiliKit
[1/1181] Fetching bilibilikit
Fetched https://github.com/ApolloZhu/BilibiliKit (0.27s)
Fetching https://github.com/ApolloZhu/swift_qrcodejs
[1/1022] Fetching swift_qrcodejs
Fetched https://github.com/ApolloZhu/swift_qrcodejs (0.25s)
Creating working copy for https://github.com/ApolloZhu/BilibiliKit
Working copy of https://github.com/ApolloZhu/BilibiliKit resolved at master
Creating working copy for https://github.com/ApolloZhu/swift_qrcodejs
Working copy of https://github.com/ApolloZhu/swift_qrcodejs resolved at master
Building for debugging...
[1/29] Emitting module swift_qrcodejs
[2/30] Compiling BilibiliKit BKApp.swift
[3/30] Compiling BilibiliKit BKCookie.swift
[4/30] Compiling swift_qrcodejs QRPatternLocator.swift
[5/30] Compiling swift_qrcodejs QRPolynomial.swift
[6/30] Compiling swift_qrcodejs QRErrorCorrectLevel.swift
[7/30] Compiling swift_qrcodejs QRMaskPattern.swift
[8/30] Compiling swift_qrcodejs QRCode.swift
[9/30] Compiling swift_qrcodejs QRCodeModel.swift
[10/30] Compiling swift_qrcodejs QRCodeRenderer.swift
[11/30] Compiling swift_qrcodejs QRCodeType.swift
[12/30] Compiling swift_qrcodejs QRMath.swift
[13/30] Compiling swift_qrcodejs QRMode.swift
[14/30] Compiling swift_qrcodejs QRRSBlock.swift
[15/30] Compiling BilibiliKit BKVideo.swift
[16/30] Compiling BilibiliKit URL+Extensions.swift
[17/30] Compiling BilibiliKit BKVideo+Page.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKVideo+Page.swift:55:31: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
        let task = URLSession.bk.dataTask(with: pagesInfoURL!)
                   ~~~~~~~~~~ ^~
[18/31] Compiling BilibiliKit BKVideo+Info.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKVideo+Info.swift:91:35: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
            let task = URLSession.bk.dataTask(with: URL(string: base + key)!)
                       ~~~~~~~~~~ ^~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKVideo+Info.swift:91:35: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
            let task = URLSession.bk.dataTask(with: URL(string: base + key)!)
                       ~~~~~~~~~~ ^~
[19/31] Compiling BilibiliKit BKSession.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:62:45: error: cannot find type 'URLRequest' in scope
    public func postRequest(to url: URL) -> URLRequest {
                                            ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:73:41: error: cannot find type 'URLRequest' in scope
    public func request(to url: URL) -> URLRequest {
                                        ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:74:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
[20/31] Compiling BilibiliKit URLSession+Extensions.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/URLSession+Extensions.swift:11:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession {
^         ~~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/URLSession+Extensions.swift:17:21: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    static let bk = URLSession(configuration: .default)
                    ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/URLSession+Extensions.swift:17:48: error: cannot infer contextual base in reference to member 'default'
    static let bk = URLSession(configuration: .default)
                                              ~^~~~~~~
[21/31] Compiling swift_qrcodejs QR8bitByte.swift
[22/31] Compiling swift_qrcodejs QRBitBuffer.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[25/33] Emitting module BilibiliKit
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:112:45: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        case errored(data: Data?, response: URLResponse?, error: Swift.Error?)
                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:62:45: error: cannot find type 'URLRequest' in scope
    public func postRequest(to url: URL) -> URLRequest {
                                            ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:73:41: error: cannot find type 'URLRequest' in scope
    public func request(to url: URL) -> URLRequest {
                                        ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/URLSession+Extensions.swift:11:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession {
^         ~~~~~~~~~~
[26/33] Compiling BilibiliKit BKLoginHelper.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:112:45: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        case errored(data: Data?, response: URLResponse?, error: Swift.Error?)
                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:127:57: error: value of type 'URLResponse' (aka 'AnyObject') has no member 'description'
                description += "\nResponse: \(response?.description ?? "No Response")"
                                              ~~~~~~~~~ ^~~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:152:31: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
        let task = URLSession.bk.dataTask(with: url) { data, response, error in
                   ~~~~~~~~~~ ^~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:155:54: error: cannot convert value of type '_' to expected argument type 'Data?'
                else { return handler(.errored(data: data,
                                                     ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:156:58: error: argument type '_' expected to be an instance of a class or class-constrained type
                                               response: response,
                                                         ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:62:45: error: cannot find type 'URLRequest' in scope
    public func postRequest(to url: URL) -> URLRequest {
                                            ^~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:209:31: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
        let task = URLSession.bk.dataTask(with: request)
                   ~~~~~~~~~~ ^~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:210:23: error: unable to infer type of a closure parameter 'data' in the current context
        { [weak self] data, response, error in
                      ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:210:29: error: unable to infer type of a closure parameter 'response' in the current context
        { [weak self] data, response, error in
                            ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:210:39: error: unable to infer type of a closure parameter 'error' in the current context
        { [weak self] data, response, error in
                                      ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:213:45: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
                let headerFields = response.allHeaderFields as? [String: String],
                                   ~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKApp.swift:18:31: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
        let task = URLSession.bk.dataTask(with: playerURL)
                   ~~~~~~~~~~ ^~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKApp.swift:18:31: error: type 'URLSession' (aka 'AnyObject') has no member 'bk'
        let task = URLSession.bk.dataTask(with: playerURL)
                   ~~~~~~~~~~ ^~
error: fatalError
[28/33] Wrapping AST for swift_qrcodejs for debugging
BUILD FAILURE 5.9 linux

Build Machine: Linux 2