Build Information
Successful build of OneFingerRotation, reference v1.2.1 (1a1c58
), with Swift 6.1 for macOS (SPM) on 30 Apr 2025 07:39:14 UTC.
Swift 6 data race errors: 9
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.61.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mttfntn/OneFingerRotation.git
Reference: v1.2.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mttfntn/OneFingerRotation
* tag v1.2.1 -> FETCH_HEAD
HEAD is now at 1a1c586 Update README.md
Cloned https://github.com/mttfntn/OneFingerRotation.git
Revision (git rev-parse @):
1a1c586f9f58d18bceefed97a0ec49fa732add3e
SUCCESS checkout https://github.com/mttfntn/OneFingerRotation.git at v1.2.1
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/mttfntn/OneFingerRotation.git
https://github.com/mttfntn/OneFingerRotation.git
{
"dependencies" : [
],
"manifest_display_name" : "OneFingerRotation",
"name" : "OneFingerRotation",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "watchos",
"version" : "7.0"
}
],
"products" : [
{
"name" : "OneFingerRotation",
"targets" : [
"OneFingerRotation"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "OneFingerRotationTests",
"module_type" : "SwiftTarget",
"name" : "OneFingerRotationTests",
"path" : "Tests/OneFingerRotationTests",
"sources" : [
"OneFingerRotationTests.swift"
],
"target_dependencies" : [
"OneFingerRotation"
],
"type" : "test"
},
{
"c99name" : "OneFingerRotation",
"module_type" : "SwiftTarget",
"name" : "OneFingerRotation",
"path" : "Sources/OneFingerRotation",
"product_memberships" : [
"OneFingerRotation"
],
"sources" : [
"OneFingerRotation.swift",
"Version 1.0/AutoRotation.swift",
"Version 1.0/KnobInertia.swift",
"Version 1.0/KnobRotation.swift",
"Version 1.0/ValueAutoRotation.swift",
"Version 1.0/ValueAutoRotationInertia.swift",
"Version 1.0/ValueRotation.swift",
"Version 1.0/ValueRotationInertia.swift",
"Version 2.0/SimpleRotation.swift",
"Version 2.0/simpleRotationInertia.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/12] Compiling OneFingerRotation ValueRotationInertia.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:189:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
187 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
188 | struct FrameSizeKeyValueRotationInertia: PreferenceKey {
189 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
190 |
191 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:141:71: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
139 | timer?.invalidate()
140 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
141 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:141:87: warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
24 | @Binding var totalAngle: Double
25 | @State private var previousAngle: Double = 0
26 | @State private var rotationDirection: Double = 1
| `- note: property declared here
27 | /// Initialization of three declarable and optional values.
28 | public init(
:
139 | timer?.invalidate()
140 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
141 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:142:37: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
140 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
141 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
142 | rotationAngle += angle
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
143 | onAngleChanged(rotationAngle.degrees)
144 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:143:37: warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
21 | @State private var isDragged: Bool = false
22 | let rotationThreshold: CGFloat = 12.0
23 | var onAngleChanged: (Double) -> Void
| `- note: property declared here
24 | @Binding var totalAngle: Double
25 | @State private var previousAngle: Double = 0
:
141 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
| `- warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
144 | lastVelocity *= (1 - friction)
145 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:143:52: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
141 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
144 | lastVelocity *= (1 - friction)
145 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:144:37: warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: mutation of this property is only permitted within the actor
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
144 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
145 | if lastVelocity < 0.1 {
146 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:144:58: warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
16 | @Binding var friction: CGFloat
| `- note: property declared here
17 | @Binding var stoppingAnimation: Bool
18 | @Binding var velocityMultiplier: CGFloat
:
142 | rotationAngle += angle
143 | onAngleChanged(rotationAngle.degrees)
144 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
145 | if lastVelocity < 0.1 {
146 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:145:40: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
143 | onAngleChanged(rotationAngle.degrees)
144 | lastVelocity *= (1 - friction)
145 | if lastVelocity < 0.1 {
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
146 | timer.invalidate()
147 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:147:41: warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
14 | @State private var isSpinning = false
| `- note: mutation of this property is only permitted within the actor
15 | @State private var timer: Timer?
16 | @Binding var friction: CGFloat
:
145 | if lastVelocity < 0.1 {
146 | timer.invalidate()
147 | isSpinning = false
| `- warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
148 | }
149 | }
[4/12] Compiling OneFingerRotation KnobRotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobRotation.swift:107:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 |
106 | struct FrameSizeKeyKnobRotation: PreferenceKey {
107 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
108 |
109 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
[5/12] Compiling OneFingerRotation SimpleRotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/SimpleRotation.swift:72:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | struct FrameSizeKeySimpleRotation: PreferenceKey {
72 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
[6/12] Emitting module OneFingerRotation
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:96:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | struct FrameSizeKeyAutoRotation: PreferenceKey {
96 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
97 |
98 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:223:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
221 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
222 | struct FrameSizeKeyKnobInertia: PreferenceKey {
223 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
224 |
225 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobRotation.swift:107:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
105 |
106 | struct FrameSizeKeyKnobRotation: PreferenceKey {
107 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
108 |
109 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:148:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | struct FrameSizeKeyValueAutoRotation: PreferenceKey {
148 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:227:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
225 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
226 | struct FrameSizeKeyValueAutoRotationInertia: PreferenceKey {
227 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
228 |
229 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotation.swift:90:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
88 |
89 | struct FrameSizeKeyValueRotation: PreferenceKey {
90 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
91 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
92 | value = nextValue()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotationInertia.swift:189:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
187 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
188 | struct FrameSizeKeyValueRotationInertia: PreferenceKey {
189 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
190 |
191 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/SimpleRotation.swift:72:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | struct FrameSizeKeySimpleRotation: PreferenceKey {
72 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:197:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
195 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
196 | struct FrameSizeKeySimpleRotationInertia: PreferenceKey {
197 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
198 |
199 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
[7/12] Compiling OneFingerRotation ValueAutoRotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:148:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | struct FrameSizeKeyValueAutoRotation: PreferenceKey {
148 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:41:37: warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 | @State private var fullRotations: Int = 0
18 | // Add new properties for auto rotation
19 | @Binding var autoRotationSpeed: Double
| `- note: property declared here
20 | @Binding var autoRotationEnabled: Bool
21 | @State private var autoRotationTimer: Timer? = nil
:
39 | guard autoRotationEnabled, autoRotationTimer == nil else { return }
40 | autoRotationTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60.0, repeats: true) { _ in
41 | let deltaRotation = autoRotationSpeed / 60.0
| `- warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
42 | let newRotation = rotationAngle.degrees + deltaRotation
43 | rotationAngle = Angle(degrees: newRotation)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:42:35: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotation: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
12 | @State private var previousAngle: Double = 0
13 | @Binding var totalAngle: Double
:
40 | autoRotationTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60.0, repeats: true) { _ in
41 | let deltaRotation = autoRotationSpeed / 60.0
42 | let newRotation = rotationAngle.degrees + deltaRotation
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
43 | rotationAngle = Angle(degrees: newRotation)
44 | totalAngle = newRotation + Double(fullRotations) * 360
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:43:17: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotation: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
12 | @State private var previousAngle: Double = 0
13 | @Binding var totalAngle: Double
:
41 | let deltaRotation = autoRotationSpeed / 60.0
42 | let newRotation = rotationAngle.degrees + deltaRotation
43 | rotationAngle = Angle(degrees: newRotation)
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
44 | totalAngle = newRotation + Double(fullRotations) * 360
45 | onAngleChanged(newRotation + Double(fullRotations) * 360)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:44:17: warning: main actor-isolated property 'totalAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @State private var previousAngle: Double = 0
13 | @Binding var totalAngle: Double
| `- note: mutation of this property is only permitted within the actor
14 | var onAngleChanged: (Double) -> Void
15 | var animation: Animation?
:
42 | let newRotation = rotationAngle.degrees + deltaRotation
43 | rotationAngle = Angle(degrees: newRotation)
44 | totalAngle = newRotation + Double(fullRotations) * 360
| `- warning: main actor-isolated property 'totalAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
45 | onAngleChanged(newRotation + Double(fullRotations) * 360)
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:44:51: warning: main actor-isolated property 'fullRotations' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
15 | var animation: Animation?
16 | @State private var isDragged: Bool = false
17 | @State private var fullRotations: Int = 0
| `- note: property declared here
18 | // Add new properties for auto rotation
19 | @Binding var autoRotationSpeed: Double
:
42 | let newRotation = rotationAngle.degrees + deltaRotation
43 | rotationAngle = Angle(degrees: newRotation)
44 | totalAngle = newRotation + Double(fullRotations) * 360
| `- warning: main actor-isolated property 'fullRotations' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
45 | onAngleChanged(newRotation + Double(fullRotations) * 360)
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:45:17: warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
12 | @State private var previousAngle: Double = 0
13 | @Binding var totalAngle: Double
14 | var onAngleChanged: (Double) -> Void
| `- note: property declared here
15 | var animation: Animation?
16 | @State private var isDragged: Bool = false
:
43 | rotationAngle = Angle(degrees: newRotation)
44 | totalAngle = newRotation + Double(fullRotations) * 360
45 | onAngleChanged(newRotation + Double(fullRotations) * 360)
| `- warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
46 | }
47 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotation.swift:45:53: warning: main actor-isolated property 'fullRotations' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
15 | var animation: Animation?
16 | @State private var isDragged: Bool = false
17 | @State private var fullRotations: Int = 0
| `- note: property declared here
18 | // Add new properties for auto rotation
19 | @Binding var autoRotationSpeed: Double
:
43 | rotationAngle = Angle(degrees: newRotation)
44 | totalAngle = newRotation + Double(fullRotations) * 360
45 | onAngleChanged(newRotation + Double(fullRotations) * 360)
| `- warning: main actor-isolated property 'fullRotations' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
46 | }
47 | }
[8/12] Compiling OneFingerRotation ValueRotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueRotation.swift:90:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
88 |
89 | struct FrameSizeKeyValueRotation: PreferenceKey {
90 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
91 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
92 | value = nextValue()
[9/12] Compiling OneFingerRotation ValueAutoRotationInertia.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:227:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
225 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
226 | struct FrameSizeKeyValueAutoRotationInertia: PreferenceKey {
227 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
228 |
229 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:56:37: warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
25 | @State private var previousAngle: Double = 0
26 | @State private var rotationDirection: Double = 1
27 | @Binding var autoRotationSpeed: Double
| `- note: property declared here
28 | @Binding var autoRotationEnabled: Bool
29 | @State private var autoRotationTimer: Timer? = nil
:
54 | guard autoRotationEnabled, autoRotationTimer == nil else { return }
55 | autoRotationTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60.0, repeats: true) { _ in
56 | let deltaRotation = autoRotationSpeed / 60.0
| `- warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | let newRotation = rotationAngle.degrees + deltaRotation
58 | rotationAngle = Angle(degrees: newRotation)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:57:35: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
55 | autoRotationTimer = Timer.scheduledTimer(withTimeInterval: 1.0 / 60.0, repeats: true) { _ in
56 | let deltaRotation = autoRotationSpeed / 60.0
57 | let newRotation = rotationAngle.degrees + deltaRotation
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
58 | rotationAngle = Angle(degrees: newRotation)
59 | totalAngle = newRotation //+ Double(totalAngle) * 360
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:58:17: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
56 | let deltaRotation = autoRotationSpeed / 60.0
57 | let newRotation = rotationAngle.degrees + deltaRotation
58 | rotationAngle = Angle(degrees: newRotation)
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
59 | totalAngle = newRotation //+ Double(totalAngle) * 360
60 | onAngleChanged(newRotation) //+ Double(totalAngle) * 360)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:59:17: warning: main actor-isolated property 'totalAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
22 | let rotationThreshold: CGFloat = 12.0
23 | var onAngleChanged: (Double) -> Void
24 | @Binding var totalAngle: Double
| `- note: mutation of this property is only permitted within the actor
25 | @State private var previousAngle: Double = 0
26 | @State private var rotationDirection: Double = 1
:
57 | let newRotation = rotationAngle.degrees + deltaRotation
58 | rotationAngle = Angle(degrees: newRotation)
59 | totalAngle = newRotation //+ Double(totalAngle) * 360
| `- warning: main actor-isolated property 'totalAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
60 | onAngleChanged(newRotation) //+ Double(totalAngle) * 360)
61 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:60:17: warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
21 | @State private var isDragged: Bool = false
22 | let rotationThreshold: CGFloat = 12.0
23 | var onAngleChanged: (Double) -> Void
| `- note: property declared here
24 | @Binding var totalAngle: Double
25 | @State private var previousAngle: Double = 0
:
58 | rotationAngle = Angle(degrees: newRotation)
59 | totalAngle = newRotation //+ Double(totalAngle) * 360
60 | onAngleChanged(newRotation) //+ Double(totalAngle) * 360)
| `- warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
61 | }
62 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:168:71: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
166 | timer?.invalidate()
167 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
168 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:168:87: warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
24 | @Binding var totalAngle: Double
25 | @State private var previousAngle: Double = 0
26 | @State private var rotationDirection: Double = 1
| `- note: property declared here
27 | @Binding var autoRotationSpeed: Double
28 | @Binding var autoRotationEnabled: Bool
:
166 | timer?.invalidate()
167 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
168 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:169:37: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
167 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
168 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
169 | rotationAngle += angle
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
170 | onAngleChanged(rotationAngle.degrees)
171 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:170:37: warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
21 | @State private var isDragged: Bool = false
22 | let rotationThreshold: CGFloat = 12.0
23 | var onAngleChanged: (Double) -> Void
| `- note: property declared here
24 | @Binding var totalAngle: Double
25 | @State private var previousAngle: Double = 0
:
168 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
| `- warning: main actor-isolated property 'onAngleChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
171 | lastVelocity *= (1 - friction)
172 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:170:52: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
9 |
10 | public struct ValueAutoRotationInertia: ViewModifier {
11 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
:
168 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
171 | lastVelocity *= (1 - friction)
172 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:171:37: warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: mutation of this property is only permitted within the actor
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
171 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
172 | if lastVelocity < 0.1 {
173 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:171:58: warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
16 | @Binding var friction: CGFloat
| `- note: property declared here
17 | @Binding var stoppingAnimation: Bool
18 | @Binding var velocityMultiplier: CGFloat
:
169 | rotationAngle += angle
170 | onAngleChanged(rotationAngle.degrees)
171 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
172 | if lastVelocity < 0.1 {
173 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:172:40: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @State private var rotationAngle: Angle = .degrees(0)
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
14 | @State private var isSpinning = false
15 | @State private var timer: Timer?
:
170 | onAngleChanged(rotationAngle.degrees)
171 | lastVelocity *= (1 - friction)
172 | if lastVelocity < 0.1 {
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
173 | timer.invalidate()
174 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/ValueAutoRotationInertia.swift:174:41: warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
12 | @GestureState private var gestureRotation: Angle = .zero
13 | @State private var lastVelocity: CGFloat = 0
14 | @State private var isSpinning = false
| `- note: mutation of this property is only permitted within the actor
15 | @State private var timer: Timer?
16 | @Binding var friction: CGFloat
:
172 | if lastVelocity < 0.1 {
173 | timer.invalidate()
174 | isSpinning = false
| `- warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
175 | }
176 | }
[10/12] Compiling OneFingerRotation AutoRotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:96:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
94 |
95 | struct FrameSizeKeyAutoRotation: PreferenceKey {
96 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
97 |
98 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:23:16: warning: main actor-isolated property 'autoRotationActive' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
16 |
17 | @Binding var autoRotationSpeed: Double
18 | @Binding var autoRotationActive: Bool
| `- note: property declared here
19 | @State private var viewSize: CGSize = .zero
20 |
21 | var timer: Timer {
22 | Timer.scheduledTimer(withTimeInterval: 1 / 60, repeats: true) { _ in
23 | if autoRotationActive && gestureRotation == .zero {
| `- warning: main actor-isolated property 'autoRotationActive' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
24 | rotationAngle = rotationAngle + Angle(degrees: autoRotationSpeed / 60)
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:23:38: warning: main actor-isolated property 'gestureRotation' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
13 | @State private var rotationAngle: Angle = .zero
14 | ///Variable for the calculation of the gesture Angle
15 | @GestureState private var gestureRotation: Angle = .zero
| `- note: property declared here
16 |
17 | @Binding var autoRotationSpeed: Double
:
21 | var timer: Timer {
22 | Timer.scheduledTimer(withTimeInterval: 1 / 60, repeats: true) { _ in
23 | if autoRotationActive && gestureRotation == .zero {
| `- warning: main actor-isolated property 'gestureRotation' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
24 | rotationAngle = rotationAngle + Angle(degrees: autoRotationSpeed / 60)
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:24:17: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | public struct AutoRotation: ViewModifier {
12 | ///Variable for general rotationAngle, which calculates the initial angle of the content.
13 | @State private var rotationAngle: Angle = .zero
| `- note: mutation of this property is only permitted within the actor
14 | ///Variable for the calculation of the gesture Angle
15 | @GestureState private var gestureRotation: Angle = .zero
:
22 | Timer.scheduledTimer(withTimeInterval: 1 / 60, repeats: true) { _ in
23 | if autoRotationActive && gestureRotation == .zero {
24 | rotationAngle = rotationAngle + Angle(degrees: autoRotationSpeed / 60)
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
25 | }
26 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:24:33: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | public struct AutoRotation: ViewModifier {
12 | ///Variable for general rotationAngle, which calculates the initial angle of the content.
13 | @State private var rotationAngle: Angle = .zero
| `- note: property declared here
14 | ///Variable for the calculation of the gesture Angle
15 | @GestureState private var gestureRotation: Angle = .zero
:
22 | Timer.scheduledTimer(withTimeInterval: 1 / 60, repeats: true) { _ in
23 | if autoRotationActive && gestureRotation == .zero {
24 | rotationAngle = rotationAngle + Angle(degrees: autoRotationSpeed / 60)
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
25 | }
26 | }
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/AutoRotation.swift:24:64: warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
15 | @GestureState private var gestureRotation: Angle = .zero
16 |
17 | @Binding var autoRotationSpeed: Double
| `- note: property declared here
18 | @Binding var autoRotationActive: Bool
19 | @State private var viewSize: CGSize = .zero
:
22 | Timer.scheduledTimer(withTimeInterval: 1 / 60, repeats: true) { _ in
23 | if autoRotationActive && gestureRotation == .zero {
24 | rotationAngle = rotationAngle + Angle(degrees: autoRotationSpeed / 60)
| `- warning: main actor-isolated property 'autoRotationSpeed' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
25 | }
26 | }
[11/12] Compiling OneFingerRotation OneFingerRotation.swift
[12/13] Compiling OneFingerRotation KnobInertia.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:223:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
221 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
222 | struct FrameSizeKeyKnobInertia: PreferenceKey {
223 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
224 |
225 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:161:71: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
:
159 | timer?.invalidate()
160 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
161 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
162 | let newRotationAngle = rotationAngle + angle
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:161:87: warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
27 | @State var totalAngle: Double
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
| `- note: property declared here
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
:
159 | timer?.invalidate()
160 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
161 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
162 | let newRotationAngle = rotationAngle + angle
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:162:60: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
:
160 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
161 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
162 | let newRotationAngle = rotationAngle + angle
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
164 | if abs(newRotationAngle.degrees - clampedAngle) > 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:163:64: warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
161 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
162 | let newRotationAngle = rotationAngle + angle
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
164 | if abs(newRotationAngle.degrees - clampedAngle) > 0.1 {
165 | let deceleration = 0.2 * rotationDirection
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:163:101: warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
| `- note: property declared here
32 |
33 |
:
161 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
162 | let newRotationAngle = rotationAngle + angle
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
| `- warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
164 | if abs(newRotationAngle.degrees - clampedAngle) > 0.1 {
165 | let deceleration = 0.2 * rotationDirection
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:165:66: warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
27 | @State var totalAngle: Double
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
| `- note: property declared here
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
:
163 | let clampedAngle = min(max(minAngle, newRotationAngle.degrees), maxAngle)
164 | if abs(newRotationAngle.degrees - clampedAngle) > 0.1 {
165 | let deceleration = 0.2 * rotationDirection
| `- warning: main actor-isolated property 'rotationDirection' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:166:41: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
:
164 | if abs(newRotationAngle.degrees - clampedAngle) > 0.1 {
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
168 | onKnobValueChanged(knobValue)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:167:41: warning: main actor-isolated property 'knobValue' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
14 | @Binding var knobValue: Double
| `- note: mutation of this property is only permitted within the actor
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
:
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'knobValue' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:167:54: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
:
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:167:78: warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:167:91: warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
| `- note: property declared here
32 |
33 |
:
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:167:102: warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
165 | let deceleration = 0.2 * rotationDirection
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:168:41: warning: main actor-isolated property 'onKnobValueChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
24 | @State private var isDragged: Bool = false
25 | let rotationThreshold: CGFloat = 12.0
26 | var onKnobValueChanged: (Double) -> Void
| `- note: property declared here
27 | @State var totalAngle: Double
28 | @State private var previousAngle: Double = 0
:
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
168 | onKnobValueChanged(knobValue)
| `- warning: main actor-isolated property 'onKnobValueChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
169 | lastVelocity *= (1 - friction)
170 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:168:60: warning: main actor-isolated property 'knobValue' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
14 | @Binding var knobValue: Double
| `- note: property declared here
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
:
166 | rotationAngle = Angle(degrees: clampedAngle + deceleration)
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
168 | onKnobValueChanged(knobValue)
| `- warning: main actor-isolated property 'knobValue' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
169 | lastVelocity *= (1 - friction)
170 | if lastVelocity < 0.1 {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:169:41: warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
| `- note: mutation of this property is only permitted within the actor
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
:
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
170 | if lastVelocity < 0.1 {
171 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:169:62: warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
19 | @Binding var friction: CGFloat
| `- note: property declared here
20 | @Binding var stoppingAnimation: Bool
21 | @Binding var velocityMultiplier: CGFloat
:
167 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
170 | if lastVelocity < 0.1 {
171 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:170:44: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
:
168 | onKnobValueChanged(knobValue)
169 | lastVelocity *= (1 - friction)
170 | if lastVelocity < 0.1 {
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
171 | timer.invalidate()
172 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:172:45: warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
17 | @State private var isSpinning = false
| `- note: mutation of this property is only permitted within the actor
18 | @State private var timer: Timer?
19 | @Binding var friction: CGFloat
:
170 | if lastVelocity < 0.1 {
171 | timer.invalidate()
172 | isSpinning = false
| `- warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
173 | }
174 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:175:41: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: mutation of this property is only permitted within the actor
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
:
173 | }
174 | } else {
175 | rotationAngle = newRotationAngle
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
177 | onKnobValueChanged(knobValue)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:176:41: warning: main actor-isolated property 'knobValue' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
14 | @Binding var knobValue: Double
| `- note: mutation of this property is only permitted within the actor
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
:
174 | } else {
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'knobValue' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:176:54: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
| `- note: property declared here
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
:
174 | } else {
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:176:78: warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
174 | } else {
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:176:91: warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
| `- note: property declared here
32 |
33 |
:
174 | } else {
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'maxAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:176:102: warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
174 | } else {
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:177:41: warning: main actor-isolated property 'onKnobValueChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
24 | @State private var isDragged: Bool = false
25 | let rotationThreshold: CGFloat = 12.0
26 | var onKnobValueChanged: (Double) -> Void
| `- note: property declared here
27 | @State var totalAngle: Double
28 | @State private var previousAngle: Double = 0
:
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
177 | onKnobValueChanged(knobValue)
| `- warning: main actor-isolated property 'onKnobValueChanged' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
178 | lastVelocity *= (1 - friction)
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:177:60: warning: main actor-isolated property 'knobValue' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
12 |
13 | @State private var rotationAngle: Angle = .degrees(0)
14 | @Binding var knobValue: Double
| `- note: property declared here
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
:
175 | rotationAngle = newRotationAngle
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
177 | onKnobValueChanged(knobValue)
| `- warning: main actor-isolated property 'knobValue' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
178 | lastVelocity *= (1 - friction)
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:178:41: warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
| `- note: mutation of this property is only permitted within the actor
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
:
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
180 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:178:62: warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
19 | @Binding var friction: CGFloat
| `- note: property declared here
20 | @Binding var stoppingAnimation: Bool
21 | @Binding var velocityMultiplier: CGFloat
:
176 | knobValue = (rotationAngle.degrees - minAngle) / (maxAngle - minAngle) // Update knobValue here
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
180 | timer.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:179:44: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
14 | @Binding var knobValue: Double
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
17 | @State private var isSpinning = false
18 | @State private var timer: Timer?
:
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
180 | timer.invalidate()
181 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:179:94: warning: main actor-isolated property 'minAngle' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
28 | @State private var previousAngle: Double = 0
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
| `- note: property declared here
31 | @State var maxAngle: Double
32 |
:
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
| `- warning: main actor-isolated property 'minAngle' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
180 | timer.invalidate()
181 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:179:133: warning: main actor-isolated property 'maxAngle' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
29 | @State private var rotationDirection: Double = 1
30 | @State var minAngle: Double
31 | @State var maxAngle: Double
| `- note: property declared here
32 |
33 |
:
177 | onKnobValueChanged(knobValue)
178 | lastVelocity *= (1 - friction)
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
| `- warning: main actor-isolated property 'maxAngle' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
180 | timer.invalidate()
181 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 1.0/KnobInertia.swift:181:45: warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
15 | @GestureState private var gestureRotation: Angle = .zero
16 | @State private var lastVelocity: CGFloat = 0
17 | @State private var isSpinning = false
| `- note: mutation of this property is only permitted within the actor
18 | @State private var timer: Timer?
19 | @Binding var friction: CGFloat
:
179 | if lastVelocity < 0.1 || (newRotationAngle.degrees < minAngle || newRotationAngle.degrees > maxAngle) {
180 | timer.invalidate()
181 | isSpinning = false
| `- warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
182 | }
183 | }
[13/13] Compiling OneFingerRotation simpleRotationInertia.swift
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:197:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
195 | /// This PreferenceKey is necessary for the calculation of the frame width and height of the content.
196 | struct FrameSizeKeySimpleRotationInertia: PreferenceKey {
197 | static var defaultValue: CGSize = .zero
| |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
198 |
199 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:107:71: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 |
18 | /// Variable for the last speed of the finger on the screen.
19 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
20 |
21 | /// Variable to check if the Fidget Spinner is spinning.
:
105 | timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { timer in
106 | let rotationDirection = angleDifference >= .zero ? 1.0 : -1.0
107 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
108 | rotationAngle += angle
109 | lastVelocity *= (1 - friction)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:108:37: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 | /// Variable for the angle of rotation of the Fidget Spinner.
13 | @State private var rotationAngle: Angle = .degrees(0.0)
| `- note: mutation of this property is only permitted within the actor
14 |
15 | /// Variable for the gesture rotation.
:
106 | let rotationDirection = angleDifference >= .zero ? 1.0 : -1.0
107 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
108 | rotationAngle += angle
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
109 | lastVelocity *= (1 - friction)
110 |
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:109:37: warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
17 |
18 | /// Variable for the last speed of the finger on the screen.
19 | @State private var lastVelocity: CGFloat = 0
| `- note: mutation of this property is only permitted within the actor
20 |
21 | /// Variable to check if the Fidget Spinner is spinning.
:
107 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
108 | rotationAngle += angle
109 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'lastVelocity' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
110 |
111 | if let snap = angleSnap {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:109:58: warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
26 |
27 | /// Variable for friction, useful for slider, value should have an interval from 0.000 to 1.000.
28 | @Binding var friction: CGFloat
| `- note: property declared here
29 |
30 | /// Velocity multiplier, stock value should be 0.1, value should range from 0.0 to 1.0.
:
107 | let angle = Angle(degrees: Double(lastVelocity) * rotationDirection)
108 | rotationAngle += angle
109 | lastVelocity *= (1 - friction)
| `- warning: main actor-isolated property 'friction' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
110 |
111 | if let snap = angleSnap {
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:111:51: warning: main actor-isolated property 'angleSnap' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
42 | let rotationThreshold: CGFloat = 12.0
43 |
44 | @Binding private var angleSnap: Double?
| `- note: property declared here
45 |
46 |
:
109 | lastVelocity *= (1 - friction)
110 |
111 | if let snap = angleSnap {
| `- warning: main actor-isolated property 'angleSnap' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:112:41: warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 | /// Variable for the angle of rotation of the Fidget Spinner.
13 | @State private var rotationAngle: Angle = .degrees(0.0)
| `- note: mutation of this property is only permitted within the actor
14 |
15 | /// Variable for the gesture rotation.
:
110 |
111 | if let snap = angleSnap {
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
| `- warning: main actor-isolated property 'rotationAngle' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
114 | })
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:112:57: warning: call to main actor-isolated instance method 'snapToAngle(_:snap:velocity:animation:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
110 |
111 | if let snap = angleSnap {
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
| `- warning: call to main actor-isolated instance method 'snapToAngle(_:snap:velocity:animation:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
114 | })
:
168 | }
169 |
170 | private func snapToAngle(_ angle: Angle, snap: Double, velocity: CGFloat, animation: ((_ interpolationFactor: Double) -> Double)? = nil) -> Angle {
| |- note: calls to instance method 'snapToAngle(_:snap:velocity:animation:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'ViewModifier'
171 | let angleInDegrees = angle.degrees
172 | let snappedAngle = round(angleInDegrees / snap) * snap
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:112:69: warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 |
12 | /// Variable for the angle of rotation of the Fidget Spinner.
13 | @State private var rotationAngle: Angle = .degrees(0.0)
| `- note: property declared here
14 |
15 | /// Variable for the gesture rotation.
:
110 |
111 | if let snap = angleSnap {
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
| `- warning: main actor-isolated property 'rotationAngle' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
114 | })
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:112:106: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 |
18 | /// Variable for the last speed of the finger on the screen.
19 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
20 |
21 | /// Variable to check if the Fidget Spinner is spinning.
:
110 |
111 | if let snap = angleSnap {
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
114 | })
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:113:77: warning: main actor-isolated property 'angleSnapShowFactor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
34 | @Binding var decelerationFactor: Double
35 |
36 | @Binding var angleSnapShowFactor: Double
| `- note: property declared here
37 |
38 | /// viewSize is needed for the calculation of the Width and Height of the View.
:
111 | if let snap = angleSnap {
112 | rotationAngle = snapToAngle(rotationAngle, snap: snap, velocity: lastVelocity, animation: { interpolationFactor in
113 | return pow(interpolationFactor, angleSnapShowFactor*2)
| `- warning: main actor-isolated property 'angleSnapShowFactor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
114 | })
115 |
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:118:40: warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
17 |
18 | /// Variable for the last speed of the finger on the screen.
19 | @State private var lastVelocity: CGFloat = 0
| `- note: property declared here
20 |
21 | /// Variable to check if the Fidget Spinner is spinning.
:
116 | }
117 |
118 | if lastVelocity < 0.1 {
| `- warning: main actor-isolated property 'lastVelocity' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
119 | timer.invalidate()
120 | isSpinning = false
/Users/admin/builder/spi-builder-workspace/Sources/OneFingerRotation/Version 2.0/simpleRotationInertia.swift:120:41: warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
20 |
21 | /// Variable to check if the Fidget Spinner is spinning.
22 | @State private var isSpinning = false
| `- note: mutation of this property is only permitted within the actor
23 |
24 | /// Variable for the timer of the spinning action.
:
118 | if lastVelocity < 0.1 {
119 | timer.invalidate()
120 | isSpinning = false
| `- warning: main actor-isolated property 'isSpinning' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
121 | }
122 | }
Build complete! (11.30s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "OneFingerRotation",
"name" : "OneFingerRotation",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "watchos",
"version" : "7.0"
}
],
"products" : [
{
"name" : "OneFingerRotation",
"targets" : [
"OneFingerRotation"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "OneFingerRotationTests",
"module_type" : "SwiftTarget",
"name" : "OneFingerRotationTests",
"path" : "Tests/OneFingerRotationTests",
"sources" : [
"OneFingerRotationTests.swift"
],
"target_dependencies" : [
"OneFingerRotation"
],
"type" : "test"
},
{
"c99name" : "OneFingerRotation",
"module_type" : "SwiftTarget",
"name" : "OneFingerRotation",
"path" : "Sources/OneFingerRotation",
"product_memberships" : [
"OneFingerRotation"
],
"sources" : [
"OneFingerRotation.swift",
"Version 1.0/AutoRotation.swift",
"Version 1.0/KnobInertia.swift",
"Version 1.0/KnobRotation.swift",
"Version 1.0/ValueAutoRotation.swift",
"Version 1.0/ValueAutoRotationInertia.swift",
"Version 1.0/ValueRotation.swift",
"Version 1.0/ValueRotationInertia.swift",
"Version 2.0/SimpleRotation.swift",
"Version 2.0/simpleRotationInertia.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Done.