Skip to content

Commit

Permalink
Don't warn on visionOS (#70)
Browse files Browse the repository at this point in the history
Because all visionOS deployment targets support observation, these
warnings can be quite noisy.
  • Loading branch information
stephencelis authored May 2, 2024
1 parent 8e8ca36 commit 7f62e5f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Perception/Bindable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@available(macOS, introduced: 10.15, obsoleted: 14, message: "Use @Bindable without the 'Perception.' prefix.")
@available(tvOS, introduced: 13, obsoleted: 17, message: "Use @Bindable without the 'Perception.' prefix.")
@available(watchOS, introduced: 6, obsoleted: 10, message: "Use @Bindable without the 'Perception.' prefix.")
@available(visionOS, unavailable, message: "Use @Bindable without the 'Perception.' prefix.")
@available(visionOS, obsoleted: 9999, message: "Use @Bindable without the 'Perception.' prefix.")
@dynamicMemberLookup
@propertyWrapper
public struct Bindable<Value> {
Expand Down
1 change: 1 addition & 0 deletions Sources/Perception/Perceptible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
@available(iOS, deprecated: 17, renamed: "Observable")
@available(macOS, deprecated: 14, renamed: "Observable")
@available(tvOS, deprecated: 17, renamed: "Observable")
@available(visionOS, deprecated: 9999, renamed: "Observable")
@available(watchOS, deprecated: 10, renamed: "Observable")
public protocol Perceptible {}
1 change: 1 addition & 0 deletions Sources/Perception/PerceptionRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SwiftUI
@available(iOS, deprecated: 17, renamed: "ObservationRegistrar")
@available(macOS, deprecated: 14, renamed: "ObservationRegistrar")
@available(tvOS, deprecated: 17, renamed: "ObservationRegistrar")
@available(visionOS, deprecated: 9999, renamed: "ObservationRegistrar")
@available(watchOS, deprecated: 10, renamed: "ObservationRegistrar")
public struct PerceptionRegistrar: Sendable {
private let _rawValue: AnySendable
Expand Down
1 change: 1 addition & 0 deletions Sources/Perception/PerceptionTracking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ private func generateAccessList<T>(_ apply: () -> T) -> (T, PerceptionTracking._
@available(iOS, deprecated: 17, renamed: "withObservationTracking")
@available(macOS, deprecated: 14, renamed: "withObservationTracking")
@available(tvOS, deprecated: 17, renamed: "withObservationTracking")
@available(visionOS, deprecated: 9999, renamed: "withObservationTracking")
@available(watchOS, deprecated: 10, renamed: "withObservationTracking")
public func withPerceptionTracking<T>(
_ apply: () -> T,
Expand Down
2 changes: 2 additions & 0 deletions Sources/Perception/WithPerceptionTracking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import SwiftUI
@available(iOS, deprecated: 17, message: "Remove WithPerceptionTracking")
@available(macOS, deprecated: 14, message: "Remove WithPerceptionTracking")
@available(tvOS, deprecated: 17, message: "Remove WithPerceptionTracking")
@available(visionOS, deprecated: 9999, message: "Remove WithPerceptionTracking")
@available(watchOS, deprecated: 10, message: "Remove WithPerceptionTracking")
public struct WithPerceptionTracking<Content> {
@State var id = 0
Expand Down Expand Up @@ -159,6 +160,7 @@ extension WithPerceptionTracking: View where Content: View {
@available(iOS, deprecated: 17)
@available(macOS, deprecated: 14)
@available(tvOS, deprecated: 17)
@available(visionOS, deprecated: 9999)
@available(watchOS, deprecated: 10)
public enum _PerceptionLocals {
@TaskLocal public static var isInPerceptionTracking = false
Expand Down

0 comments on commit 7f62e5f

Please sign in to comment.