Skip to content

Commit

Permalink
Fix tuist builds. (#3140)
Browse files Browse the repository at this point in the history
* Fix tuist builds.

* wip
  • Loading branch information
mbrandonw committed Jun 5, 2024
1 parent af38644 commit 1d29522
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
extension Store: Perceptible {}
#endif

#if canImport(Observation)
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
extension Store: Observable {}
#endif

extension Store where State: ObservableState {
var observableState: State {
self._$observationRegistrar.access(self, keyPath: \.currentState)
Expand Down
8 changes: 8 additions & 0 deletions Sources/ComposableArchitecture/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -697,3 +697,11 @@ private enum PartialToState<State> {
}
}()
#endif

#if canImport(Observation)
// NB: This extension must be placed in the same file as 'class Store' due to either a bug
// in Swift, or very opaque and undocumented behavior of Swift.
// See https://github.com/tuist/tuist/issues/6320#issuecomment-2148554117
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
extension Store: Observable {}
#endif

0 comments on commit 1d29522

Please sign in to comment.