45 Commits

Author SHA1 Message Date
Stephen Celis
149fdf9c20 Use SPI docs instead of self-hosted (#3791)
* Use SPI docs instead of self-hosted

Fixes #3785.

* wip
2025-10-08 09:28:11 -07:00
stephencelis
97b7ebb018 Run swift-format 2024-08-27 19:39:04 +00:00
Stephen Celis
0d8980f5bc Swift 6: Main actor isolated store view helpers (#3283)
* `@preconcurrency @MainActor` isolation of `Store`

* Remove unneeded `@MainActor`s

* Remove thread checking code

* Remove unneeded `@MainActor`s

* Swift 5.10 compatibility fixes

* wip

* More 5.10 fixes

* wip

* fixes

* wip

* wip

* up the timeout

* wip

* Fixes

* wip

* wip

* wip

* wip

* wip

* wip

* Main actor logger

* wip

* wip

* wip

* fix

* fix

* fix

* fix compilation error

* wip

* wip

* bring back yield

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2024-08-27 12:31:43 -07:00
Malte Bünz
3f16c6c927 fix typo (#3268) 2024-08-02 09:31:29 -04:00
hmhv
1f5985a359 remove invalid newlines (#2763) 2024-02-02 10:18:52 -08:00
Stephen Celis
2c3453cb79 Some cleanup (#2759)
* Some cleanup

  - `if/guard let x = x` -> `if/guard let x`
  - Remove unneeded `self` from a few demos
  - Fix up some presentation logic in TicTacToe

* Update Examples/TicTacToe/tic-tac-toe/Sources/LoginUIKit/LoginViewController.swift

* wip

* wip

* wip
2024-02-01 15:43:52 -08:00
Stephen Celis
af5ae21f65 Cache store scoping when possible (#2527)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Silence test warnings

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Revert "wip"

This reverts commit ed6cc24adb.

* Revert "Revert "wip""

This reverts commit 8358990b1a.

* wip

* wip

* wip

* wip

* wip

* update a bunch of docs

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Kill integration tests for now

* wip

* wip

* wip

* wip

* updating docs for @Reducer macro

* replaced more Reducer protocols with @Reducer

* Fixed some broken docc references

* wip

* Some @Reducer docs

* more docs

* convert some old styles to new style

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* bump

* update tutorials to use body

* update tutorials to use DML on destination state enum

* Add diagnostic

* wip

* updated a few more tests

* wip

* wip

* Add another gotcha

* wip

* wip

* wip

* Add dynamic lookup to presentation state/action

* wip

* wip

* Better lookup

* wip

* wip

* wip

* IdentifiedAction

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fixes

* wip

* wip

* added migration guide for new scope operation

* migration guide for new navigation view modifiers

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* fix

* wip

* wip

* remove for now

* wip

* wip

* simplify scope

* wip

* updated some docs

* migration guides

* more migration guide

* fix ci

* fix

* soft deprecate all apis using AnyCasePath

* wip

* Fix

* fix tests

* updated tests

* swift-format 509 compatibility

* wip

* wip

* Update Sources/ComposableArchitecture/Macros.swift

Co-authored-by: Mateusz Bąk <bakmatthew@icloud.com>

* wip

* wip

* update optional state case study

* remove initializer

* Don't use @State for BasicsView integration demo

* fix tests

* remove reduce diagnostics for now

* diagnose error not warning

* Update Sources/ComposableArchitecture/Macros.swift

Co-authored-by: Jesse Tipton <jesse@jessetipton.com>

* wip

* move integration tests to cron

* Revert "move integration tests to cron"

This reverts commit f9bdf2f04b.

* disable flakey tests on CI

* wip

* wip

* fix migration guide

* fix docs

* fix deprecation messages

* wip

* wip

* missing deprecation

* soft

* wip

* update migration guide

* Fix resolved

* update migration guide

* fix test

* format

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Mateusz Bąk <bakmatthew@icloud.com>
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
Co-authored-by: Jesse Tipton <jesse@jessetipton.com>
2023-11-26 09:58:54 -08:00
Stephen Celis
87aeaf6f73 Use Text.init(verbatim:) to avoid localization warnings (#2541)
Fixes #2502.
2023-11-02 12:25:37 -07:00
Stephen Celis
5ba7943402 Internal: rename Store.{state,stateSubject} (#2538)
* Internal: rename `Store.{state,stateSubject}`

Both an internal readability win and will make it easier to provide a
public `state` property in the future.

* wip
2023-10-31 14:45:57 -07:00
Stephen Celis
195284b94b The Composable Architecture 1.0 (#2318)
* docs

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix invalid states count for 3 optionals and typos (#2094)

* wip

* wip

* more dismisseffect docs

* fixed some references

* navigation doc corrections

* more nav docs

* fix cancellation tests in release mode

* wrap some tests in #if DEBUG since they are testing expected failures

* update UUIDs in tests to use shorter initializer

* fixed a todo

* wip

* fix merge errors

* wip

* fix

* wip

* wip

* fixing a bunch of todos

* get rid of rawvalue in StackElementID

* more todos

* NavLinkStore docs

* fix swift 5.6 stuff

* fix some standups tests

* fix

* clean up

* docs fix

* fixes

* wip

* 5.6 fix

* wip

* wip

* dont parallelize tests

* updated demo readmes

* wip

* Use ObservedObject instead of StateObject for alert/dialog modifiers.

* integration tests for bad dismissal behavior

* check for runtime warnings in every integration test

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* Drop a bunch of Hashables.

* some nav bug fixes

* wip

* wip

* wip

* fix

* fix

* wip

* wip

* Simplify recording test.

* add concurrent async test

* fix

* wip

* Refact how detail dismisses itself.

* fix

* 5.6 fix

* wip

* wip

* wip

* wip

* Add TestStore.assert.

* Revert "Add TestStore.assert."

This reverts commit a892cccc66.

* add Ukrainian Readme.md (#2121)

* Add TestStore.assert. (#2123)

* Add TestStore.assert.

* wip

* Update Sources/ComposableArchitecture/TestStore.swift

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

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

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

* fix tests

---------

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

* Run swift-format

* push for store.finish and presentation

* wip

* move docs around

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add case subscripts

* wip

* wip

* wip

* 5.7-only

* wip

* wip

* wip

* wip

* fix

* revert store.finish task cancellation

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* add test for presentation scope

* wip

* wip

* wip

* wip

* wip

* cleanup

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Rename ReducerProtocol.swift to Reducer.swift (#2206)

* Hard-deprecate old SwitchStore initializers/overloads

* wip

* wip

* Resolve CaseStudies crash (#2258)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Bump timeout for CI

* wip

* Remove old deprecations

* Simplify test store

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* images for tutorials

* wip

* wip

* Remove deprecated alert APIs

* Bump dependencies

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: 유재호 <y73447jh@gmail.com>
Co-authored-by: Dmytro <barabashdmyto@gmail.com>
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com>
2023-07-30 14:58:40 -07:00
stephencelis
4cf2104cf1 Run swift-format 2023-07-30 18:05:28 +00:00
Stephen Celis
4406349a57 Deprecate old alert APIs in favor of new presentation APIs (#2335)
* Deprecate old alert APIs in favor of new presentation APIs

* wip

* wip

* wip
2023-07-30 11:01:38 -07:00
Brandon Williams
2c93195c23 Prerelease 1.0 (#1929)
* Converted voice memos back to identified array

* update deps

* update docs for DismissEffect

* wip

* Add Sendable conformance to PresentationState (#2086)

* wip

* swift-format

* wip

* wip

* fix some warnings

* docs

* wip

* wip

* Catch some typos in Articles (#2088)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* docs

* wip

* wip

* docs

* wip

* wip

* wip

* wip

* docs

* docs

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix invalid states count for 3 optionals and typos (#2094)

* wip

* wip

* more dismisseffect docs

* fixed some references

* navigation doc corrections

* more nav docs

* fix cancellation tests in release mode

* wrap some tests in #if DEBUG since they are testing expected failures

* update UUIDs in tests to use shorter initializer

* fixed a todo

* wip

* fix merge errors

* wip

* fix

* wip

* wip

* fixing a bunch of todos

* get rid of rawvalue in StackElementID

* more todos

* NavLinkStore docs

* fix swift 5.6 stuff

* fix some standups tests

* fix

* clean up

* docs fix

* fixes

* wip

* 5.6 fix

* wip

* wip

* dont parallelize tests

* updated demo readmes

* wip

* Use ObservedObject instead of StateObject for alert/dialog modifiers.

* integration tests for bad dismissal behavior

* check for runtime warnings in every integration test

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* Drop a bunch of Hashables.

* some nav bug fixes

* wip

* wip

* wip

* fix

* fix

* wip

* wip

* Simplify recording test.

* add concurrent async test

* fix

* wip

* Refact how detail dismisses itself.

* fix

* 5.6 fix

* wip

* wip

* wip

* wip

* Add TestStore.assert.

* Revert "Add TestStore.assert."

This reverts commit a892cccc66.

* add Ukrainian Readme.md (#2121)

* Add TestStore.assert. (#2123)

* Add TestStore.assert.

* wip

* Update Sources/ComposableArchitecture/TestStore.swift

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

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

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

* fix tests

---------

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

* Run swift-format

* push for store.finish and presentation

* wip

* move docs around

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add case subscripts

* wip

* wip

* wip

* 5.7-only

* wip

* wip

* wip

* wip

* fix

* revert store.finish task cancellation

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* add test for presentation scope

* wip

* wip

* wip

* wip

* wip

* cleanup

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Rename ReducerProtocol.swift to Reducer.swift (#2206)

* Hard-deprecate old SwitchStore initializers/overloads

* wip

* wip

* Resolve CaseStudies crash (#2258)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Bump timeout for CI

* wip

* wip

---------

Co-authored-by: Jackson Utsch <jutechs@gmail.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: 유재호 <y73447jh@gmail.com>
Co-authored-by: Dmytro <barabashdmyto@gmail.com>
Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com>
2023-07-27 17:35:07 -07:00
HanjunYu
bad761c919 Add Store.send(_ action:) return StoreTask (#2323)
Co-authored-by: hanjun-yu <hanjun.yu@snowcorp.com>
2023-07-26 09:23:39 -07:00
Stephen Celis
faadf6a780 Add named closure arguments (#2295)
* Add named closure arguments

Better for documentation and auto-fill.

* wip
2023-07-16 15:27:02 -07:00
Stephen Celis
43e28a57f3 Update docs for next release (#2238)
* Update docs for next release

* wip

* fix deprecations

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2023-06-28 11:34:01 -07:00
Daiki Matsudate
b4a3420ded Fix docs (#2174) 2023-06-04 11:45:44 -07:00
Stephen Celis
c432a76b5b Navigation (#1945)
* wip

* fix

* wip

* wip

* move

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix

* wip

* wip

* Renamed action to onTap in NavigationLinkStore (#2043)

Renamed the `action` parameter to mirror other inits and differentiate itself from `action fromDestinationAction`

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Tie view identity to stack element identity

* Tie item identity to case

* wip

* wip

* cleanup

* fix

* fix

* Add warning to nav link

* wip

* wip

* Rename FullscreenCover.swift to FullScreenCover.swift (#2062)

* wip

* fix isDetailLink on non-iOS platforms

* Correct some comments in Effect.swift (#2081)

* add integration tests for showing alert/dialog from alert/dialog.

* copy StackElementIDGenerator dependency before running TestStore receive closure.

* Removed some unneeded delegate actions.

* wip

* clean up

* lots of clean up

* Converted voice memos back to identified array

* update deps

* update docs for DismissEffect

* wip

* Add Sendable conformance to PresentationState (#2086)

* wip

* swift-format

* wip

* wip

* docs

* wip

* wip

* Catch some typos in Articles (#2088)

* wip

* wip

* wip

* wip

* wip

* docs

* wip

* wip

* docs

* wip

* wip

* wip

* wip

* docs

* docs

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix invalid states count for 3 optionals and typos (#2094)

* wip

* wip

* more dismisseffect docs

* fixed some references

* navigation doc corrections

* more nav docs

* fix cancellation tests in release mode

* wrap some tests in #if DEBUG since they are testing expected failures

* update UUIDs in tests to use shorter initializer

* fixed a todo

* wip

* fix merge errors

* wip

* fix

* wip

* wip

* fixing a bunch of todos

* get rid of rawvalue in StackElementID

* more todos

* NavLinkStore docs

* fix swift 5.6 stuff

* fix some standups tests

* fix

* clean up

* docs fix

* fixes

* wip

* 5.6 fix

* wip

* wip

* dont parallelize tests

* updated demo readmes

* wip

* Use ObservedObject instead of StateObject for alert/dialog modifiers.

* integration tests for bad dismissal behavior

* check for runtime warnings in every integration test

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* Drop a bunch of Hashables.

* some nav bug fixes

* wip

* wip

* wip

* fix

* fix

* wip

* wip

* Simplify recording test.

* add concurrent async test

* fix

* wip

* Refact how detail dismisses itself.

* fix

* 5.6 fix

* wip

* wip

* Add TestStore.assert.

* Revert "Add TestStore.assert."

This reverts commit a892cccc66.

* add Ukrainian Readme.md (#2121)

* Add TestStore.assert. (#2123)

* Add TestStore.assert.

* wip

* Update Sources/ComposableArchitecture/TestStore.swift

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

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

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

* fix tests

---------

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

* Run swift-format

* push for store.finish and presentation

* move docs around

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add case subscripts

* wip

* wip

* 5.7-only

* wip

* wip

* wip

* wip

* revert store.finish task cancellation

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* add test for presentation scope

* wip

* wip

* wip

* wip

* wip

* cleanup

* updated presentation scope test

* sytnax update

* clean up

* fix test

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Martin Václavík <mvaclavik96@icloud.com>
Co-authored-by: 유재호 <y73447jh@gmail.com>
Co-authored-by: Jackson Utsch <jutechs@gmail.com>
Co-authored-by: Dmytro <barabashdmyto@gmail.com>
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com>
2023-05-30 12:22:00 -04:00
Stephen Celis
63972fa9ea Update SwiftUI Navigation to support new alert mappings (#1865)
* wip

* wip

* wip

* Bump

* Update AlertStateUIKit.swift
2023-01-25 11:36:18 -08:00
Brandon Williams
6f33e07a7a Use @StateObject for iOS 15+ alert modifier. (#1860) 2023-01-23 16:04:28 -08: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
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
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
Brandon Williams
90d91ffedc Clean up compiler checks. (#1167) 2022-06-28 16:05:50 -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
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
Thomas Visser
068333afdc Make AlertState.ButtonAction.type public (#871) 2021-10-25 16:16:06 -04:00
Stephen Celis
0cd0c3ecce Update AlertState to use new APIs (#794)
* Update AlertState to use new APIs

* fix

* Feedback

* wip

* Fix

* wip

* wip

* wip

* wip
2021-09-20 10:42:17 -04:00
stephencelis
3c51885b98 Run swift-format 2021-08-25 19:56:19 +00:00
Stephen Celis
575d7c0d59 Use Custom Dump (#736)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* wip

* Model Tic-Tac-Toe board using proper type

* wip

* wip

* wip

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-08-22 22:45:27 -04:00
Stephen Celis
5209f47b03 Update AlertState.Button APIs for animation (#681)
* Update AlertState.Button APIs for animation

* fix

* wip

* deprecate
2021-07-28 12:10:15 -04:00
Bernhard Loibl
71be9d9676 Enables animations for alert button actions (#680)
* Enables animations for alert button actions.

* Updates alert button api and previews.

Co-authored-by: Bernhard Loibl <bernhard.loibl@intive.com>
2021-07-28 10:21:41 -04:00
Stephen Celis
d30336ca13 Clean-up pass for DocC (#599) 2021-06-16 08:48:14 -05:00
Wendy Liga
1a8bccc62e Support DocC Xcode 13 (#591)
* wip

* finish

* revert back code snippet identation to 5

* Update Sources/ComposableArchitecture/Effect.swift

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

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
2021-06-14 14:10:08 -04:00
Brandon Williams
468ffaa9ea Fix typo in AlertState docs (#520) 2021-04-29 08:09:33 -05:00
Stephen Celis
f1faccc3a2 Updated TestStore DSL (#454)
* Update TestStore to support imperative DSL

This gives us better XCTIssue-based error messaging since each line is
captured in the stack.

* Update examples to new testing DSL

* Fix

* Update README.md

* 11.3

* fix

* fix
2021-03-22 13:27:51 -04:00
Stephen Celis
a8a5bcec1d Re-publicize AlertState.Button.type (#361)
* Re-publicize `AlertState.Button.type`

* Update Alert.swift
2021-01-22 10:24:31 -05:00
Stephen Celis
4449bc2e24 Add TextState (for AlertState, ActionSheetState, etc.) (#359)
* Use SwiftUI.Text with {Alert,ActionSheet}State

Fix #293, #318.

* Use public interface

* Availability

* TextState

* Note

* Simplify

* Update LocalizedStringTests.swift

* Fix warnings

* Fix docs
2021-01-21 17:50:34 -05:00
Stephen Celis
5171335620 Localizable Alerts and Action Sheets (#275)
* Localizable Alerts and Action Sheets

Fixes #237.

* Tests/fixes

* Update LocalizedStringKey.swift

* Fix
2020-08-31 16:31:34 -04:00
Stephen Celis
7f482acbf4 Alert bug exploration (#249)
* wip

* Fix

* revert

* Fix tests

* Better debug output

* organize

* alphabetize

* Fix mac

Co-authored-by: Brandon Williams <mbw234@gmail.com>
2020-08-10 12:47:36 -04:00
Jasdev Singh
576d0f9b0d Fixes small viewStoreself.store typo in AlertState’s docs. (#208) 2020-07-03 18:16:42 -04:00
Brandon Williams
a905fbf5ec Generic alerts and action sheets (#201)
* alerts

* wip

* wip

* wip

* clean up

* wip

* wip

* wip

* wip

* format

* clean up

* clean up

* docs

* wip

* tests

* API tweaks

* Fix

* More API changes

* More API changes

* More

* Fix

* Fix docs

* Generic alerts optionality (#202)

* Use Optional to model generic alerts

* Xcode 12

* Refinement

* update docs

* Fix

* Fix

* doc fixes

* rename

* fixes

* fixes

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2020-06-30 09:48:36 -05:00