Build Information
Failed to build OctopusKit, reference 3.2.0 (334a8e
), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 21:04:47 UTC.
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
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[187/192] Compiling OctopusKit TypeSafeIdentifiers.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[188/192] Compiling OctopusKit Entity.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[189/192] Compiling OctopusKit OctopusKitContainerView.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[190/192] Compiling OctopusKit OctopusUI.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[191/192] Compiling OctopusKit OctopusUIOverlay.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
[192/192] Compiling OctopusKit OctopusViewControllerRepresentable.swift
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:25:23: warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | /// A log for operations that involve loading, downloading, caching and writing game assets and related resources.
25 | public static var logForResources = OctopusLog(title: "🐙📦", suffix: "📦")
| |- warning: static property 'logForResources' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForResources' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForResources' 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 | /// A log for deinitializations; when an object is freed from memory.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:18:16: warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | // MARK: - Graphics
17 |
18 | static var textureAtlases: OctopusCache<String, SKTextureAtlas> = {
| |- warning: static property 'textureAtlases' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textureAtlases' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textureAtlases' 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
19 |
20 | let cache = OctopusCache<String, SKTextureAtlas> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:30:16: warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | }()
29 |
30 | static var textures: OctopusCache<String, SKTexture> = {
| |- warning: static property 'textures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'textures' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'textures' 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
31 |
32 | let cache = OctopusCache<String, SKTexture> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusKit+Caches.swift:42:16: warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 | }()
41 |
42 | static var shaders: OctopusCache<String, SKShader> = {
| |- warning: static property 'shaders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shaders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shaders' 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
43 |
44 | let cache = OctopusCache<String, SKShader> { key in
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:96:23: warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | /// If `true` then an empty line is printed between each entry in the debug console.
96 | public static var printEmptyLineBetweenEntries: Bool = false
| |- warning: static property 'printEmptyLineBetweenEntries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenEntries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenEntries' 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
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:99:23: warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
97 |
98 | /// If `true` then an empty line is printed between entries with different frame counts (e.g. F0 and F1).
99 | public static var printEmptyLineBetweenFrames: Bool = false
| |- warning: static property 'printEmptyLineBetweenFrames' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printEmptyLineBetweenFrames' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printEmptyLineBetweenFrames' 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
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:102:23: warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
100 |
101 | /// If `true` then an entry is printed on at least 2 lines in the debug console, where the time and calling file is on the first line and the text is on the second line.
102 | public static var printTextOnSecondLine: Bool = false
| |- warning: static property 'printTextOnSecondLine' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printTextOnSecondLine' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printTextOnSecondLine' 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
103 |
104 | /// If `true` then debug console output is printed in tab-delimited CSV format, that may then be copied into a spreadsheet table such as Numbers etc.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:107:23: warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 | ///
106 | /// The values are: currentTime, currentFrameNumber, title, callerFile, callerFunction, text, suffix.
107 | public static var printAsCSV: Bool = false
| |- warning: static property 'printAsCSV' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'printAsCSV' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'printAsCSV' 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
108 |
109 | /// The separator to print between values when `printAsCSV` is `true`.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:111:23: warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
109 | /// The separator to print between values when `printAsCSV` is `true`.
110 | /// Default is `tab`.
111 | public static var csvDelimiter: String = "\t"
| |- warning: static property 'csvDelimiter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'csvDelimiter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'csvDelimiter' 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
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:114:40: warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
112 |
113 | /// Stores the frame number during the most recent log entry, so we can mark the beginning of a new frame to make logs easier to read.
114 | public fileprivate(set) static var lastFrameLogged: UInt64 = 0
| |- warning: static property 'lastFrameLogged' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastFrameLogged' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'lastFrameLogged' 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
115 |
116 | /// The global time formatter for all OctopusKit logging functions.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit.swift:40:36: 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
38 |
39 | /// Returns the singleton OctopusKit instance, which must be created via `initSharedInstance(gameName:gameCoordinator:)` during `AppDelegate.applicationWillLaunchOctopusKit()`.
40 | public private(set) static var shared: OctopusKit! {
| |- 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
41 |
42 | willSet {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:147:67: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
138 |
139 | /// Returns a string with the number of the frame being rendered by the current scene, if any.
140 | public static func currentFrame() -> String {
| `- note: add '@MainActor' to make static method 'currentFrame()' part of global actor 'MainActor'
141 |
142 | var currentFrameNumber: UInt64 = 0
:
145 |
146 | if OctopusKit.shared?.gameCoordinator.didEnterInitialState ?? false {
147 | currentFrameNumber = OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 | } else {
149 | lastFrameLogged = 0
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:36:23: warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
34 | ///
35 | /// - Warning: Adding an entry to this log will raise a `fatalError` that terminates the application.
36 | public static var logForErrors = OctopusLog(title: "🐙🚫", suffix: "🚫", haltApplicationOnNewEntry: true)
| |- warning: static property 'logForErrors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForErrors' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForErrors' 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
37 |
38 | /// A log for verbose debugging information.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusLog.swift:277:57: warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
235 |
236 | /// Prints a new entry and adds it to the log.
237 | public mutating func add(
| `- note: add '@MainActor' to make instance method 'add(_:callerFile:callerFunction:useNSLog:)' part of global actor 'MainActor'
238 | _ text: String? = nil,
239 | callerFile: String = #file,
:
275 | consoleText = [
276 | OctopusLog.currentTime(),
277 | "\(OctopusKit.shared?.currentScene?.currentFrameNumber ?? 0)",
| `- warning: main actor-isolated property 'currentFrameNumber' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
278 | #""\#(title)""#,
279 | #""\#(callerFile)""#,
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Base/OctopusScene.swift:53:33: note: property declared here
51 | ///
52 | /// - NOTE: This property actually denotes the number of times the 'update(_:)' method has been called so far. The actual beginning of a "frame" may happen outside the 'update(_:)' method and may not align with the mutation of this property.
53 | public fileprivate(set) var currentFrameNumber: UInt64 = 0
| `- note: property declared here
54 |
55 | /// Updated in `OctopusScene.update(_:)` every frame.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUserDefault.swift:74:36: warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
19 | ///
20 | /// 💡 **Tip:** Use the `TypeSafeIdentifiers` protocol for eliminating typos and other mistakes when passing around string keys.
21 | @propertyWrapper public struct OctopusUserDefault <ValueType> : CustomStringConvertible {
| `- note: 'ValueType' previously declared here
22 |
23 | // NOTE: This is "ValueType" as in type of the value, not "value type" as in structs or enums. :)
:
72 | /// This function may be chained with the `??` operator to provide a [different] default value at each call site.
73 | @inlinable
74 | public static func preference <ValueType> (forKey key: String) -> ValueType? {
| `- warning: generic parameter 'ValueType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
75 | if let value = UserDefaults.standard.object(forKey: key) as? ValueType {
76 | OctopusKit.logForDebug.add("\"\(key)\" \(ValueType.self) = \(value)")
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:39:23: warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 |
38 | /// A log for verbose debugging information.
39 | public static var logForDebug = OctopusLog(title: "🐙🐞")
| |- warning: static property 'logForDebug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForDebug' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForDebug' 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
40 |
41 | /// A log for developer tips to assist with fixing warnings and errors.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusKit+Logs.swift:16:23: warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | /// A log for core or general engine events.
16 | public static var logForFramework = OctopusLog(title: "🐙")
| |- warning: static property 'logForFramework' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'logForFramework' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'logForFramework' 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
17 |
18 | /// A log for transitions within game states and entity states.
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:24:51: warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
| `- warning: main actor-isolated property 'particleBirthRate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
26 | let removeAction = SKAction.removeFromParent()
SpriteKit.SKEmitterNode:28:25: note: mutation of this property is only permitted within the actor
26 | open var xAcceleration: CGFloat { get set }
27 | open var yAcceleration: CGFloat { get set }
28 | @MainActor open var particleBirthRate: CGFloat { get set }
| `- note: mutation of this property is only permitted within the actor
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:75: warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetime' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:30:14: note: property declared here
28 | @MainActor open var particleBirthRate: CGFloat { get set }
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
| `- note: property declared here
31 | open var particleLifetimeRange: CGFloat { get set }
32 | open var particleRotation: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:25:102: warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
24 | let birthRateSet = SKAction.run { emitter.particleBirthRate = 0.0 }
25 | let waitAction2 = SKAction.wait(forDuration: TimeInterval(emitter.particleLifetime + emitter.particleLifetimeRange))
| `- warning: main actor-isolated property 'particleLifetimeRange' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
26 | let removeAction = SKAction.removeFromParent()
27 |
SpriteKit.SKEmitterNode:31:14: note: property declared here
29 | open var numParticlesToEmit: Int { get set }
30 | open var particleLifetime: CGFloat { get set }
31 | open var particleLifetimeRange: CGFloat { get set }
| `- note: property declared here
32 | open var particleRotation: CGFloat { get set }
33 | open var particleRotationRange: CGFloat { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/OctopusUtility+Graphics.swift:29:17: warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 | }
20 |
21 | public static func runOneShotEmitter(emitter: SKEmitterNode, withDuration duration: CGFloat) {
| `- note: add '@MainActor' to make static method 'runOneShotEmitter(emitter:withDuration:)' part of global actor 'MainActor'
22 | // CREDIT: Apple Adventure Sample
23 | let waitAction = SKAction.wait(forDuration: TimeInterval(duration))
:
27 |
28 | let sequence = [waitAction, birthRateSet, waitAction2, removeAction] // Correction: var changed to let
29 | emitter.run(SKAction.sequence(sequence))
| `- warning: call to main actor-isolated instance method 'run' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 |
SpriteKit.SKNode:80:26: note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
78 | open func objectForKeyedSubscript(_ name: String) -> [SKNode]
79 | open func inParentHierarchy(_ parent: SKNode) -> Bool
80 | @MainActor open func run(_ action: SKAction)
| `- note: calls to instance method 'run' from outside of its actor context are implicitly asynchronous
81 | @available(swift, obsoleted: 3, renamed: "run(_:)")
82 | open func runAction(_ action: SKAction)
SpriteKit.SKNode:36:14: warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
34 | open var parent: SKNode? { get }
35 | open var children: [SKNode] { get }
36 | open var name: String? { get set }
| `- warning: main actor-isolated property 'name' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
37 | open var scene: SKScene? { get }
38 | open var physicsBody: SKPhysicsBody? { get set }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Support & Utility/Protocols/Nameable.swift:18:19: note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
12 | /// A protocol for types that have a `name` property.
13 | public protocol Nameable {
14 | var name: String? { get }
| `- note: 'name' declared here
15 | }
16 |
17 | extension OctopusEntity: Nameable {}
18 | extension SKNode: Nameable {}
| `- note: add '@preconcurrency' to the 'Nameable' conformance to defer isolation checking to run time
19 |
20 | extension Array where Array.Element: Nameable {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:101:38: warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
57 |
58 | /// Encapsulates an `OctopusViewController` to present SpriteKit/SceneKit/Metal content in a SwiftUI view hierarchy.
59 | public struct OctopusViewControllerRepresentable <OctopusGameCoordinatorType, OctopusViewControllerType> : NSViewControllerRepresentable
| `- note: 'OctopusViewControllerType' previously declared here
60 | where OctopusGameCoordinatorType: OctopusGameCoordinator,
61 | OctopusViewControllerType: OctopusViewController
:
99 | public extension OctopusViewControllerRepresentable { // CHECK: Should this be public?
100 |
101 | class ViewControllerCoordinator <OctopusViewControllerType> : NSObject
| `- warning: generic parameter 'OctopusViewControllerType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
102 | where OctopusViewControllerType: OctopusViewController
103 | {
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| `- warning: call to main actor-isolated initializer 'init(gameCoordinator:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
108 | super.init()
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/Core/Launch/OctopusViewController.swift:64:21: note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
62 | // MARK: - Life Cycle
63 |
64 | public required init(gameCoordinator: OctopusGameCoordinator? = nil) throws {
| `- note: calls to initializer 'init(gameCoordinator:)' from outside of its actor context are implicitly asynchronous
65 |
66 | // To support easy SwiftUI usage...
/Users/admin/builder/spi-builder-workspace/Sources/OctopusKit/SwiftUI/OctopusViewControllerRepresentable.swift:107:40: warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
105 |
106 | init(gameCoordinator: OctopusGameCoordinator) {
107 | self.viewController = try! OctopusViewControllerType(gameCoordinator: gameCoordinator)
| |- warning: sending 'gameCoordinator.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'gameCoordinator.some' to main actor-isolated initializer 'init(gameCoordinator:)' risks causing data races between main actor-isolated and task-isolated uses
108 | super.init()
109 | }
BUILD FAILURE 6.0 macosSpm