diff --git a/Package.swift b/Package.swift index 9fbee3f..9b02aad 100644 --- a/Package.swift +++ b/Package.swift @@ -49,9 +49,9 @@ let package = Package( ] ) -//for target in package.targets where target.type != .system { -// target.swiftSettings = target.swiftSettings ?? [] -// target.swiftSettings?.append(contentsOf: [ -// .enableExperimentalFeature("StrictConcurrency"), -// ]) -//} +for target in package.targets where target.type != .system { + target.swiftSettings = target.swiftSettings ?? [] + target.swiftSettings?.append(contentsOf: [ + .enableExperimentalFeature("StrictConcurrency"), + ]) +} diff --git a/Sources/Perception/Perceptible.swift b/Sources/Perception/Perceptible.swift index 4865dd0..2358822 100644 --- a/Sources/Perception/Perceptible.swift +++ b/Sources/Perception/Perceptible.swift @@ -16,24 +16,8 @@ /// type doesn't add observation functionality to the type. Instead, always use /// the ``Perception/Perceptible()`` macro when adding observation /// support to a type. -@available( - iOS, - deprecated: 17, - renamed: "Observable" -) -@available( - macOS, - deprecated: 14, - renamed: "Observable" -) -@available( - watchOS, - deprecated: 10, - renamed: "Observable" -) -@available( - tvOS, - deprecated: 17, - renamed: "Observable" -) +@available(iOS, deprecated: 17, renamed: "Observable") +@available(macOS, deprecated: 14, renamed: "Observable") +@available(watchOS, deprecated: 10, renamed: "Observable") +@available(tvOS, deprecated: 17, renamed: "Observable") public protocol Perceptible {} diff --git a/Sources/Perception/PerceptionChecking.swift b/Sources/Perception/PerceptionChecking.swift index db096e1..11fa73e 100644 --- a/Sources/Perception/PerceptionChecking.swift +++ b/Sources/Perception/PerceptionChecking.swift @@ -12,50 +12,29 @@ import Foundation /// app. However, the checks can sometimes be costly and slow down your app in development. If /// you wish to fully disable the checks, you can set this boolean to `false.` @available( - iOS, - deprecated: 17, - message: "'isPerceptionCheckingEnabled' is no longer needed in iOS 17+" + iOS, deprecated: 17, message: "'isPerceptionCheckingEnabled' is no longer needed in iOS 17+" ) @available( - macOS, - deprecated: 14, - message: "'isPerceptionCheckingEnabled' is no longer needed in macOS 14+" + macOS, deprecated: 14, message: "'isPerceptionCheckingEnabled' is no longer needed in macOS 14+" ) @available( - watchOS, - deprecated: 10, + watchOS, deprecated: 10, message: "'isPerceptionCheckingEnabled' is no longer needed in watchOS 10+" ) @available( - tvOS, - deprecated: 17, - message: "'isPerceptionCheckingEnabled' is no longer needed in tvOS 17+" + tvOS, deprecated: 17, message: "'isPerceptionCheckingEnabled' is no longer needed in tvOS 17+" ) public var isPerceptionCheckingEnabled: Bool { get { perceptionChecking.isPerceptionCheckingEnabled } set { perceptionChecking.isPerceptionCheckingEnabled = newValue } } +@available(iOS, deprecated: 17, message: "'_PerceptionLocals' is no longer needed in iOS 17+") +@available(macOS, deprecated: 14, message: "'_PerceptionLocals' is no longer needed in macOS 14+") @available( - iOS, - deprecated: 17, - message: "'_PerceptionLocals' is no longer needed in iOS 17+" -) -@available( - macOS, - deprecated: 14, - message: "'_PerceptionLocals' is no longer needed in macOS 14+" -) -@available( - watchOS, - deprecated: 10, - message: "'_PerceptionLocals' is no longer needed in watchOS 10+" -) -@available( - tvOS, - deprecated: 17, - message: "'_PerceptionLocals' is no longer needed in tvOS 17+" + watchOS, deprecated: 10, message: "'_PerceptionLocals' is no longer needed in watchOS 10+" ) +@available(tvOS, deprecated: 17, message: "'_PerceptionLocals' is no longer needed in tvOS 17+") public enum _PerceptionLocals { @TaskLocal public static var isInPerceptionTracking = false @TaskLocal public static var skipPerceptionChecking = false diff --git a/Sources/Perception/PerceptionRegistrar.swift b/Sources/Perception/PerceptionRegistrar.swift index 079d428..cdfc56d 100644 --- a/Sources/Perception/PerceptionRegistrar.swift +++ b/Sources/Perception/PerceptionRegistrar.swift @@ -5,26 +5,10 @@ import IssueReporting /// /// You don't need to create an instance of `PerceptionRegistrar` when using /// the ``Perception/Perceptible()`` macro to indicate observability of a type. -@available( - iOS, - deprecated: 17, - message: "'PerceptionRegistrar' is no longer needed in iOS 17+" -) -@available( - macOS, - deprecated: 14, - message: "'PerceptionRegistrar' is no longer needed in macOS 14+" -) -@available( - watchOS, - deprecated: 10, - message: "'PerceptionRegistrar' is no longer needed in watchOS 10+" -) -@available( - tvOS, - deprecated: 17, - message: "'PerceptionRegistrar' is no longer needed in tvOS 17+" -) +@available(iOS, deprecated: 17, message: "Use 'ObservationRegistrar' instead.") +@available(macOS, deprecated: 14, message: "Use 'ObservationRegistrar' instead.") +@available(watchOS, deprecated: 10, message: "Use 'ObservationRegistrar' instead.") +@available(tvOS, deprecated: 17, message: "Use 'ObservationRegistrar' instead.") public struct PerceptionRegistrar: Sendable { private let _rawValue: AnySendable #if DEBUG diff --git a/Sources/Perception/WithPerceptionTracking.swift b/Sources/Perception/WithPerceptionTracking.swift index 9a06a01..644b41b 100644 --- a/Sources/Perception/WithPerceptionTracking.swift +++ b/Sources/Perception/WithPerceptionTracking.swift @@ -48,24 +48,16 @@ /// the stack frames displayed to find the line in your view where you are accessing state without /// being inside ``WithPerceptionTracking``. @available( - iOS, - deprecated: 17, - message: "'WithPerceptionTracking' is no longer needed in iOS 17+" + iOS, deprecated: 17, message: "'WithPerceptionTracking' is no longer needed in iOS 17+" ) @available( - macOS, - deprecated: 14, - message: "'WithPerceptionTracking' is no longer needed in macOS 14+" + macOS, deprecated: 14, message: "'WithPerceptionTracking' is no longer needed in macOS 14+" ) @available( - watchOS, - deprecated: 10, - message: "'WithPerceptionTracking' is no longer needed in watchOS 10+" + watchOS, deprecated: 10, message: "'WithPerceptionTracking' is no longer needed in watchOS 10+" ) @available( - tvOS, - deprecated: 17, - message: "'WithPerceptionTracking' is no longer needed in tvOS 17+" + tvOS, deprecated: 17, message: "'WithPerceptionTracking' is no longer needed in tvOS 17+" ) public struct WithPerceptionTracking { @State var id = 0