Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Oct 3, 2024
1 parent 1a43df8 commit ac4f3ac
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 87 deletions.
12 changes: 6 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
])
}
24 changes: 4 additions & 20 deletions Sources/Perception/Perceptible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
37 changes: 8 additions & 29 deletions Sources/Perception/PerceptionChecking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 4 additions & 20 deletions Sources/Perception/PerceptionRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 4 additions & 12 deletions Sources/Perception/WithPerceptionTracking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Content> {
@State var id = 0
Expand Down

0 comments on commit ac4f3ac

Please sign in to comment.