Build Information
Successful build of DFService, reference main (fe6a17
), with Swift 6.0 for macOS (SPM) on 2 Dec 2024 15:24:03 UTC.
Swift 6 data race errors: 11
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.58.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/foxdock/DFService.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/foxdock/DFService
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at fe6a17c chore(main): release 0.6.1 (#18)
Cloned https://github.com/foxdock/DFService.git
Revision (git rev-parse @):
fe6a17c74dc744a8e2a24fe062be9fe7d0715f9b
SUCCESS checkout https://github.com/foxdock/DFService.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "dfservice",
"name": "DFService",
"url": "https://github.com/foxdock/DFService.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/DFService",
"dependencies": [
]
}
]
}
Fetching https://github.com/foxdock/DFService.git
[9/840] Fetching dfservice
Fetched https://github.com/foxdock/DFService.git from cache (1.10s)
Creating working copy for https://github.com/foxdock/DFService.git
Working copy of https://github.com/foxdock/DFService.git resolved at main (fe6a17c)
warning: '.resolve-product-dependencies': dependency 'dfservice' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/foxdock/DFService.git
{
"dependencies" : [
],
"manifest_display_name" : "DFService",
"name" : "DFService",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "DFService",
"targets" : [
"DFService"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "DFServiceTests",
"module_type" : "SwiftTarget",
"name" : "DFServiceTests",
"path" : "Tests/DFServiceTests",
"sources" : [
"DFServiceTests.swift"
],
"target_dependencies" : [
"DFService"
],
"type" : "test"
},
{
"c99name" : "DFService",
"module_type" : "SwiftTarget",
"name" : "DFService",
"path" : "Sources/DFService",
"product_memberships" : [
"DFService"
],
"sources" : [
"Constant.swift",
"ServiceContainer.swift",
"ServiceError.swift",
"ServiceHandler.swift",
"ServiceKey.swift",
"ServiceManager.swift",
"framework/AnyCodable.swift",
"framework/provider/Service.swift",
"framework/provider/ServiceFactory.swift",
"framework/provider/ServiceInterceptor.swift",
"framework/provider/ServicePromise.swift",
"framework/provider/ServiceResult.swift",
"framework/provider/service/impl/ServiceMock.swift",
"key/LogService.swift",
"key/RouteService.swift",
"swiftui/PageRoute.swift",
"swiftui/ScaffoldView.swift",
"swiftui/ServiceApp.swift",
"swiftui/WindowRouteContent.swift",
"swiftui/iOSNavigationView.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/21] Compiling DFService ServiceMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/LogService.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' may have shared mutable state; this is an error in the Swift 6 language mode
38 | }
39 |
40 | public struct LogService: ServiceKey {
| `- note: consider making struct 'LogService' conform to the 'Sendable' protocol
41 | public static let shared = Self.init()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' 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
42 | public static let name: String = "console.log"
43 | var tag: String
[4/21] Compiling DFService LogService.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/LogService.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' may have shared mutable state; this is an error in the Swift 6 language mode
38 | }
39 |
40 | public struct LogService: ServiceKey {
| `- note: consider making struct 'LogService' conform to the 'Sendable' protocol
41 | public static let shared = Self.init()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' 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
42 | public static let name: String = "console.log"
43 | var tag: String
[5/21] Compiling DFService ScaffoldView.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
[6/21] Compiling DFService ServiceApp.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
[7/23] Compiling DFService ServicePromise.swift
[8/23] Compiling DFService ServiceResult.swift
[9/23] Compiling DFService AnyCodable.swift
[10/23] Compiling DFService Service.swift
[11/23] Compiling DFService ServiceKey.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
[12/23] Compiling DFService ServiceManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
[13/23] Compiling DFService Constant.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
[14/23] Compiling DFService ServiceContainer.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
[15/23] Compiling DFService ServiceFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/framework/provider/ServiceFactory.swift:3:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1 | /// 服务提供者
2 | final class ServiceFactory {
3 | public static var shared = ServiceFactory()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
4 | var storage: [String: ServiceHandler] = [:]
5 | var interceptor: ServiceInterceptor
[16/23] Compiling DFService ServiceInterceptor.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/framework/provider/ServiceFactory.swift:3:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1 | /// 服务提供者
2 | final class ServiceFactory {
3 | public static var shared = ServiceFactory()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
4 | var storage: [String: ServiceHandler] = [:]
5 | var interceptor: ServiceInterceptor
[17/23] Emitting module DFService
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceContainer.swift:6:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' may have shared mutable state; this is an error in the Swift 6 language mode
3 | * 服务容器
4 | */
5 | public final class ServiceContainer {
| `- note: class 'ServiceContainer' does not conform to the 'Sendable' protocol
6 | public static let shared = ServiceContainer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ServiceContainer' 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
7 | let serviceManager = ServiceManger()
8 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceError.swift:8:10: warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
6 | public enum ServiceError: Error {
7 | /// 转换失败
8 | case castFailed(expectedType: Any.Type, actualValue: Any)
| `- warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
9 |
10 | /// 未实现的功能
/Users/admin/builder/spi-builder-workspace/Sources/DFService/framework/provider/ServiceFactory.swift:3:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1 | /// 服务提供者
2 | final class ServiceFactory {
3 | public static var shared = ServiceFactory()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
4 | var storage: [String: ServiceHandler] = [:]
5 | var interceptor: ServiceInterceptor
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/LogService.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' may have shared mutable state; this is an error in the Swift 6 language mode
38 | }
39 |
40 | public struct LogService: ServiceKey {
| `- note: consider making struct 'LogService' conform to the 'Sendable' protocol
41 | public static let shared = Self.init()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogService' 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
42 | public static let name: String = "console.log"
43 | var tag: String
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:5:23: warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
5 | public static var name: String = "router"
| |- warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'name' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'name' 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
6 |
7 | public static let shared: RouteService = RouteService()
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:23:16: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
21 |
22 | internal var pageBuilderMap = [String: PageBuilder]()
23 | public var onGenerateRoute: (RouteSetting) -> PageRoute = { setting in
| `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
24 | return PageRoute(
25 | builder: {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:101:20: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
99 | extension EnvironmentValues {
100 | struct RouteKey: EnvironmentKey {
101 | static var defaultValue = RouteService.shared
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
102 | }
103 | public var router: RouteService {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:31:17: warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
9 |
10 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
11 | public struct PageRoute: View, Hashable {
| `- note: add '@preconcurrency' to the 'Hashable' conformance to defer isolation checking to run time
12 | let page: AnyView
13 | let setting: RouteSetting
:
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
30 | }
31 | public func hash(into hasher: inout Hasher) {
| |- warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to 'hash(into:)' to make this instance method not isolated to the actor
32 | hasher.combine(setting.name)
33 | }
Swift.Hashable:3:10: note: 'hash(into:)' declared here
1 | public protocol Hashable : Equatable {
2 | var hashValue: Int { get }
3 | func hash(into hasher: inout Hasher)
| `- note: 'hash(into:)' declared here
4 | func _rawHashValue(seed: Int) -> Int
5 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:27:24: warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
25 | }
26 |
27 | public static func == (lhs: PageRoute, rhs: PageRoute) -> Bool {
| |- warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to '==' to make this operator function not isolated to the actor
28 | lhs.setting.name == rhs.setting.name
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
Swift.Equatable:2:17: note: '==' declared here
1 | public protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool
| `- note: '==' declared here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:38:16: warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
35 |
36 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
37 | extension PageRoute: Identifiable {
| `- note: add '@preconcurrency' to the 'Identifiable' conformance to defer isolation checking to run time
38 | public var id: String {
| `- warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
39 | return setting.name
40 | }
Swift.Identifiable:4:9: note: 'id' declared here
2 | public protocol Identifiable<ID> {
3 | associatedtype ID : Hashable
4 | var id: Self.ID { get }
| `- note: 'id' declared here
5 | }
[18/23] Compiling DFService ServiceError.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceError.swift:8:10: warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
6 | public enum ServiceError: Error {
7 | /// 转换失败
8 | case castFailed(expectedType: Any.Type, actualValue: Any)
| `- warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
9 |
10 | /// 未实现的功能
[19/23] Compiling DFService ServiceHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/ServiceError.swift:8:10: warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
6 | public enum ServiceError: Error {
7 | /// 转换失败
8 | case castFailed(expectedType: Any.Type, actualValue: Any)
| `- warning: associated value 'castFailed(expectedType:actualValue:)' of 'Sendable'-conforming enum 'ServiceError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
9 |
10 | /// 未实现的功能
[20/23] Compiling DFService RouteService.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:5:23: warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
5 | public static var name: String = "router"
| |- warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'name' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'name' 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
6 |
7 | public static let shared: RouteService = RouteService()
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:23:16: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
21 |
22 | internal var pageBuilderMap = [String: PageBuilder]()
23 | public var onGenerateRoute: (RouteSetting) -> PageRoute = { setting in
| `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
24 | return PageRoute(
25 | builder: {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:101:20: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
99 | extension EnvironmentValues {
100 | struct RouteKey: EnvironmentKey {
101 | static var defaultValue = RouteService.shared
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
102 | }
103 | public var router: RouteService {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: call to main actor-isolated initializer 'init(builder:setting:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| `- warning: call to main actor-isolated initializer 'init(builder:setting:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
55 | builder(arg)
56 | }, setting: arg)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:14:12: note: calls to initializer 'init(builder:setting:)' from outside of its actor context are implicitly asynchronous
12 | let page: AnyView
13 | let setting: RouteSetting
14 | public init<T: View>(
| `- note: calls to initializer 'init(builder:setting:)' from outside of its actor context are implicitly asynchronous
15 | @ViewBuilder builder: () -> T,
16 | setting: RouteSetting
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:31:17: warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
9 |
10 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
11 | public struct PageRoute: View, Hashable {
| `- note: add '@preconcurrency' to the 'Hashable' conformance to defer isolation checking to run time
12 | let page: AnyView
13 | let setting: RouteSetting
:
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
30 | }
31 | public func hash(into hasher: inout Hasher) {
| |- warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to 'hash(into:)' to make this instance method not isolated to the actor
32 | hasher.combine(setting.name)
33 | }
Swift.Hashable:3:10: note: 'hash(into:)' declared here
1 | public protocol Hashable : Equatable {
2 | var hashValue: Int { get }
3 | func hash(into hasher: inout Hasher)
| `- note: 'hash(into:)' declared here
4 | func _rawHashValue(seed: Int) -> Int
5 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:27:24: warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
25 | }
26 |
27 | public static func == (lhs: PageRoute, rhs: PageRoute) -> Bool {
| |- warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to '==' to make this operator function not isolated to the actor
28 | lhs.setting.name == rhs.setting.name
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
Swift.Equatable:2:17: note: '==' declared here
1 | public protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool
| `- note: '==' declared here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:38:16: warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
35 |
36 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
37 | extension PageRoute: Identifiable {
| `- note: add '@preconcurrency' to the 'Identifiable' conformance to defer isolation checking to run time
38 | public var id: String {
| `- warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
39 | return setting.name
40 | }
Swift.Identifiable:4:9: note: 'id' declared here
2 | public protocol Identifiable<ID> {
3 | associatedtype ID : Hashable
4 | var id: Self.ID { get }
| `- note: 'id' declared here
5 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: sending task-isolated value of type '() -> T' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| `- warning: sending task-isolated value of type '() -> T' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
55 | builder(arg)
56 | }, setting: arg)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: sending 'arg' risks causing data races; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| |- warning: sending 'arg' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'arg' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
55 | builder(arg)
56 | }, setting: arg)
[21/23] Compiling DFService PageRoute.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:5:23: warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
5 | public static var name: String = "router"
| |- warning: static property 'name' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'name' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'name' 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
6 |
7 | public static let shared: RouteService = RouteService()
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:23:16: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
21 |
22 | internal var pageBuilderMap = [String: PageBuilder]()
23 | public var onGenerateRoute: (RouteSetting) -> PageRoute = { setting in
| `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
24 | return PageRoute(
25 | builder: {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:101:20: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
99 | extension EnvironmentValues {
100 | struct RouteKey: EnvironmentKey {
101 | static var defaultValue = RouteService.shared
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultValue' 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
102 | }
103 | public var router: RouteService {
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: call to main actor-isolated initializer 'init(builder:setting:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| `- warning: call to main actor-isolated initializer 'init(builder:setting:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
55 | builder(arg)
56 | }, setting: arg)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:14:12: note: calls to initializer 'init(builder:setting:)' from outside of its actor context are implicitly asynchronous
12 | let page: AnyView
13 | let setting: RouteSetting
14 | public init<T: View>(
| `- note: calls to initializer 'init(builder:setting:)' from outside of its actor context are implicitly asynchronous
15 | @ViewBuilder builder: () -> T,
16 | setting: RouteSetting
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:31:17: warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
9 |
10 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
11 | public struct PageRoute: View, Hashable {
| `- note: add '@preconcurrency' to the 'Hashable' conformance to defer isolation checking to run time
12 | let page: AnyView
13 | let setting: RouteSetting
:
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
30 | }
31 | public func hash(into hasher: inout Hasher) {
| |- warning: main actor-isolated instance method 'hash(into:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to 'hash(into:)' to make this instance method not isolated to the actor
32 | hasher.combine(setting.name)
33 | }
Swift.Hashable:3:10: note: 'hash(into:)' declared here
1 | public protocol Hashable : Equatable {
2 | var hashValue: Int { get }
3 | func hash(into hasher: inout Hasher)
| `- note: 'hash(into:)' declared here
4 | func _rawHashValue(seed: Int) -> Int
5 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:27:24: warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
25 | }
26 |
27 | public static func == (lhs: PageRoute, rhs: PageRoute) -> Bool {
| |- warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
| `- note: add 'nonisolated' to '==' to make this operator function not isolated to the actor
28 | lhs.setting.name == rhs.setting.name
29 | && String(describing: lhs.setting.argument) == String(describing: rhs.setting.argument)
Swift.Equatable:2:17: note: '==' declared here
1 | public protocol Equatable {
2 | static func == (lhs: Self, rhs: Self) -> Bool
| `- note: '==' declared here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/swiftui/PageRoute.swift:38:16: warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
35 |
36 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
37 | extension PageRoute: Identifiable {
| `- note: add '@preconcurrency' to the 'Identifiable' conformance to defer isolation checking to run time
38 | public var id: String {
| `- warning: main actor-isolated property 'id' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
39 | return setting.name
40 | }
Swift.Identifiable:4:9: note: 'id' declared here
2 | public protocol Identifiable<ID> {
3 | associatedtype ID : Hashable
4 | var id: Self.ID { get }
| `- note: 'id' declared here
5 | }
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: sending task-isolated value of type '() -> T' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| `- warning: sending task-isolated value of type '() -> T' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
55 | builder(arg)
56 | }, setting: arg)
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:54:20: warning: sending 'arg' risks causing data races; this is an error in the Swift 6 language mode
52 | builder: @escaping (RouteSetting) -> T) -> Self {
53 | pageBuilderMap[name] = { arg in
54 | return PageRoute(builder: {
| |- warning: sending 'arg' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'arg' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
55 | builder(arg)
56 | }, setting: arg)
[22/23] Compiling DFService WindowRouteContent.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
[23/23] Compiling DFService iOSNavigationView.swift
/Users/admin/builder/spi-builder-workspace/Sources/DFService/key/RouteService.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
4 | public final class RouteService: ServiceKey, ServiceHandler, ObservableObject {
| `- note: class 'RouteService' does not conform to the 'Sendable' protocol
5 | public static var name: String = "router"
6 |
7 | public static let shared: RouteService = RouteService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'RouteService' 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
8 | public static var service: Service<RouteService> {
9 | return Service(shared, handler: shared)
Build complete! (18.68s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "DFService",
"name" : "DFService",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "DFService",
"targets" : [
"DFService"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "DFServiceTests",
"module_type" : "SwiftTarget",
"name" : "DFServiceTests",
"path" : "Tests/DFServiceTests",
"sources" : [
"DFServiceTests.swift"
],
"target_dependencies" : [
"DFService"
],
"type" : "test"
},
{
"c99name" : "DFService",
"module_type" : "SwiftTarget",
"name" : "DFService",
"path" : "Sources/DFService",
"product_memberships" : [
"DFService"
],
"sources" : [
"Constant.swift",
"ServiceContainer.swift",
"ServiceError.swift",
"ServiceHandler.swift",
"ServiceKey.swift",
"ServiceManager.swift",
"framework/AnyCodable.swift",
"framework/provider/Service.swift",
"framework/provider/ServiceFactory.swift",
"framework/provider/ServiceInterceptor.swift",
"framework/provider/ServicePromise.swift",
"framework/provider/ServiceResult.swift",
"framework/provider/service/impl/ServiceMock.swift",
"key/LogService.swift",
"key/RouteService.swift",
"swiftui/PageRoute.swift",
"swiftui/ScaffoldView.swift",
"swiftui/ServiceApp.swift",
"swiftui/WindowRouteContent.swift",
"swiftui/iOSNavigationView.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Done.