Build Information
Failed to build BilibiliKit, reference 3.1.2 (0b4a24
), with Swift 6.1 for macOS (SPM) on 25 Apr 2025 23:12:05 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
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 /Users/admin/builder/spi-builder-workspace/.git/
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
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "bilibilikit",
"name": "BilibiliKit",
"url": "https://github.com/ApolloZhu/BilibiliKit.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/BilibiliKit",
"dependencies": [
]
}
]
}
Fetching https://github.com/ApolloZhu/BilibiliKit.git
[1/1181] Fetching bilibilikit
Fetched https://github.com/ApolloZhu/BilibiliKit.git from cache (0.84s)
Creating working copy for https://github.com/ApolloZhu/BilibiliKit.git
Working copy of https://github.com/ApolloZhu/BilibiliKit.git resolved at 3.1.2 (0b4a247)
warning: '.resolve-product-dependencies': dependency 'bilibilikit' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/ApolloZhu/BilibiliKit.git
https://github.com/ApolloZhu/BilibiliKit.git
{
"dependencies" : [
],
"manifest_display_name" : "BilibiliKit",
"name" : "BilibiliKit",
"path" : "/Users/admin/builder/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 ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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
Building for debugging...
[0/7] Write sources
[4/7] Write swift-version-2F0A5646E1D333AE.txt
[6/15] Compiling BKFoundation URL+Extensions.swift
/Users/admin/builder/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 'Foundation' 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 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | /// Initialize url with string literals.
13 | ///
[7/15] Compiling BKFoundation BKCookie.swift
/Users/admin/builder/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 | )
[8/15] Emitting module BKFoundation
/Users/admin/builder/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 | )
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 |
/Users/admin/builder/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.
/Users/admin/builder/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 'Foundation' 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 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | /// Initialize url with string literals.
13 | ///
[9/15] Compiling BKFoundation BKApp.swift
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/BKApp.swift:33:24: warning: capture of 'raise' with non-sendable type '(BKError) -> ()' in a '@Sendable' closure
31 | let task = URLSession._bk.dataTask(with: playerURL) { data, res, err in
32 | guard let data = data else {
33 | return raise(.responseError(
| |- warning: capture of 'raise' with non-sendable type '(BKError) -> ()' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
34 | reason: .urlSessionError(err, response: res)))
35 | }
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/BKApp.swift:45:13: warning: capture of 'handler' with non-sendable type 'BKHandler<String>' (aka '(Result<String, BKError>) -> ()') in a '@Sendable' closure
43 | let matchedRange = Range(match.range(at: 1), in: raw)!
44 | let key = raw[matchedRange]
45 | handler(.success("\(key)"))
| |- warning: capture of 'handler' with non-sendable type 'BKHandler<String>' (aka '(Result<String, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
46 | }
47 | task.resume()
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/BKApp.swift:30:14: warning: concurrently-executed local function 'raise' must be marked as '@Sendable'
28 | /// - Important: No salt (secret for this key).
29 | public static func fetchKey(_ handler: @escaping BKHandler<String>) {
30 | func raise(_ error: BKError) { handler(.failure(error)) }
| `- warning: concurrently-executed local function 'raise' must be marked as '@Sendable'
31 | let task = URLSession._bk.dataTask(with: playerURL) { data, res, err in
32 | guard let data = data else {
[10/15] Compiling BKFoundation BKError.swift
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 |
[11/15] Compiling BKFoundation URLSession+Extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/URLSession+Extensions.swift:115:24: warning: capture of 'handler' with non-sendable type 'BKHandler<Wrapper.Wrapped>' (aka '(Result<Wrapper.Wrapped, BKError>) -> ()') in a '@Sendable' closure
113 | let task = URLSession._bk.dataTask(with: request) { data, res, err in
114 | guard let data = data else {
115 | return handler(.failure(.responseError(
| |- warning: capture of 'handler' with non-sendable type 'BKHandler<Wrapper.Wrapped>' (aka '(Result<Wrapper.Wrapped, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
116 | reason: .urlSessionError(err, response: res))))
117 | }
[12/15] Compiling BKFoundation Either.swift
[13/15] Compiling BKFoundation BKSession.swift
/Users/admin/builder/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.
[14/24] Emitting module BKAudio
[15/24] Compiling BKAudio BKAudio+Staff.swift
[16/24] Compiling BKAudio BKAudio.swift
[17/24] Compiling BKAudio BKAudio+URLs.swift
[18/24] Compiling BKAudio BKAudio+Info.swift
[19/24] Compiling BKSecurity BKSec.swift
[20/24] Compiling BKSecurity RSA.swift
[21/24] Emitting module BKSecurity
[22/24] Compiling BKSecurity MD5.swift
[23/42] Compiling BilibiliKit BKUser+Info.swift
[24/42] Compiling BilibiliKit BKUser+Relationship.swift
[25/42] Compiling BilibiliKit BKVideo.swift
[26/42] Compiling BilibiliKit BKVideo+Page.swift
error: compile command failed due to signal 6 (use -v to see invocation)
[27/42] Compiling BilibiliKit BKVideo+Stat.swift
[28/42] Compiling BilibiliKit BKLiveRoom.swift
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:71:28: warning: capture of 'handle' with non-sendable type 'BKHandler<BKCookie>' (aka '(Result<BKCookie, BKError>) -> ()') in a '@Sendable' closure
69 | [weak self] dat, res, err in
70 | guard let data = dat, !data.isEmpty else {
71 | return handle(.failure(.responseError(reason:
| |- warning: capture of 'handle' with non-sendable type 'BKHandler<BKCookie>' (aka '(Result<BKCookie, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | .urlSessionError(err, response: res))))
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:83:32: warning: capture of 'self' with non-sendable type 'BKSession?' in a '@Sendable' closure
81 | return BKError.parseError(reason: .jsonDecode(data, failure: error))
82 | }
83 | } .map { [weak self] in
| `- warning: capture of 'self' with non-sendable type 'BKSession?' in a '@Sendable' closure
84 | let cookie = BKCookie(_sequence: $0.data.cookie_info.cookies
85 | .lazy.map { "\($0.name)=\($0.value)" })!
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:12:14: note: class 'BKSession' does not conform to the 'Sendable' protocol
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
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:103:24: warning: capture of 'handle' with non-sendable type 'BKHandler<BKSession.Encryption>' (aka '(Result<BKSession.Encryption, BKError>) -> ()') in a '@Sendable' closure
101 | let task = URLSession._bk.dataTask(with: url) { dat, res, err in
102 | guard let data = dat else {
103 | return handle(.failure(.responseError(reason: .urlSessionError(err, response: res))))
| |- warning: capture of 'handle' with non-sendable type 'BKHandler<BKSession.Encryption>' (aka '(Result<BKSession.Encryption, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
104 | }
105 | handle(Result { try JSONDecoder().decode(Encryption.self, from: data) }
[29/42] Compiling BilibiliKit BKSession+PasswordLogin.swift
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:71:28: warning: capture of 'handle' with non-sendable type 'BKHandler<BKCookie>' (aka '(Result<BKCookie, BKError>) -> ()') in a '@Sendable' closure
69 | [weak self] dat, res, err in
70 | guard let data = dat, !data.isEmpty else {
71 | return handle(.failure(.responseError(reason:
| |- warning: capture of 'handle' with non-sendable type 'BKHandler<BKCookie>' (aka '(Result<BKCookie, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | .urlSessionError(err, response: res))))
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:83:32: warning: capture of 'self' with non-sendable type 'BKSession?' in a '@Sendable' closure
81 | return BKError.parseError(reason: .jsonDecode(data, failure: error))
82 | }
83 | } .map { [weak self] in
| `- warning: capture of 'self' with non-sendable type 'BKSession?' in a '@Sendable' closure
84 | let cookie = BKCookie(_sequence: $0.data.cookie_info.cookies
85 | .lazy.map { "\($0.name)=\($0.value)" })!
/Users/admin/builder/spi-builder-workspace/Sources/BKFoundation/BKSession.swift:12:14: note: class 'BKSession' does not conform to the 'Sendable' protocol
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
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift:103:24: warning: capture of 'handle' with non-sendable type 'BKHandler<BKSession.Encryption>' (aka '(Result<BKSession.Encryption, BKError>) -> ()') in a '@Sendable' closure
101 | let task = URLSession._bk.dataTask(with: url) { dat, res, err in
102 | guard let data = dat else {
103 | return handle(.failure(.responseError(reason: .urlSessionError(err, response: res))))
| |- warning: capture of 'handle' with non-sendable type 'BKHandler<BKSession.Encryption>' (aka '(Result<BKSession.Encryption, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
104 | }
105 | handle(Result { try JSONDecoder().decode(Encryption.self, from: data) }
[30/42] Compiling BilibiliKit BKUser.swift
[31/42] Compiling BilibiliKit BKVideo+Info.swift
[32/42] Compiling BilibiliKit BKArticle+Info.swift
[33/42] Compiling BilibiliKit BKArticle.swift
[34/42] Emitting module BilibiliKit
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:30:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BKSession.QRCodeLoginHelper' may have shared mutable state; this is an error in the Swift 6 language mode
12 | extension BKSession {
13 | /// Manages login into bilibili with QRCode
14 | public class QRCodeLoginHelper {
| `- note: class 'QRCodeLoginHelper' does not conform to the 'Sendable' protocol
15 | /// Initialize a new login helper.
16 | public init() { }
:
28 | extension BKSession.QRCodeLoginHelper {
29 | /// Default login helper
30 | public static let `default` = BKSession.QRCodeLoginHelper()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BKSession.QRCodeLoginHelper' may have shared mutable state; this is an error in the Swift 6 language mode
| |- 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
31 |
32 | #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:34:24: warning: static property 'dummyTimer' is not concurrency-safe because non-'Sendable' type 'Timer' may have shared mutable state; this is an error in the Swift 6 language mode
32 | #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
33 | /// A dummpy helper that does nothing but indicating an internal state.
34 | private static let dummyTimer = Timer()
| |- warning: static property 'dummyTimer' is not concurrency-safe because non-'Sendable' type 'Timer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'dummyTimer' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
35 | #else
36 | /// A dummpy helper that does nothing but indicating an internal state.
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTimer.h:10:12: note: class 'Timer' does not conform to the 'Sendable' protocol
8 | NS_HEADER_AUDIT_BEGIN(nullability, sendability)
9 |
10 | @interface NSTimer : NSObject
| `- note: class 'Timer' does not conform to the 'Sendable' protocol
11 |
12 | + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;
[35/42] Compiling BilibiliKit BKCurrentUser.swift
[36/42] Compiling BilibiliKit BKLiveRoom+Info.swift
[37/42] Compiling BilibiliKit BKUpUser.swift
[38/42] Compiling BilibiliKit BKUser+AudioStat.swift
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:30:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BKSession.QRCodeLoginHelper' may have shared mutable state; this is an error in the Swift 6 language mode
12 | extension BKSession {
13 | /// Manages login into bilibili with QRCode
14 | public class QRCodeLoginHelper {
| `- note: class 'QRCodeLoginHelper' does not conform to the 'Sendable' protocol
15 | /// Initialize a new login helper.
16 | public init() { }
:
28 | extension BKSession.QRCodeLoginHelper {
29 | /// Default login helper
30 | public static let `default` = BKSession.QRCodeLoginHelper()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BKSession.QRCodeLoginHelper' may have shared mutable state; this is an error in the Swift 6 language mode
| |- 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
31 |
32 | #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:34:24: warning: static property 'dummyTimer' is not concurrency-safe because non-'Sendable' type 'Timer' may have shared mutable state; this is an error in the Swift 6 language mode
32 | #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
33 | /// A dummpy helper that does nothing but indicating an internal state.
34 | private static let dummyTimer = Timer()
| |- warning: static property 'dummyTimer' is not concurrency-safe because non-'Sendable' type 'Timer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'dummyTimer' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
35 | #else
36 | /// A dummpy helper that does nothing but indicating an internal state.
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTimer.h:10:12: note: class 'Timer' does not conform to the 'Sendable' protocol
8 | NS_HEADER_AUDIT_BEGIN(nullability, sendability)
9 |
10 | @interface NSTimer : NSObject
| `- note: class 'Timer' does not conform to the 'Sendable' protocol
11 |
12 | + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:52:22: warning: capture of 'execute' with non-sendable type '() -> Void' in a '@Sendable' closure
50 | if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
51 | timer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) {
52 | _ in execute()
| |- warning: capture of 'execute' with non-sendable type '() -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
53 | }
54 | timer?.fire()
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:60:41: warning: capture of 'self' with non-sendable type 'BKSession.QRCodeLoginHelper?' in a '@Sendable' closure
12 | extension BKSession {
13 | /// Manages login into bilibili with QRCode
14 | public class QRCodeLoginHelper {
| `- note: class 'QRCodeLoginHelper' does not conform to the 'Sendable' protocol
15 | /// Initialize a new login helper.
16 | public init() { }
:
58 | DispatchQueue.global(qos: .userInteractive)
59 | .asyncAfter(deadline: DispatchTime.now() + 1)
60 | { [weak self] in if self?.isRunLoopActive == true { execute();loop() } }
| `- warning: capture of 'self' with non-sendable type 'BKSession.QRCodeLoginHelper?' in a '@Sendable' closure
61 | }
62 | loop()
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:60:73: warning: capture of 'execute' with non-sendable type '() -> Void' in a '@Sendable' closure
58 | DispatchQueue.global(qos: .userInteractive)
59 | .asyncAfter(deadline: DispatchTime.now() + 1)
60 | { [weak self] in if self?.isRunLoopActive == true { execute();loop() } }
| |- warning: capture of 'execute' with non-sendable type '() -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
61 | }
62 | loop()
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:60:83: warning: capture of 'loop()' with non-sendable type '() -> ()' in a '@Sendable' closure
58 | DispatchQueue.global(qos: .userInteractive)
59 | .asyncAfter(deadline: DispatchTime.now() + 1)
60 | { [weak self] in if self?.isRunLoopActive == true { execute();loop() } }
| |- warning: capture of 'loop()' with non-sendable type '() -> ()' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
61 | }
62 | loop()
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:57:18: warning: concurrently-executed local function 'loop()' must be marked as '@Sendable'
55 | } else {
56 | timer = BKSession.QRCodeLoginHelper.dummyTimer
57 | func loop() {
| `- warning: concurrently-executed local function 'loop()' must be marked as '@Sendable'
58 | DispatchQueue.global(qos: .userInteractive)
59 | .asyncAfter(deadline: DispatchTime.now() + 1)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:107:46: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
105 | DispatchQueue.global(qos: .userInitiated)
106 | .asyncAfter(deadline: DispatchTime.now() + 3,
107 | execute: process)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
108 | }
109 | helper.everySecond(execute: process)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:81:21: warning: variable 'process' was never mutated; consider changing to 'let' constant
79 | case .success(let url):
80 | handleLoginInfo(url)
81 | var process: () -> Void = { [weak self] in
| `- warning: variable 'process' was never mutated; consider changing to 'let' constant
82 | guard helper.isRunLoopActive else { return }
83 | helper.fetchLoginInfo(oauthKey: url.oauthKey)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:136:24: warning: capture of 'handler' with non-sendable type 'BKHandler<BKSession.QRCodeLoginHelper.LoginURL>' (aka '(Result<BKSession.QRCodeLoginHelper.LoginURL, BKError>) -> ()') in a '@Sendable' closure
134 | let task = URLSession._bk.dataTask(with: url) { data, response, error in
135 | guard let data = data else {
136 | return handler(.failure(.responseError(
| |- warning: capture of 'handler' with non-sendable type 'BKHandler<BKSession.QRCodeLoginHelper.LoginURL>' (aka '(Result<BKSession.QRCodeLoginHelper.LoginURL, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
137 | reason: .urlSessionError(error, response: response))))
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:197:19: warning: capture of 'self' with non-sendable type 'BKSession.QRCodeLoginHelper?' in a '@Sendable' closure
12 | extension BKSession {
13 | /// Manages login into bilibili with QRCode
14 | public class QRCodeLoginHelper {
| `- note: class 'QRCodeLoginHelper' does not conform to the 'Sendable' protocol
15 | /// Initialize a new login helper.
16 | public init() { }
:
195 | let task = URLSession._bk.dataTask(with: request)
196 | { [weak self] data, res, error in
197 | guard self?.isRunLoopActive == true else { return }
| `- warning: capture of 'self' with non-sendable type 'BKSession.QRCodeLoginHelper?' in a '@Sendable' closure
198 | if let response = res as? HTTPURLResponse,
199 | let headerFields = response.allHeaderFields as? [String: String],
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:203:28: warning: capture of 'handler' with non-sendable type 'BKHandler<BKSession.QRCodeLoginHelper.LoginState>' (aka '(Result<BKSession.QRCodeLoginHelper.LoginState, BKError>) -> ()') in a '@Sendable' closure
201 | guard let cookie = BKCookie(headerField: cookies) else {
202 | debugPrint("Inconsistent Login Cookie State")
203 | return handler(.failure(.responseError(
| |- warning: capture of 'handler' with non-sendable type 'BKHandler<BKSession.QRCodeLoginHelper.LoginState>' (aka '(Result<BKSession.QRCodeLoginHelper.LoginState, BKError>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
204 | reason: .urlSessionError(error, response: res))))
205 | }
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKArticle+Info.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKArticle.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKCurrentUser.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKLiveRoom+Info.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKLiveRoom.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+PasswordLogin.swift -primary-file /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift -primary-file /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUpUser+Stat.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUpUser.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUser+AudioStat.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUser+Info.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUser+Relationship.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKUser.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKVideo+Info.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKVideo+Page.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKVideo+Stat.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKVideo.swift /Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BilibiliKit.swift -emit-dependencies-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKSession+QRCodeLoginHelper.d -emit-reference-dependencies-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKSession+QRCodeLoginHelper.swiftdeps -emit-dependencies-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKUpUser+Stat.d -emit-reference-dependencies-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKUpUser+Stat.swiftdeps -target arm64-apple-macosx10.13 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -I /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/Modules -I /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -new-driver-path /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -stats-output-dir .stats -enable-upcoming-feature StrictConcurrency -enable-upcoming-feature DisableOutwardActorInference -enable-upcoming-feature GlobalActorIsolatedTypesUsability -enable-upcoming-feature InferSendableFromCaptures -strict-concurrency=complete -empty-abi-descriptor -resource-dir /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /Users/admin/builder/spi-builder-workspace -Xcc -isysroot -Xcc /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -Xcc -F -Xcc /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -F -Xcc /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -Xcc -fPIC -Xcc -g -module-name BilibiliKit -disable-clang-spi -target-sdk-version 15.4 -target-sdk-name macosx15.4 -external-plugin-path /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -in-process-plugin-server-path /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -plugin-path /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Applications/Xcode-16.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins -parse-as-library -o /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKSession+QRCodeLoginHelper.swift.o -o /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/BilibiliKit.build/BKUpUser+Stat.swift.o -index-store-path /Users/admin/builder/spi-builder-workspace/.build/arm64-apple-macosx/debug/index/store -index-system-modules
1. Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for BilibiliKit)
4. While running pass #1153 SILFunctionTransform "SendNonSendable" on SILFunction "@$s12BKFoundation9BKSessionC11BilibiliKitE5login10withHelper15handleLoginInfo0hI5StateyAcDE06QRCodeiG0C_yAJ0I3URLVcyAJ0iK0OctFys6ResultOyAlA7BKErrorOGcfU_".
for expression at [/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:77:30 - line:114:9] RangeText="{ [weak self] result in
switch result {
case .success(let url):
handleLoginInfo(url)
var process: () -> Void = { [weak self] in
guard helper.isRunLoopActive else { return }
helper.fetchLoginInfo(oauthKey: url.oauthKey)
{ [weak self] result in
guard let self = self, helper.isRunLoopActive else { return }
switch result {
case .success(let state):
switch state {
case .succeeded(cookie: let cookie):
helper.interrupt()
self.cookie = cookie
case .expired:
helper.interrupt()
default:
heartbeat()
}
handleLoginState(state)
case .failure(let error):
debugPrint(error)
heartbeat()
}
}
}
func heartbeat() {
DispatchQueue.global(qos: .userInitiated)
.asyncAfter(deadline: DispatchTime.now() + 3,
execute: process)
}
helper.everySecond(execute: process)
case .failure(let error):
debugPrint(error)
handleLoginState(.errored)
}
"
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x0000000106fc2c28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x0000000106fc0a60 llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x0000000106fc3264 SignalHandler(int) + 360
3 libsystem_platform.dylib 0x000000018a627624 _sigtramp + 56
4 libsystem_pthread.dylib 0x000000018a5ed88c pthread_kill + 296
5 libsystem_c.dylib 0x000000018a4f6c60 abort + 124
6 swift-frontend 0x0000000101ebbf8c swift::Partition::merge(swift::PartitionPrimitives::Element, swift::PartitionPrimitives::Element, bool) + 240
7 swift-frontend 0x0000000101a1ee90 swift::RegionAnalysisFunctionInfo::runDataflow() + 8936
8 swift-frontend 0x0000000101a21dcc swift::RegionAnalysis::newFunctionAnalysis(swift::SILFunction*) + 4188
9 swift-frontend 0x0000000101c772d8 (anonymous namespace)::SendNonSendable::run() + 308
10 swift-frontend 0x0000000101cb3810 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3336
11 swift-frontend 0x0000000101cafc54 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 12100
12 swift-frontend 0x0000000101ceac50 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 52
13 swift-frontend 0x0000000101cce6e0 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 412
14 swift-frontend 0x0000000101cd19e0 swift::runSILDiagnosticPasses(swift::SILModule&) + 416
15 swift-frontend 0x00000001011d466c swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 656
16 swift-frontend 0x0000000100e14d90 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1360
17 swift-frontend 0x0000000100e140a8 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1036
18 swift-frontend 0x0000000100e17654 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1764
19 swift-frontend 0x0000000100e15fd8 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3716
20 swift-frontend 0x0000000100d9a0bc swift::mainEntry(int, char const**) + 5428
21 dyld 0x000000018a24eb4c start + 6000
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/3] Write swift-version-2F0A5646E1D333AE.txt
[2/11] Compiling BKFoundation BKSession.swift
[3/11] Compiling BKFoundation URL+Extensions.swift
/Users/admin/builder/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 'Foundation' 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 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | /// Initialize url with string literals.
13 | ///
[4/11] Compiling BKFoundation Either.swift
[5/11] Compiling BKFoundation BKError.swift
[6/11] Compiling BKFoundation BKCookie.swift
[7/11] Compiling BKFoundation BKApp.swift
[8/11] Compiling BKFoundation URLSession+Extensions.swift
[9/11] Emitting module BKFoundation
/Users/admin/builder/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 'Foundation' 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 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | /// Initialize url with string literals.
13 | ///
[10/20] Compiling BKAudio BKAudio.swift
[11/20] Compiling BKSecurity BKSec.swift
[12/20] Compiling BKSecurity MD5.swift
[13/20] Emitting module BKSecurity
[14/20] Compiling BKSecurity RSA.swift
[15/20] Compiling BKAudio BKAudio+URLs.swift
[16/20] Compiling BKAudio BKAudio+Staff.swift
[17/20] Compiling BKAudio BKAudio+Info.swift
[18/20] Emitting module BKAudio
[19/38] Compiling BilibiliKit BKUpUser.swift
[20/38] Compiling BilibiliKit BKUser+AudioStat.swift
[21/38] Compiling BilibiliKit BKVideo+Page.swift
[22/38] Compiling BilibiliKit BKVideo+Stat.swift
[23/38] Compiling BilibiliKit BKVideo.swift
[24/39] Compiling BilibiliKit BKUser+Info.swift
[25/39] Compiling BilibiliKit BKUser+Relationship.swift
[26/39] Compiling BilibiliKit BKLiveRoom.swift
[27/39] Compiling BilibiliKit BKSession+PasswordLogin.swift
[28/39] Compiling BilibiliKit BKArticle+Info.swift
[29/39] Compiling BilibiliKit BKArticle.swift
[30/39] Compiling BilibiliKit BKUser.swift
[31/39] Compiling BilibiliKit BKVideo+Info.swift
[32/39] Compiling BilibiliKit BKCurrentUser.swift
[33/39] Compiling BilibiliKit BKLiveRoom+Info.swift
[34/39] Emitting module BilibiliKit
[35/39] Compiling BilibiliKit BKSession+QRCodeLoginHelper.swift
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:81:21: warning: variable 'process' was never mutated; consider changing to 'let' constant
79 | case .success(let url):
80 | handleLoginInfo(url)
81 | var process: () -> Void = { [weak self] in
| `- warning: variable 'process' was never mutated; consider changing to 'let' constant
82 | guard helper.isRunLoopActive else { return }
83 | helper.fetchLoginInfo(oauthKey: url.oauthKey)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:81:43: error: closure captures 'process' before it is declared
79 | case .success(let url):
80 | handleLoginInfo(url)
81 | var process: () -> Void = { [weak self] in
| | `- error: closure captures 'process' before it is declared
| `- note: captured value declared here
82 | guard helper.isRunLoopActive else { return }
83 | helper.fetchLoginInfo(oauthKey: url.oauthKey)
:
105 | DispatchQueue.global(qos: .userInitiated)
106 | .asyncAfter(deadline: DispatchTime.now() + 3,
107 | execute: process)
| `- note: captured here
108 | }
109 | helper.everySecond(execute: process)
[36/39] Compiling BilibiliKit BKUpUser+Stat.swift
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:81:21: warning: variable 'process' was never mutated; consider changing to 'let' constant
79 | case .success(let url):
80 | handleLoginInfo(url)
81 | var process: () -> Void = { [weak self] in
| `- warning: variable 'process' was never mutated; consider changing to 'let' constant
82 | guard helper.isRunLoopActive else { return }
83 | helper.fetchLoginInfo(oauthKey: url.oauthKey)
/Users/admin/builder/spi-builder-workspace/Sources/BilibiliKit/BKSession+QRCodeLoginHelper.swift:81:43: error: closure captures 'process' before it is declared
79 | case .success(let url):
80 | handleLoginInfo(url)
81 | var process: () -> Void = { [weak self] in
| | `- error: closure captures 'process' before it is declared
| `- note: captured value declared here
82 | guard helper.isRunLoopActive else { return }
83 | helper.fetchLoginInfo(oauthKey: url.oauthKey)
:
105 | DispatchQueue.global(qos: .userInitiated)
106 | .asyncAfter(deadline: DispatchTime.now() + 3,
107 | execute: process)
| `- note: captured here
108 | }
109 | helper.everySecond(execute: process)
[37/39] Compiling BilibiliKit BilibiliKit.swift
BUILD FAILURE 6.1 macosSpm