Skip to content

Commit 6680aa4

Browse files
authored
Merge branch 'main' into observable-object-conformance
2 parents 408ddee + a6371b6 commit 6680aa4

4 files changed

Lines changed: 14 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ jobs:
132132
- name: Update mtime for incremental builds
133133
uses: chetan/git-restore-mtime-action@v2
134134
- name: CaseStudies (SwiftUI)
135-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (SwiftUI)" xcodebuild
135+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (SwiftUI)" xcodebuild-raw
136136
- name: CaseStudies (UIKit)
137-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (UIKit)" xcodebuild
137+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (UIKit)" xcodebuild-raw
138138
- name: Search
139-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Search" xcodebuild
139+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Search" xcodebuild-raw
140140
- name: SyncUps
141-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SyncUps" xcodebuild
141+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SyncUps" xcodebuild-raw
142142
- name: SpeechRecognition
143-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SpeechRecognition" xcodebuild
143+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SpeechRecognition" xcodebuild-raw
144144
- name: TicTacToe
145-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="TicTacToe" xcodebuild
145+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="TicTacToe" xcodebuild-raw
146146
- name: Todos
147-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Todos" xcodebuild
147+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Todos" xcodebuild-raw
148148
- name: VoiceMemos
149-
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="VoiceMemos" xcodebuild
149+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="VoiceMemos" xcodebuild-raw
150150

151151
check-macro-compatibility:
152152
name: Check Macro Compatibility

Sources/ComposableArchitecture/Core.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,9 @@ final class IfLetCore<Base: Core, State, Action>: Core {
268268
@inlinable
269269
@inline(__always)
270270
func send(_ action: Action) -> Task<Void, Never>? {
271-
#if DEBUG
272-
if BindingLocal.isActive && isInvalid {
273-
return nil
274-
}
275-
#endif
271+
if BindingLocal.isActive && isInvalid {
272+
return nil
273+
}
276274
return base.send(actionKeyPath(action))
277275
}
278276
@inlinable

Sources/ComposableArchitecture/UIKit/AlertStateUIKit.swift

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,7 @@
2828
public convenience init<Action>(
2929
store: Store<AlertState<Action>, Action>
3030
) {
31-
let state = store.currentState
32-
self.init(
33-
title: String(state: state.title),
34-
message: state.message.map { String(state: $0) },
35-
preferredStyle: .alert
36-
)
37-
for button in state.buttons {
38-
addAction(UIAlertAction(button, action: { _ = $0.map(store.send) }))
39-
}
40-
if state.buttons.isEmpty {
41-
addAction(UIAlertAction(title: "OK", style: .cancel))
42-
}
31+
self.init(state: store.currentState) { _ = $0.map(store.send) }
4332
}
4433

4534
/// Creates a `UIAlertController` from a ``Store`` focused on confirmation dialog state.
@@ -63,19 +52,7 @@
6352
public convenience init<Action>(
6453
store: Store<ConfirmationDialogState<Action>, Action>
6554
) {
66-
let state = store.currentState
67-
self.init(
68-
title: String(state: state.title),
69-
message: state.message.map { String(state: $0) },
70-
preferredStyle: .actionSheet
71-
)
72-
for button in state.buttons {
73-
addAction(UIAlertAction(button, action: { _ = $0.map(store.send) }))
74-
}
75-
if state.buttons.isEmpty {
76-
addAction(UIAlertAction(title: "OK", style: .cancel))
77-
}
55+
self.init(state: store.currentState) { _ = $0.map(store.send) }
7856
}
79-
8057
}
8158
#endif

Tests/ComposableArchitectureTests/EffectRunTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,6 @@ final class EffectRunTests: BaseTCATestCase {
166166
await store.send(.tap).finish()
167167
await queue.advance(by: .seconds(1))
168168

169-
try await Task.sleep(nanoseconds: 100_000_000)
169+
try await Task.sleep(nanoseconds: 1_000_000_000)
170170
}
171171
}

0 commit comments

Comments
 (0)