Build Information
Failed to build BilibiliKit, reference 3.1.2 (0b4a24
), with Swift 6.1 for Linux on 25 Apr 2025 23:06:17 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.61.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.1
Building package at path: $PWD
https://github.com/ApolloZhu/BilibiliKit.git
https://github.com/ApolloZhu/BilibiliKit.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "BilibiliKit",
"name" : "BilibiliKit",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "10.0"
},
{
"name" : "macos",
"version" : "10.12"
},
{
"name" : "tvos",
"version" : "10.0"
},
{
"name" : "watchos",
"version" : "3.0"
}
],
"products" : [
{
"name" : "BilibiliKit",
"targets" : [
"BilibiliKit"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "BilibiliKitDYLIB",
"targets" : [
"BilibiliKit"
],
"type" : {
"library" : [
"dynamic"
]
}
}
],
"targets" : [
{
"c99name" : "BilibiliKitTests",
"module_type" : "SwiftTarget",
"name" : "BilibiliKitTests",
"path" : "Tests/BilibiliKitTests",
"sources" : [
"BilibiliKitTests.swift"
],
"target_dependencies" : [
"BilibiliKit"
],
"type" : "test"
},
{
"c99name" : "BilibiliKit",
"module_type" : "SwiftTarget",
"name" : "BilibiliKit",
"path" : "Sources/BilibiliKit",
"product_memberships" : [
"BilibiliKit",
"BilibiliKitDYLIB"
],
"sources" : [
"BKArticle+Info.swift",
"BKArticle.swift",
"BKCurrentUser.swift",
"BKLiveRoom+Info.swift",
"BKLiveRoom.swift",
"BKSession+PasswordLogin.swift",
"BKSession+QRCodeLoginHelper.swift",
"BKUpUser+Stat.swift",
"BKUpUser.swift",
"BKUser+AudioStat.swift",
"BKUser+Info.swift",
"BKUser+Relationship.swift",
"BKUser.swift",
"BKVideo+Info.swift",
"BKVideo+Page.swift",
"BKVideo+Stat.swift",
"BKVideo.swift",
"BilibiliKit.swift"
],
"target_dependencies" : [
"BKFoundation",
"BKSecurity",
"BKAudio"
],
"type" : "library"
},
{
"c99name" : "BKSecurity",
"module_type" : "SwiftTarget",
"name" : "BKSecurity",
"path" : "Sources/BKSecurity",
"product_memberships" : [
"BilibiliKit",
"BilibiliKitDYLIB"
],
"sources" : [
"BKSec.swift",
"MD5.swift",
"RSA.swift"
],
"target_dependencies" : [
"BKFoundation"
],
"type" : "library"
},
{
"c99name" : "BKFoundation",
"module_type" : "SwiftTarget",
"name" : "BKFoundation",
"path" : "Sources/BKFoundation",
"product_memberships" : [
"BilibiliKit",
"BilibiliKitDYLIB"
],
"sources" : [
"BKApp.swift",
"BKCookie.swift",
"BKError.swift",
"BKSession.swift",
"Either.swift",
"URL+Extensions.swift",
"URLSession+Extensions.swift"
],
"type" : "library"
},
{
"c99name" : "BKAudio",
"module_type" : "SwiftTarget",
"name" : "BKAudio",
"path" : "Sources/BKAudio",
"product_memberships" : [
"BilibiliKit",
"BilibiliKitDYLIB"
],
"sources" : [
"BKAudio+Info.swift",
"BKAudio+Staff.swift",
"BKAudio+URLs.swift",
"BKAudio.swift"
],
"target_dependencies" : [
"BKFoundation"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Building for debugging...
[0/11] Write sources
[4/11] Write swift-version-24593BA9C3E375BF.txt
[6/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
76 | }
77 |
78 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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>)
[7/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
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:40:10: warning: associated value 'implementationError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ImplementationErrorReason'; this is an error in the Swift 6 language mode
26 | }
27 | /// Either you or @ApolloZhu is making dumb mistakes.
28 | public enum ImplementationErrorReason {
| `- note: consider making enum 'ImplementationErrorReason' conform to the 'Sendable' protocol
29 | case invalidURL(String)
30 | case invalidRegex(Error)
:
38 | }
39 |
40 | case implementationError(reason: ImplementationErrorReason)
| `- warning: associated value 'implementationError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ImplementationErrorReason'; this is an error in the Swift 6 language mode
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:41:10: warning: associated value 'parseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ParseErrorReason'; this is an error in the Swift 6 language mode
12 | public enum BKError: Error {
13 | /// bilibili changed their API. Contact @ApolloZhu to update BilibiliKit.
14 | public enum ParseErrorReason {
| `- note: consider making enum 'ParseErrorReason' conform to the 'Sendable' protocol
15 | case regexMatchNotFound
16 | case stringDecodeFailure
:
39 |
40 | case implementationError(reason: ImplementationErrorReason)
41 | case parseError(reason: ParseErrorReason)
| `- warning: associated value 'parseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ParseErrorReason'; this is an error in the Swift 6 language mode
42 | case responseError(reason: ResponseErrorReason)
43 | case encryptError(reason: EncryptionErrorReason)
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:42:10: warning: associated value 'responseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ResponseErrorReason'; this is an error in the Swift 6 language mode
19 | }
20 | /// bilibili or network is giving us some hard times.
21 | public enum ResponseErrorReason {
| `- note: consider making enum 'ResponseErrorReason' conform to the 'Sendable' protocol
22 | case urlSessionError(Error?, response: URLResponse?)
23 | case accessDenied
:
40 | case implementationError(reason: ImplementationErrorReason)
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
| `- warning: associated value 'responseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ResponseErrorReason'; this is an error in the Swift 6 language mode
43 | case encryptError(reason: EncryptionErrorReason)
44 | }
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:43:10: warning: associated value 'encryptError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.EncryptionErrorReason'; this is an error in the Swift 6 language mode
33 | }
34 | /// Security framework related errors.
35 | public enum EncryptionErrorReason {
| `- note: consider making enum 'EncryptionErrorReason' conform to the 'Sendable' protocol
36 | case publicKeySecKeyGenerationFailure(String)
37 | case rsaEncryptFailure(String)
:
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
43 | case encryptError(reason: EncryptionErrorReason)
| `- warning: associated value 'encryptError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.EncryptionErrorReason'; this is an error in the Swift 6 language mode
44 | }
45 |
[8/19] Compiling BKFoundation Either.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/19] Emitting module BKFoundation
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:37:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | /// using https://github.com/dantmnf/biliupload/blob/master/getcookie.py ,
36 | /// and appending `;bili_jct=value of cookie named bili_jct` .
37 | public static var `default`: BKCookie! = BKCookie(path:
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 | "\(FileManager.default.currentDirectoryPath)/\(filename)"
39 | )
/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/BKError.swift:40:10: warning: associated value 'implementationError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ImplementationErrorReason'; this is an error in the Swift 6 language mode
26 | }
27 | /// Either you or @ApolloZhu is making dumb mistakes.
28 | public enum ImplementationErrorReason {
| `- note: consider making enum 'ImplementationErrorReason' conform to the 'Sendable' protocol
29 | case invalidURL(String)
30 | case invalidRegex(Error)
:
38 | }
39 |
40 | case implementationError(reason: ImplementationErrorReason)
| `- warning: associated value 'implementationError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ImplementationErrorReason'; this is an error in the Swift 6 language mode
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:41:10: warning: associated value 'parseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ParseErrorReason'; this is an error in the Swift 6 language mode
12 | public enum BKError: Error {
13 | /// bilibili changed their API. Contact @ApolloZhu to update BilibiliKit.
14 | public enum ParseErrorReason {
| `- note: consider making enum 'ParseErrorReason' conform to the 'Sendable' protocol
15 | case regexMatchNotFound
16 | case stringDecodeFailure
:
39 |
40 | case implementationError(reason: ImplementationErrorReason)
41 | case parseError(reason: ParseErrorReason)
| `- warning: associated value 'parseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ParseErrorReason'; this is an error in the Swift 6 language mode
42 | case responseError(reason: ResponseErrorReason)
43 | case encryptError(reason: EncryptionErrorReason)
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:42:10: warning: associated value 'responseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ResponseErrorReason'; this is an error in the Swift 6 language mode
19 | }
20 | /// bilibili or network is giving us some hard times.
21 | public enum ResponseErrorReason {
| `- note: consider making enum 'ResponseErrorReason' conform to the 'Sendable' protocol
22 | case urlSessionError(Error?, response: URLResponse?)
23 | case accessDenied
:
40 | case implementationError(reason: ImplementationErrorReason)
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
| `- warning: associated value 'responseError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.ResponseErrorReason'; this is an error in the Swift 6 language mode
43 | case encryptError(reason: EncryptionErrorReason)
44 | }
/host/spi-builder-workspace/Sources/BKFoundation/BKError.swift:43:10: warning: associated value 'encryptError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.EncryptionErrorReason'; this is an error in the Swift 6 language mode
33 | }
34 | /// Security framework related errors.
35 | public enum EncryptionErrorReason {
| `- note: consider making enum 'EncryptionErrorReason' conform to the 'Sendable' protocol
36 | case publicKeySecKeyGenerationFailure(String)
37 | case rsaEncryptFailure(String)
:
41 | case parseError(reason: ParseErrorReason)
42 | case responseError(reason: ResponseErrorReason)
43 | case encryptError(reason: EncryptionErrorReason)
| `- warning: associated value 'encryptError(reason:)' of 'Sendable'-conforming enum 'BKError' has non-sendable type 'BKError.EncryptionErrorReason'; this is an error in the Swift 6 language mode
44 | }
45 |
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:36:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'BKSession' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// Stores cookies of a session.
12 | public class BKSession {
| `- note: class 'BKSession' does not conform to the 'Sendable' protocol
13 | /// To identify this session.
14 | public let identifier: String
:
34 |
35 | /// The shared session
36 | public static let shared = BKSession(identifier: "__BILIBILI_KIT_DEFAULT_SESSION__")
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'BKSession' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 |
38 | /// Initialize a new session.
/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
76 | }
77 |
78 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
79 | /// Shared url session, alias of URLSession.shared
80 | public static var _bk: URLSession { return .shared }
[10/19] Compiling BKFoundation BKCookie.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKCookie.swift:37:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | /// using https://github.com/dantmnf/biliupload/blob/master/getcookie.py ,
36 | /// and appending `;bili_jct=value of cookie named bili_jct` .
37 | public static var `default`: BKCookie! = BKCookie(path:
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 | "\(FileManager.default.currentDirectoryPath)/\(filename)"
39 | )
/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 | }
[11/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 {
[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 BKSession.swift
/host/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:36:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'BKSession' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// Stores cookies of a session.
12 | public class BKSession {
| `- note: class 'BKSession' does not conform to the 'Sendable' protocol
13 | /// To identify this session.
14 | public let identifier: String
:
34 |
35 | /// The shared session
36 | public static let shared = BKSession(identifier: "__BILIBILI_KIT_DEFAULT_SESSION__")
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'BKSession' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 |
38 | /// Initialize a new session.
/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")
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
[0/1] Planning build
Building for debugging...
[0/7] Write swift-version-24593BA9C3E375BF.txt
[2/15] 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")
[3/15] 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
[4/15] 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 {
[5/15] 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
76 | }
77 |
78 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
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>)
[6/15] 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 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/15] 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
76 | }
77 |
78 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
79 | /// Shared url session, alias of URLSession.shared
80 | public static var _bk: URLSession { return .shared }
[8/15] Compiling BKFoundation Either.swift
[9/15] 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 | ///
BUILD FAILURE 6.1 linux