3.0.0 release readiness: cross-platform Observation, Cache pin, docs - #153
Merged
Merged
Conversation
#149 (WASM): switch Combine/OSLog/SwiftUI-gated #if !os(Linux) && !os(Windows) guards to their canImport(...) checks. os(WASI) is neither Linux nor Windows, so the old guards pulled Combine/SwiftUI into the wasm build. Keychain/iCloud stay Apple-only. #150 (observation off Apple): delivery was bridged through Combine's consume(object: cache) (Apple-only), so withObservationTracking never fired on Linux/Windows/wasm. Now every mutation path (State/StoredState/FileState/SyncState/ SecureState/DependencySlice) calls notifyChange() directly on all platforms, and the Combine cache bridge is removed so Apple still fires exactly once. 163 tests pass on macOS. Observation tests stay gated off Linux/Windows: swift-corelibs -xctest cannot discover synchronous @mainactor test methods there (it force-casts test thunks to () -> () and aborts) — a test-harness limitation, not a runtime one. The #150 delivery code itself is cross-platform. Full wasm build + Linux collection-typed state also need the Cache fix (0xLeif/Cache#30). Addresses #149, #150. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop the unused Combine cache bridge from Application; document that notifyChange() must stay synchronous on the main thread - Add CrossPlatformObservationTests (async @mainactor) so Linux/Windows CI exercises Observation delivery; keep the fuller Apple-gated suites - Gate ObservedDependency on canImport(SwiftUI) for WebAssembly - Pin Cache to the 0xLeif/Cache#30 commit for WASM + Linux collection casts - Point installation guides at 3.0.0; remove stale Examples fledge lane Co-authored-by: Leif <leif.algo@pm.me>
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Application.state(...).value is an immutable rvalue; assign through a mutable local like the other AppStateTests. Co-authored-by: Leif <leif.algo@pm.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ships the remaining work for AppState 3.0.0 with honest cross-platform Observation, a WASM/Linux-safe Cache pin, and install-doc hygiene.
Incorporates #152 (cross-platform
notifyChange()delivery +canImportguards) and finishes the release checklist from the confidence assessment.GitHub release
3.0.0is published from this branch (1656972) after green CI. Please squash-merge this PR intomainso the default branch matches the tag (branch protection still requires a human approving review).Library
notifyChange(); the unused Combineconsume(object: cache)bridge is removed fromApplicationnotifyChange()contract documented — must stay synchronous on the main thread (async hops would breakwithObservationTracking)@ObservedDependencygated withcanImport(SwiftUI)so WebAssembly does not pull SwiftUI/Combine incorrectly0xLeif/Cache@33ef0d7(the #30 commit) for WASMcanImport(Combine)+ Linux collection-cast fix. Switch back to a versionedfrom:pin once Cache tags that fixTests
CrossPlatformObservationTestsusing async@MainActorentry points so Linux/Windows XCTest can discover themObservationTests/ObservationBridgeTestsApple-gated (sync@MainActorXCTest limitation) — documented in-fileDocs / tooling
from: "3.0.0"fledge.tomldrops the staleExamples/SwiftDataExamplelaneIssues
Closes #149, closes #150, closes #151 (via the Cache#30 revision pin) when this PR merges.
Test plan
notifyChange()changesCrossPlatformObservationTestsexecuted and passed3.0.0main(branch protection)