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-0":/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: 1.0.5
Cloned https://github.com/ApolloZhu/srt2bilibilikit.git into spi-builder-workspace
SUCCESS checkout https://github.com/ApolloZhu/srt2bilibilikit.git at 1.0.5
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4609320-0":/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.23s)
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/24] Emitting module swift_qrcodejs
[2/25] Compiling swift_qrcodejs QRCode.swift
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: error: value of optional type '[Int]?' must be unwrapped to refer to member 'indices' of wrapped base type '[Int]'
            for i in dcdata[r].indices {
                             ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: note: chain the optional using '?' to access member 'indices' only for non-'nil' base values
            for i in dcdata[r].indices {
                             ^
                              ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
            for i in dcdata[r].indices {
                             ^
                              !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: error: value of optional type '[Int]?' must be unwrapped to refer to member 'indices' of wrapped base type '[Int]'
            for i in ecdata[r].indices {
                             ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: note: chain the optional using '?' to access member 'indices' only for non-'nil' base values
            for i in ecdata[r].indices {
                             ^
                              ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
            for i in ecdata[r].indices {
                             ^
                              !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                if i < dcdata[r].count {
                               ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                if i < dcdata[r].count {
                               ^
                                ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                if i < dcdata[r].count {
                               ^
                                !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                if i < ecdata[r].count {
                               ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                if i < ecdata[r].count {
                               ^
                                ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                if i < ecdata[r].count {
                               ^
                                !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
                                                            ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
                                                            !
[3/25] Compiling swift_qrcodejs QRCodeModel.swift
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: error: value of optional type '[Int]?' must be unwrapped to refer to member 'indices' of wrapped base type '[Int]'
            for i in dcdata[r].indices {
                             ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: note: chain the optional using '?' to access member 'indices' only for non-'nil' base values
            for i in dcdata[r].indices {
                             ^
                              ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:246:30: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
            for i in dcdata[r].indices {
                             ^
                              !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: error: value of optional type '[Int]?' must be unwrapped to refer to member 'indices' of wrapped base type '[Int]'
            for i in ecdata[r].indices {
                             ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: note: chain the optional using '?' to access member 'indices' only for non-'nil' base values
            for i in ecdata[r].indices {
                             ^
                              ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:255:30: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
            for i in ecdata[r].indices {
                             ^
                              !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                if i < dcdata[r].count {
                               ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                if i < dcdata[r].count {
                               ^
                                ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:268:32: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                if i < dcdata[r].count {
                               ^
                                !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                if i < ecdata[r].count {
                               ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                if i < ecdata[r].count {
                               ^
                                ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:276:32: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                if i < ecdata[r].count {
                               ^
                                !
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: error: value of optional type '[Int]?' must be unwrapped to refer to member 'count' of wrapped base type '[Int]'
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: note: chain the optional using '?' to access member 'count' only for non-'nil' base values
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
                                                            ?
/host/spi-builder-workspace/.build/checkouts/swift_qrcodejs/Sources/QRCodeModel.swift:256:60: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                let modIndex = i + modPoly.count - ecdata[r].count
                                                           ^
                                                            !
[4/25] Compiling swift_qrcodejs QRPatternLocator.swift
[5/25] Compiling swift_qrcodejs QRPolynomial.swift
[6/25] Compiling swift_qrcodejs QRCodeRenderer.swift
[7/25] Compiling swift_qrcodejs QRCodeType.swift
[8/25] Compiling swift_qrcodejs QRRSBlock.swift
[9/25] Compiling swift_qrcodejs QRErrorCorrectLevel.swift
[10/25] Compiling swift_qrcodejs QRMaskPattern.swift
[11/25] Compiling swift_qrcodejs QRMath.swift
[12/25] Compiling swift_qrcodejs QRMode.swift
[13/25] Compiling swift_qrcodejs BCHUtil.swift
[14/25] Compiling swift_qrcodejs Failed.swift
[15/25] Compiling swift_qrcodejs QR8bitByte.swift
[16/25] Compiling swift_qrcodejs QRBitBuffer.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[17/25] Emitting module BilibiliKit
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:109: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:40: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:46:41: error: cannot find type 'URLRequest' in scope
    public func request(to url: URL) -> URLRequest {
                                        ^~~~~~~~~~
[18/25] Compiling BilibiliKit BKCookie.swift
[19/25] Compiling BilibiliKit BKLoginHelper.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:109: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:124: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:149:31: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        let task = URLSession.shared.dataTask(with: url) { data, response, error in
                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:152: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:153: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:40: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:205:31: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        let task = URLSession.shared.dataTask(with: request) { [weak self] data, response, error in
                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:205:76: error: unable to infer type of a closure parameter 'data' in the current context
        let task = URLSession.shared.dataTask(with: request) { [weak self] data, response, error in
                                                                           ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:205:82: error: unable to infer type of a closure parameter 'response' in the current context
        let task = URLSession.shared.dataTask(with: request) { [weak self] data, response, error in
                                                                                 ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:205:92: error: unable to infer type of a closure parameter 'error' in the current context
        let task = URLSession.shared.dataTask(with: request) { [weak self] data, response, error in
                                                                                           ^
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKLoginHelper.swift:208:45: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
                let headerFields = response.allHeaderFields as? [String: String],
                                   ~~~~~~~~ ^~~~~~~~~~~~~~~
[20/25] Compiling BilibiliKit BKSession.swift
/host/spi-builder-workspace/.build/checkouts/BilibiliKit/Sources/BKSession.swift:40: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:46: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:47:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 2