Commit Graph

241 Commits

Author SHA1 Message Date
stephencelis
d1c2e5b6d1 Run swift-format 2023-01-05 18:30:30 +00:00
Thomas Grapperon
c719fa1d39 Allow BindingReducer to work with ViewState (#1790)
* Simpler bindable view state

* wip

* wip

* Remove `BindingStore`

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Make BindingState conditionally sendable.

* Fixed tests

* Update bindings article

* Add some additional contextual information to the runtime warnings

* update some docs

* lots more docs

* test clean up

* Improve diagnostic

* Put back `BindingReducer()` in the form study

* clean up

* Improve DocC references

* Remove DocC references for `@`'d property wrappers.

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2023-01-05 13:18:34 -05:00
Brandon Williams
0a1958115c Depend on SwiftUINavigation for TextState, AlertState, etc... (#1685)
* Use `swiftui-navigation` for alerts

* wip

* wip

* wip

* wip

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-11-21 17:46:36 -05:00
Thomas Grapperon
41f1cb9f3f Add a EffectTask<Action> typealias for Effect<Action, Never> and rename Effect to EffectPublisher (#1471)
* Add an `EffectOf<Action>` typealias for `Effect<Action, Never>`

* Fix doc

* Rename `EffectOf` to `EffectTask`

* Rename `Effect` to  `EffectPublisher`

* Soft-deprecate `Effect`

* Link to `EffectTask`

* Use `EffectPublisher` in Combine contexts

* Reword soft-deprecation message

* Remove `renamed:` fix-it for `Effect` deprecation

* Update Sources/ComposableArchitecture/Documentation.docc/Extensions/ReducerProtocol.md

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>

* Update Sources/ComposableArchitecture/Documentation.docc/ComposableArchitecture.md

* Update Sources/ComposableArchitecture/Effect.swift

* Fix DocC identifiers

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2022-10-17 15:16:46 -07:00
Thomas Grapperon
e2e796d62b Remove an unnecessary @escaping annotation (#1513) 2022-10-17 08:32:44 -07:00
Brandon Williams
7b7a97fb83 Remove some escaping closures (#1493)
* Remove some escaping closures.

* wip

* wip

* Add some canary tests to track down failures.

* Remove a few more escaping closures.
2022-10-13 18:32:19 -04:00
Stephen Celis
2d943dadae Loosen platform requirements for Dependencies library (#1466)
* Loosen platform requirements for Dependencies

Dependencies depends on runtime warning functionality, which is brought
in via the "os" module. If we check for availability we can allow the
Dependencies module to be used from multiplatform libraries, as we have
in isowords.

* More agnostic

* wip

* Update RuntimeWarnings.swift

* Update RuntimeWarnings.swift
2022-10-11 15:14:37 -07:00
mbrandonw
ef137808e7 Run swift-format 2022-10-10 20:33:04 +00:00
Brandon Williams
55755c3103 ViewStore.init(_:observe:) (#1448)
* ViewStore.init(_:observe:)

* clean up
2022-10-10 15:55:54 -04:00
stephencelis
bcae29f23d Run swift-format 2022-10-10 18:37:19 +00:00
Brandon Williams
b8294b89d5 ReducerProtocol (#1283)
* Add previewValue to DependencyKey, and fixed build errors on Xcode 13.

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add Xcode 14 to CI (#1266)

* Add Xcode 14 to CI

* Update ci.yml

* wip

* wip

* Update Makefile

* Update Makefile

* wip

* runtime warning when no live dependency available for live app

* bring back live

* wip

* soft deprecate Reducer

* fusion test

* ternary clean up

* wip

* add some todos

* typealias Reducer inside AnyReducer

* Add `now` convenience property to date dependency (#1286)

* Remove type alias

* LiveDependencyKey: DependencyKey -> DependencyKey: TestDependencyKey (#1288)

* LiveDependencyKey: DependencyKey -> DependencyKey: TestDependencyKey

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* fix navigate case studies

* wip

* fixes and docs

* more migration

* wip

* wip

* thread deps through ifLet and forEach examples.

* update

* clean up

* wip

* wip

* Update MigratingToReducerProtocols.md

* wip

* wip

* docs

* docs

* fix some docs

* Fix for CombineReducers compiler bug

* wip

* wip

* wip

* wip

* todos for docs

* Don't warn for overridden test dependencies (#1324)

* Don't warn while setting test dependencies

* wip

* fix conflict

* wip

* Docs and deprecations

* add binding info

* wip

* Add URL session

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Don't run debug reducer in tests

* wip

* updated reducer debugging

* Update UUID.swift (#1374)

* wip

* optional

* added Self as default associatedtype value for TestDependencyKey.value (#1395)

* added Self as default associatedtype value for TestDependencyKey.value

* Update Tests/ComposableArchitectureTests/DependencyKeyTests.swift

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>

* Update example to set badge to the unread count (#1391)

* Add store.finish().

* Fix warnings introduced in Xcode 14.1 (#1388)

* Fix warnings introduced in Xcode 14.1

* wip

* Conform dependency values to DependencyKey where convenient

* fix

* Fail if testValue is invoked without providing implementation (#1399)

* Update example to set badge to the unread count (#1391)

* Add store.finish().

* Fix the CaseStudies (UIKit) (#1392)

* Fix warnings introduced in Xcode 14.1 (#1388)

* Fix warnings introduced in Xcode 14.1

* wip

* Fail when accessing testValue when one hasn't been provided.

* wip

* wip

* wip

* test

Co-authored-by: Mark Adams <hyperspacemark@users.noreply.github.com>
Co-authored-by: Maciek Czarnik <Czajnikowski@users.noreply.github.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Add DateGenerator.init(_ generate:)

* Start running some tests in release config. (#1405)

* Start running some tests in release config.

* wip

* wip

* wip

* wip

* wip

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* wip

* wip

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* added test that dependencies are transferred to effects

* wip

* self

* clean up

* simplify

* fix

* doc fixes

* wip

* fix

* wip

* wip

* wip

* fix

* Run dependencies tests on CI. (#1408)

* Run dependencies tests on CI.

* wip

* update makefile

* wtf

* more docs

* more docs

* wip

* docs

* wip

* docs

* wip

* message tweaks

* wip

* docs and clean up

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* typo fix

* docs clean up

* doc fixes

* cancel in progress

* cancel in progress

* no need to make recope release-only, and make more use of XCTAssert to get better release tests

* fix test

* Remove ActorIsolated from tests where it's not needed

* fix test

* wip

* wip

* Add a benchmark for dependency key writing.

* fix test

* make benchmark 5.7 compatible

* iflet docs

* more docs

* dependency docs

* rearrange

* @Dependency docs

* docs

* fix benchmark in 5.6

* doc fix

* wip

* wip

* wip

* wip

* more docs

* clean up

* fix

* wip

* Fixes compilation on watchOS (#1423)

Co-authored-by: Gunnar Herzog <gunnar.herzog@kf-interactive.com>

* move deprecation

* format

* wip

* Fix openURL

* wip

* wip

* wip

* wip

* fix

* Keep simple

* Reducer.debug -> Reducer._printChanges

We want to revisit some of these debugging APIs in the future, so let's
keep them around, but underscore them to allow for more flexible
evolution.

* `ReducerProtocol.debug` -> `ReducerProtocol._printChanges` (#1426)

* Reducer.debug -> Reducer._printChanges

We want to revisit some of these debugging APIs in the future, so let's
keep them around, but underscore them to allow for more flexible
evolution.

* Update DebugTests.swift

* OpenURL fix for macCatalyst (#1429)

* OpenURL fix for macCatalyst

Fixes #1428.

* Update Makefile

* Correct typo in "Designing dependencies" chapter (#1430)

protocol AudioPlayerClient should be a struct

* fix

* fix

* protocol docc

* docs

* Typos (#1439)

* remove unneeded internals

* wip

* Fix missing parameter in code sample (#1450)

* typo fix

* more docs for DependencyKeyWritingReducer

* wip

* wip

* update readme

* wip

* update image

* main actor

* Added withValue, added docs and tests

* public properties

* cleaned up overload

* changed reducer->feature in a bunch of spots of dependencies docs

* add articles to readme

* 6

* fix tests for swift 5.6

* tweak

* tweak

* Update ReducerProtocol.swift

* wip

* wip

* docs update

* docs for conforming dependency directly to DependencyKey

* typo fix

* performance article update

* fixes

* deprecate another effect timer API

* link to migration doc in deprecation messages

* make some tests that deal with line numbers less fragile

* package.swift clean up

* tweak to echos

* remove docs at root, not in docs-out

* remove todo

* update WithViewStore.init deprecation message to explain and link to performance doc

* Add back ReducerProtocolOf for 5.7.1 (#1444)

* Add back ReducerProtocolOf for 5.7.1

* wip

* Move scheme tests to matrix

* streamline

* try this

* store.finish

* wip

* dependencies -> transformDependency

* wip

* wip

* Compat

* fix

* preserve deps for combine publishers

* Remove dump calls (#1460)

* Fix compiler errors for library evolution. (#1443)

* Fix compiler errors for library evolution.

* wip

* wip

* work around ambiguous init

* Revert "work around ambiguous init"

This reverts commit 002a199d59.

* fix ambiguity errors

* remove _Observe for now

* wip

* wip

* wip

* longer timeout

* more waiting

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: Ken Grigsby <kgrigsby@mac.com>
Co-authored-by: Petr Sima <ptea.sima@gmail.com>
Co-authored-by: Mark Adams <hyperspacemark@users.noreply.github.com>
Co-authored-by: Maciek Czarnik <Czajnikowski@users.noreply.github.com>
Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>
Co-authored-by: Gunnar Herzog <github@trispo.de>
Co-authored-by: Gunnar Herzog <gunnar.herzog@kf-interactive.com>
Co-authored-by: Guttorm Aase <guttormaase@gmail.com>
Co-authored-by: Julien Sagot <contact@juliensagot.fr>
Co-authored-by: Jaanus Siim <jaanussiim+github@gmail.com>
2022-10-10 11:37:50 -04:00
Brandon Williams
764de879ef More docs for WithViewStore and new observe argument (#1368)
* wip

* wip

* Update Performance.md

* Update Performance.md

* wip

* wip

* Update Performance.md

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-09-10 10:20:35 -04:00
Stephen Celis
cbe013b42b Remove @StateObject shim for now (#1358)
* Remove `@StateObject` shim for now

* remove
2022-09-08 19:20:13 -04:00
Brandon Williams
046133ffd8 Move WithViewStore deprecations to Deprecations.swift (#1346) 2022-09-07 15:12:00 -04:00
Stephen Celis
bef2084cb2 Introduce WithViewStore.init(_:observe:send:...) (#1339)
* wip

* Introduce `WithViewStore.init(_:observe:send:...)`

* Update examples

* wip

* typo

* wip
2022-09-07 10:08:20 -04:00
Thomas Grapperon
b6ca93d0a3 Add _StateObject, an iOS 13 compatible substitute of StateObject (#1336)
* Add `_StateObject`

* wip

* `Storage` doesn't need to be `ObservableObject`

* Improve performance

Introduce a magic `@Published` that makes it much faster for some reason.

Both Storage and Observed have been merged into one type only, and properties/functions have been renamed like `StateObject` internals.

* wip

* wip

* wip

* wip

* wip

* Cleanup

* wip

* Remove `ObjectWillChangePublisher.Output` condition

This is not used anymore.

* Move `_StateObject` to "internal/"

* Typo

* wip

* wip

* wip

* Rollback `StateObjectViewStore` changes
2022-09-05 13:25:46 -04:00
Brandon Williams
1a53648704 Use @StateObject for WithViewStore in iOS 14 (#1325)
* wip

* Deprecate WithViewStore overloads

* wip

* wip

* wip

* wip

* draft of state object for withviewstore

* Revert "draft of state object for withviewstore"

This reverts commit bf00da23fd.

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix availabililty

* tryting to get debug

* fix printing

* wip

* wip

* fix flakey test

* release builds

* wip

* wip

* merge conflicts

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-09-01 16:36:16 -04:00
Stephen Celis
a6fc9a2ed5 Add deprecations to non-view WithViewStore initializers (#1323)
* wip

* Deprecate WithViewStore overloads

* wip

* wip

* wip

* wip

* wip

* wip

* docs on withviewstore performance

* wip

* wip

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-09-01 12:45:07 -04:00
stephencelis
bb1c894469 Run swift-format 2022-08-30 17:42:15 +00:00
Thomas Grapperon
9a01fb412b Use memcmp to improve ForEachStore's performance (#1307)
* Use `memcmp` to improve `ForEachStore`'s performance

* Update Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2022-08-30 13:10:36 -04:00
Stephen Celis
799aa18f86 Cleanup: Global/Local -> Parent/Child (#1269)
* Make openSettings async.

* global/local -> parent/child

* error cleanup

* Clean up action scoping

* cleanup

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-08-16 12:25:31 -04:00
Brandon Williams
108e3a536f Concurrency Beta (#1189)
* more main actor audit

* wip

* wip

* fix

* better task result ==

* task result tests

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix merge conflicts

* wip

* wip

* lots of doc fixes and modernizations

* lots more docs and better hashable conformance for TaskResult

* more docs

* clean up

* more tests and docs

* clean up

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* small clean up

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* explicit

* wip

* fix bug in TestStore.receive

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fixes

* wip

* tools for non-deterministic TestStore.receive

* fix

* wip

* wip

* remove inAnyOrder stuff

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* convert download case study to use async/await

* animations

* fix tests

* remove executor experiment

* wip

* wip

* wip

* wip

* wip

* speech simplification

* wip

* wip

* wip

* wip

* wip

* wip

* add a few todos

* wrote some tests

* simplify speech recognizer

* fix tests

* update some docs about error throwing behavior

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Swift 5.5.2 fixes

* wip

* Bump timeout

* wip

* wip

* Finesse

* proper way to detect main queue

* extra guard

* revert main queue check

* move stuff around

* docs

* fixed a bunch of warnings

* Fix references

* clean up

* clean up

* fix a bunch of warnings

* clean up

* un-soft deprecate concatenate

* async teststore.send

* fix uikit tests

* drop sendable

* wip

* wip

* wip

* wip

* wip

* clean up

* clean up

* reorganize, remove extra task cancellation handler

* wip

* wip

* wip

* wip

* wip

* wip

* Make TestStore.send async (#1190)

* async teststore.send

* fix uikit tests

* Converted all tests to async

* clean up

* added docs

* Update Sources/ComposableArchitecture/TestStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/TestStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* docs and readme update

* Update README.md

* Update Tests/ComposableArchitectureTests/StoreTests.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* fix

* Update Sources/ComposableArchitecture/TestStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/TestStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/TestStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* clean up

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* wip

* wip

* wip

* make fetchNumber throwing and fix tests

* effect basics clean up

* use local state for isLoading in refreshable case study

* clean up

* fix test

* wip

* wip

* wip

* wip

* wip

* wip

* fixes

* clean up

* clean up

* Simplify

* wip

* clean up

* wip

* AsyncStream.finished()

* give Send a public initializer

* make send public

* temporarily make box public

* remove concurrency flag

* wip

* wip

* wip

* wip

* wip

* docs

* speech

* simplify

* clean up;

* unchecked sendable

* clean up

* clean up

* wip

* docs

* docs

* more docs

* lots of docs

* wip

* wip

* wip

* more docs for streamWithContinuation

* wip

* wip

* wip

* Make internal, too

* wip

* Remove sendability detection

It breaks things, like:

    let request = UncheckedSendable(
      SKProductsRequest(productIdentifiers: []
    )
    // UncheckedSendable<NSObject> // *not* _<SKProductsRequest>

* wip

* doc clean up;

* fixed some todos

* docs

* wip

* remove thread safety FAQ from readme

* fix test

* wip

* docs clean up

* docs clean up

* added a testing article and fixed some docs

* rearrange

* docs clean up

* wip

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Effects/ConcurrencySupport.swift

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Effects/ConcurrencySupport.swift

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Effects/ConcurrencySupport.swift

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Effects/ConcurrencySupport.swift

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* Update Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>

* wip

* wip

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com>
2022-08-08 01:04:16 -04:00
Dzianis Fileyeu
c0eaaae7ed Fix typo in Alert documentation comments (#1238) 2022-08-03 11:44:06 -04:00
konomae
c3db6fe7cd Fix minor typo (#1237) 2022-08-03 10:35:23 -04:00
mbrandonw
f81842157c Run swift-format 2022-07-12 16:54:06 +00:00
Brandon Williams
0fb73c2bf3 Deprecate unchecked store (#1206)
* Deprecate unchecked stores.

* warning tests

* rearrange

* Update Deprecations.swift

* wip

* test for binding warning

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-07-12 12:39:32 -04:00
Stephen Celis
a97cba5565 DocC Structure (#1180)
* DocC Structure

* wip

* wip

* wip
2022-07-01 14:49:34 -04:00
Brandon Williams
90d91ffedc Clean up compiler checks. (#1167) 2022-06-28 16:05:50 -04:00
Stephen Celis
b55977808f Only warn for unused binding actions sent from view stores (#1163)
* Only warn for unused binding actions sent from view stores

* Apply suggestions from code review

* wip

* wip
2022-06-24 17:43:50 -04:00
Stephen Celis
5af88eb36b Add runtime warnings for unused binding actions (#1159)
* Add runtime warnings for unused binding actions

An alternative approach to #1158.

* wip

* finesse

* finesse

* Update Sources/ComposableArchitecture/SwiftUI/Binding.swift

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>

* Update Binding.swift

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
2022-06-24 09:52:37 -04:00
Brandon Williams
b66fe3d7ea Typo fix in documentation 2022-06-22 13:25:27 -04:00
Stephen Celis
bec0128bae Clean up sample code (#1156)
We employ a few tricks that might be confusing folks that are unfamiliar
with them, so this dials some things down in the sample code and docs.
We could maybe take it further, but this is a start.
2022-06-22 13:19:55 -04:00
Stephen Celis
b8dddaf0bf Clean up generic signatures (#1143) 2022-06-14 09:39:05 -04:00
Thomas Grapperon
37d05164c3 Conform WithViewStore to Commands (#1113)
* Conform `WithViewStore` to `Commands`

* Fix typo

* Add coverage for `Commands`

* Fix documentation

* Conform `WithViewStore` to `AccessibilityRotorContent` and `ToolbarContent`

* Conform `WithViewStore` to `TableColumnContent`

* Fix indentation

* Conform `WithViewStore` to `TableRowContent`

* Fix Typo

* Conform `WithViewStore` to `DynamicTableRowContent`

* Reorder declarations according to the protocol name

* Add coverage for `WithViewStore` new conformances

* Remove Table-related conformances

* Rearrange extensions for better autocomplete.

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-06-03 11:53:54 -04:00
Stephen Celis
c232a9f353 Swift 5.7 fixes (#1089)
* Fix Swift 5.7 warnings

* Fix Swift 5.7 threading issue
2022-05-12 13:07:37 -04:00
Brandon Williams
af3eed801a Move send(_:animation:) to ViewStore.swift. (#1075) 2022-05-02 17:44:45 -07:00
mbrandonw
96f47fbe85 Run swift-format 2022-04-08 16:57:56 +00:00
Brandon Williams
c8482eb61b Move DEBUG check to runtimeWarning function. (#1056)
* Move DEBUG check to runtimeWarning function.

* wip
2022-04-08 09:48:35 -07:00
Stephen Celis
2828dc44f6 Runtime Warning Finesse (#1023) 2022-03-15 16:21:13 -04:00
Thomas Grapperon
85050a28a9 Fix WithViewStore issues with Views using escaping closures (#1015)
* Use a new instance of `ViewStore` in `WithViewStore`'s `body`

* Use explicit `self` for style coherence

* Remove `viewCancellable` additional reference in `newInstance()`

* Revert "Remove `viewCancellable` additional reference in `newInstance()`"

This reverts commit cb6a22ae4f.

* Change `viewCancellable` capture list

* Update `GeometryReader`'s workarounds
2022-03-11 15:23:42 -05:00
Stephen Celis
313dd217dc Improving developer experience with runtime warnings (#943)
* Perform thread check only when store is created on main thread.

* clean up

* Update Sources/ComposableArchitecture/Store.swift

* clean up

* Update Sources/ComposableArchitecture/Store.swift

* clean up

* execute setSpecific only once.

* logic fix

* added a test

* typo

* wip

* wip

* wip

* clean up

* language

* wip

* note

* wip

* wip

* wip

* wip

* wip

* fix closing quote

* wip

* fix merge

* Deprecations

* Fix docs

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-01-03 10:55:13 -06:00
Stephen Celis
9c162f485b Fix iOS 14 alert/confirmationDialog runtime crash (#931)
* Fix iOS 14 alert/confirmationDialog runtime crash

* wip

* wip
2021-12-20 16:38:09 -05:00
Stephen Celis
ff41e51a4e Limit async/await to Swift 5.5.2 (Xcode 13.2) (#923) 2021-12-16 16:32:02 -05:00
stephencelis
d992e4c775 Run swift-format 2021-12-03 21:11:01 +00:00
Fero
921272e329 Add support for accessibility modifiers on TextState (#863)
* wip

* wip2

* fix unsupported builds

* handle custom dump

* alphabetize

* use TextState for .accessibilityLabel associated value
2021-12-03 16:04:01 -05:00
Thomas Visser
068333afdc Make AlertState.ButtonAction.type public (#871) 2021-10-25 16:16:06 -04:00
Stephen Celis
14379519ed Fix CaseLet docs (#850) 2021-10-14 19:33:19 -04:00
Fero
3144393c64 Add actionless CaseLet overload (#848)
Due to private `StoreObservableObject` this has to be implemented as part of the library
2021-10-12 15:28:30 -04:00
Malone Hedges
1a2b293ca6 Fix typo in BindingAction.pullback(_:) docs (#830) 2021-09-24 13:47:26 -04:00
Brandon Williams
d165966898 Don't print to console when dumping state for ViewStore.debug (#829) 2021-09-24 10:22:22 -04:00