Build Information
Successful build of TripKit, reference 5.0.0-rc1 (8a0468
), with Swift 6.0 for Linux on 7 Mar 2025 08:29:56 UTC.
Swift 6 data race errors: 11
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-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
Build Log
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[40/60] Compiling TripKitAPI TKConfig.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[41/60] Compiling TripKitAPI TKCrossPlatform.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[42/60] Compiling TripKitAPI TKLog.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[43/60] Compiling TripKitAPI TKRegionManager.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[44/60] Compiling TripKitAPI TKRouter.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[45/60] Compiling TripKitAPI TKRoutingServer.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[46/60] Compiling TripKitAPI TKServer+Regions.swift
/host/spi-builder-workspace/Sources/TripKitAPI/TKConfig.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class TKConfig {
| `- note: class 'TKConfig' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = TKConfig()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKConfig' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | private init() {
/host/spi-builder-workspace/Sources/TripKitAPI/TKLog.swift:149:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
147 | /// The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with
148 | /// a `BETA` or `DEBUG` Swift flag, then it's a `TKConsoleLogger` with a log level of "warning".
149 | public static var loggers: [TKLogger] = {
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | #if BETA || DEBUG
151 | return [TKConsoleLogger(level: .warning)]
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:22:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public class TKRegionManager: NSObject {
| `- note: class 'TKRegionManager' does not conform to the 'Sendable' protocol
22 | public static let shared = TKRegionManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKRegionManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private var response: TKAPI.RegionsResponse? {
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:68: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: type 'TKAPI.RegionsResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:44:32: warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
42 | public func loadRegionsFromCache() async {
43 | do {
44 | let response = try await Task<TKAPI.RegionsResponse?, Error>.detached(priority: .utility) {
| `- warning: non-sendable type 'Task<TKAPI.RegionsResponse?, any Error>' exiting main actor-isolated context in call to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:47:9: warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | guard let data = TKRegionManager.readLocalCache() else { return nil }
46 | return try JSONDecoder().decode(TKAPI.RegionsResponse.self, from: data)
47 | }.value
| `- warning: non-sendable type 'TKAPI.RegionsResponse?' in asynchronous access from main actor-isolated context to nonisolated property 'value' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | if let response {
49 | updateRegions(from: response)
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RegionsAPIModel.swift:13:17: note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RegionsResponse: Codable {
| `- note: consider making struct 'RegionsResponse' conform to the 'Sendable' protocol
14 | public let modes: [String: ModeDetails]?
15 | public let regions: [TKRegion]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:25:21: warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// Optional parameters to add to routing query that use a ``TripRequest``
25 | public static var defaultParameters: [URLQueryItem]? = nil
| |- warning: static property 'defaultParameters' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultParameters' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultParameters' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:29:21: warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// Optional setting to group certain modes always in a single `routing.json` when sending a
28 | /// multi-fetch request.
29 | public static var modesToGroupInRequest: [String]? = nil
| |- warning: static property 'modesToGroupInRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'modesToGroupInRequest' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'modesToGroupInRequest' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Optional server to use instead of `TKServer.shared`.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:60:28: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
58 | public func cancelRequests() {
59 | if let queue = workerQueue {
60 | queue.async(execute: cancelRequestsWorker)
| `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
61 | } else {
62 | cancelRequestsWorker()
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:24: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:100:78: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
98 | }
99 |
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:21: warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: type 'TKAPI.RoutingResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/RoutingAPIModel.swift:13:17: note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
11 | extension TKAPI {
12 |
13 | public struct RoutingResponse: Codable {
| `- note: consider making struct 'RoutingResponse' conform to the 'Sendable' protocol
14 | public let error: String?
15 | public var segmentTemplates: [SegmentTemplate]?
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:17:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class TKServer {
| `- note: class 'TKServer' does not conform to the 'Sendable' protocol
16 |
17 | public static let shared = TKServer(isShared: true)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'TKServer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 | init(isShared: Bool) {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:90:42: warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
88 | }
89 |
90 | let response = await TKServer.shared.hit(TKAPI.RegionsResponse.self, .POST, url: regionsURL, parameters: paras)
| `- warning: non-sendable type 'TKServer.Response<TKAPI.RegionsResponse>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
91 | try Task.checkCancellation()
92 |
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer.swift:266:17: note: consider making generic struct 'Response' conform to the 'Sendable' protocol
264 | extension TKServer {
265 | /// Captures server response with HTTP status code, headers and typed response
266 | public struct Response<T> {
| `- note: consider making generic struct 'Response' conform to the 'Sendable' protocol
267 |
268 | /// HTTP status code of response. Can be `nil` if request failed.
/host/spi-builder-workspace/Sources/TripKitAPI/TKRegionManager.swift:36:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
34 | private override init() {
35 | super.init()
36 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
37 | await loadRegionsFromCache()
| `- note: closure captures 'self' which is accessible to code in the current task
38 | }
39 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKRouter.swift:102:44: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
100 | return try await withThrowingTaskGroup(of: TKAPI.RoutingResponse.self) { group in
101 | for modeGroup in groupedIdentifier {
102 | _ = group.addTaskUnlessCancelled {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
103 | try await Self.fetchTripsResponse(
104 | for: request,
:
107 | additional: request.additional,
108 | config: config,
109 | server: server
| `- note: closure captures 'server' which is accessible to code in the current task
110 | )
111 | }
/host/spi-builder-workspace/Sources/TripKitAPI/extensions/UserDefaults+SharedDefaults.swift:13:21: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension UserDefaults {
12 |
13 | public static let shared: UserDefaults = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'UserDefaults' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | if let shared = UserDefaults(suiteName: TKConfig.shared.appGroupName) {
15 | return shared
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
1 | open class UserDefaults : NSObject {
| `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
2 | open class var standard: UserDefaults { get }
3 | open class func resetStandardUserDefaults()
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:28:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
26 | /// - Parameter forced: Set true to force overwriting the internal cache
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
29 | try? await fetchRegions(forced: forced)
| `- note: closure captures 'self' which is accessible to code in the current task
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:29:18: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
27 | public func updateRegions(forced: Bool = false) {
28 | Task {
29 | try? await fetchRegions(forced: forced)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
30 | }
31 | }
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:38:10: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
36 | return completion(.success(()))
37 | }
38 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
39 | do {
40 | try await fetchRegions(forced: false)
| `- note: closure captures 'self' which is accessible to code in the current task
41 | completion(.success(()))
42 | } catch {
/host/spi-builder-workspace/Sources/TripKitAPI/TKServer+Regions.swift:40:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
38 | Task {
39 | do {
40 | try await fetchRegions(forced: false)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self' to main actor-isolated instance method 'fetchRegions(forced:)' risks causing data races between main actor-isolated and task-isolated uses
41 | completion(.success(()))
42 | } catch {
[47/60] Compiling TripKitAPI BaseAPIModels.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[48/60] Compiling TripKitAPI DeparturesAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[49/60] Compiling TripKitAPI EventAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[50/60] Compiling TripKitAPI LatestAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[51/60] Compiling TripKitAPI OpeningHoursAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[52/60] Compiling TripKitAPI PricingTableAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[53/60] Compiling TripKitAPI RegionInfoAPIModel.swift
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/EventAPIModel.swift:14:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
11 | extension TKAPI {
12 |
13 | public struct EventsResponse: Codable, Hashable {
| `- note: consider making struct 'EventsResponse' conform to the 'Sendable' protocol
14 | public static let empty: EventsResponse = EventsResponse(events: [])
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'TKAPI.EventsResponse' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | public let events: [Event]
/host/spi-builder-workspace/Sources/TripKitAPI/model/API/OpeningHoursAPIModel.swift:130:27: warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
118 |
119 |
120 | public enum DayOfWeek: String, Codable {
| `- note: consider making enum 'DayOfWeek' conform to the 'Sendable' protocol
121 | case monday = "MONDAY"
122 | case tuesday = "TUESDAY"
:
128 | case publicHoliday = "PUBLIC_HOLIDAY"
129 |
130 | public static let weekdays: [DayOfWeek] = [
| |- warning: static property 'weekdays' is not concurrency-safe because non-'Sendable' type '[TKAPI.OpeningHours.Day.DayOfWeek]' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'weekdays' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
131 | .monday, .tuesday, .wednesday, .thursday, .friday, .saturday, .sunday
132 | ]
[54/60] Compiling TripKitAPI DefaultEmptyArray.swift
[55/60] Compiling TripKitAPI DefaultFalse.swift
[56/60] Compiling TripKitAPI DefaultLossyArray.swift
[57/60] Compiling TripKitAPI DefaultNil.swift
[58/60] Compiling TripKitAPI DefaultTrue.swift
[59/60] Compiling TripKitAPI ISO8601OrSecondsSince1970.swift
[60/60] Compiling TripKitAPI LossyArray.swift
Build complete! (11.66s)
Build complete.
{
"default_localization" : "en",
"dependencies" : [
],
"manifest_display_name" : "TripKit",
"name" : "TripKit",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "11.0"
}
],
"products" : [
{
"name" : "TripKitAPI",
"targets" : [
"TripKitAPI"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "TripKitAPI",
"module_type" : "SwiftTarget",
"name" : "TripKitAPI",
"path" : "Sources/TripKitAPI",
"product_memberships" : [
"TripKitAPI"
],
"sources" : [
"TKAPIConfig.swift",
"TKConfig.swift",
"TKCrossPlatform.swift",
"TKLog.swift",
"TKRegionManager.swift",
"TKRouter.swift",
"TKRoutingServer.swift",
"TKServer+Regions.swift",
"TKServer.swift",
"extensions/Array+Duplicates.swift",
"extensions/Codable+Helpers.swift",
"extensions/Date+Helpers.swift",
"extensions/NSError+customError.swift",
"extensions/UserDefaults+SharedDefaults.swift",
"model/API/AlertAPIModels.swift",
"model/API/BaseAPIModels.swift",
"model/API/DeparturesAPIModel.swift",
"model/API/EventAPIModel.swift",
"model/API/LatestAPIModel.swift",
"model/API/OpeningHoursAPIModel.swift",
"model/API/PricingTableAPIModel.swift",
"model/API/RegionInfoAPIModel.swift",
"model/API/RegionsAPIModel.swift",
"model/API/RouteAPIModel.swift",
"model/API/RoutingAPIModel.swift",
"model/API/ServiceAPIModel.swift",
"model/API/StopAPIModel.swift",
"model/API/TKAPI.swift",
"model/API/UserAPIModel.swift",
"model/API/VehicleAPIModel.swift",
"model/TKBookingData.swift",
"model/TKBookingTypes.swift",
"model/TKError.swift",
"model/TKLocalCost.swift",
"model/TKMapTiles.swift",
"model/TKMiniInstruction.swift",
"model/TKModeInfo.swift",
"model/TKRegion.swift",
"model/TKRoutingQuery.swift",
"model/TKTransportMode.swift",
"model/TKTripCostType.swift",
"model/TKTurnByTurnMode.swift",
"vendor/ASPolygonKit/CLLocationCoordinate2D+DecodePolylineString.swift",
"vendor/ASPolygonKit/CLLocationCoordinate2D+EncodePolylineString.swift",
"vendor/ASPolygonKit/Geometry.swift",
"vendor/ASPolygonKit/MKPolygon+Union.swift",
"vendor/ASPolygonKit/Polygon+GeoJSON.swift",
"vendor/ASPolygonKit/Polygon.swift",
"vendor/ASPolygonKit/QuickLookable.swift",
"vendor/BetterCodable/DefaultCodable.swift",
"vendor/BetterCodable/DefaultEmptyArray.swift",
"vendor/BetterCodable/DefaultFalse.swift",
"vendor/BetterCodable/DefaultLossyArray.swift",
"vendor/BetterCodable/DefaultNil.swift",
"vendor/BetterCodable/DefaultTrue.swift",
"vendor/BetterCodable/ISO8601OrSecondsSince1970.swift",
"vendor/BetterCodable/LossyArray.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:081dcf4fb829aea9d08447f4790431afbdfbcc335bfeed728ca69c6f181ae2aa
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.