Skip to content

Make Perception warning suppression opt-in#393

Merged
johnnewman-square merged 4 commits into
mainfrom
johnnewman/fix/restore-ios17-perception-warning
Jul 16, 2026
Merged

Make Perception warning suppression opt-in#393
johnnewman-square merged 4 commits into
mainfrom
johnnewman/fix/restore-ios17-perception-warning

Conversation

@johnnewman-square

@johnnewman-square johnnewman-square commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PRs #389 and #390 automatically suppressed Perception runtime warnings on platforms using native Observation. This restores the warnings by default while preserving an opt-in suppression path.

Summary

  • Add Runtime.Configuration.suppressPerceptionCheckingWhenUsingObservation, defaulting to false
  • Continue normal Store access unless suppression is explicitly enabled
  • Apply suppression only in debug builds on iOS 17+, macOS 14+, tvOS 17+, and watchOS 10+
  • Cover both direct state reads and child Store wrapper access
  • Add tests for the default warning behavior and opt-in suppression

Test plan

  • Run StoreTests on iOS 17.5 — 25 passed
  • Run StoreTests on iOS 16.2 — passed with 8 expected skips
  • Run the ObservableComposition sample app on iOS 17 to ensure the warnings are occurring by default.

Checklist

  • Unit Tests
  • UI Tests (not applicable)
  • Snapshot Tests (not applicable)
  • I have made corresponding changes to the documentation

@johnnewman-square
johnnewman-square marked this pull request as ready for review July 16, 2026 21:46
@johnnewman-square
johnnewman-square requested review from a team as code owners July 16, 2026 21:46
Comment thread Workflow/Sources/RuntimeConfiguration.swift
@johnnewman-square
johnnewman-square force-pushed the johnnewman/fix/restore-ios17-perception-warning branch from b0efb02 to 8b6c0b9 Compare July 16, 2026 22:35
@johnnewman-square
johnnewman-square enabled auto-merge (squash) July 16, 2026 22:44
@johnnewman-square
johnnewman-square merged commit a1ba4ec into main Jul 16, 2026
19 of 20 checks passed
@johnnewman-square
johnnewman-square deleted the johnnewman/fix/restore-ios17-perception-warning branch July 16, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants