87 Commits

Author SHA1 Message Date
Brandon Williams
2fe78298e3 Rename some generics in the store rescoping. (#1320) 2022-08-31 13:36:51 -04:00
Brandon Williams
7b5bc85f2e Update Effect internals to be more efficient. (#1312)
* Distinguish Combine and async effects from each other

* wip

* wip

* wip

* Add some tests

* wip

* wip

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-08-30 19:40:50 -04:00
Stephen Celis
238404dc68 Send should explicitly wrap @MainActor closure (#1311) 2022-08-30 13:03:38 -04:00
mbrandonw
eeb7c216d5 Run swift-format 2022-08-15 16:08:16 +00:00
Brandon Williams
c04272e63f Soft deprecate Effect.unimplemented. (#1265)
* Soft deprecate Effect.unimplemented.

* move deprecation back to effect file

* wip

* wip
2022-08-15 11:58:57 -04:00
stephencelis
bf6a0bdaf7 Run swift-format 2022-08-08 05:17:33 +00: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
Stephen Celis
b8dddaf0bf Clean up generic signatures (#1143) 2022-06-14 09:39:05 -04:00
Stephen Celis
dc9dd315ee Cleanup (#1107) 2022-05-24 15:15:57 -04:00
Stephen Celis
c307541328 Allow synchronous fireAndForget to throw (#1092) 2022-05-16 12:40:28 -04:00
Brandon Williams
07cd0c2cf3 Add priority to async fireAndForget. (#1084)
* Add priority to async fireAndForget.

* actually use priority
2022-05-06 18:58:04 -07:00
Brandon Williams
1fe9fb7e95 Async fire-and-forget (#1083)
* Make fireAndForget async.

* wip

* tests
2022-05-06 13:30:23 -07:00
Kevin Lundberg
1a2dd2d505 Add a map-style overload to eraseToEffect (#1050) 2022-04-07 09:40:52 -04:00
Stephen Celis
365d141689 Fix docs (#975)
* Fix docs

Fixes #974.

* Update ci.yml
2022-01-18 10:02:36 -05:00
iampatbrown
7fec6a4df7 Pass attemptToFulfill directly to Future (#743) 2021-08-24 23:46:19 -04:00
stephencelis
67ccab6bce Run swift-format 2021-08-11 16:13:31 +00:00
Brandon Williams
65b9f7bf07 Catch to effect updates (#707)
* Update catchToEffect docs.

* clean up
2021-08-11 11:30:55 -04:00
mbrandonw
e4a480ce9d Run swift-format 2021-08-11 15:09:43 +00:00
Eimantas
803f1b4b88 Add catchToEffect() with mapping function (#705)
Also add a couple of tests to testEraseToEffectWithError
2021-08-11 11:00:00 -04:00
Adam Roben
5c925e39cb Fix build error when minimum target is macOS 11.0 (#686)
macOS 11.0 introduced an overload of Publisher.flatMap(maxPublishers:_:)
for when the failure type is Never, documented here:
https://developer.apple.com/documentation/combine/publisher/flatmap(maxpublishers:_:)-qxf

This causes a compiler error in Effect.fireAndForget when the minimum
deployment target is 11.0 or later:

    Sources/ComposableArchitecture/Effect.swift:364:7: error: ambiguous use of 'flatMap(maxPublishers:_:)'
          self
          ^
    Combine.Publisher:3:17: note: found this candidate
        public func flatMap<T, P>(maxPublishers: Subscribers.Demand = .unlimited, _ transform: @escaping (Self.Output) -> P) -> Publishers.FlatMap<P, Self> where T == P.Output, P : Publisher, Self.Failure == P.Failure
                    ^
    Combine.Publisher:3:17: note: found this candidate
        public func flatMap<P>(maxPublishers: Subscribers.Demand = .unlimited, _ transform: @escaping (Self.Output) -> P) -> Publishers.FlatMap<Publishers.SetFailureType<P, Self.Failure>, Self> where P : Publisher, P.Failure == Never
                    ^

We can fix this by adding explicit type parameters to the Empty
publisher used in the flatMap().
2021-07-29 17:42:00 -04:00
Stephen Celis
d30336ca13 Clean-up pass for DocC (#599) 2021-06-16 08:48:14 -05:00
mbrandonw
e043226f3d Run swift-format 2021-06-14 18:15:34 +00: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
4ea3dfed61 Work around Combine-related crash on iOS 13 (#483)
* Fix Combine crash for iOS 13.

* Clean up

* remove scheme
2021-04-08 08:18:36 -07:00
Stephen Celis
e45b7ecc03 Remove old Effect.fireAndForget() (#430)
* Update Effect.swift

* Update Effect.swift

* Update Effect.swift
2021-03-15 11:08:28 -04:00
stephencelis
5a4a9d5005 Run swift-format 2021-03-15 14:35:31 +00:00
Stephen Celis
2e6d34e26d Add more permissive fire-and-forget effect (#427)
* Add more permissive fire-and-forget effect

* Update Effect.swift

* Update Effect.swift
2021-03-15 10:27:56 -04:00
Brandon Williams
ea55ef174e Fix fireAndForget on iOS 13.2 (#240)
* Fix fireAndForget on iOS 13.2

* Drop Xcode 11.2.1, too flakey
2020-07-29 13:06:20 -04:00
Stephen Celis
21f2dd52ae Merge debug reducer to avoid Combine leak (#195) 2020-06-22 10:43:18 -04:00
Stephen Celis
882e13ffe5 Update Naming of Navigation Case Studies (#177) 2020-06-08 17:40:46 -04:00
Anton Siliuk
ef465884f9 Replace 'receive(subscriber:)' with 'subscribe()' (#158) 2020-05-30 12:19:08 -04:00
Brandon Williams
1005bbd393 Signpost instrumentation of reducers (#142)
* Signpost higher-order reducer.

* cleanup

* guard

* clean up

* wip

* more

* wip

* wip

* wip

* clean up

* clean up

* wip

* run

* wip

* wip

* clean up

* Update Makefile

* No failures

* cleanup

* Update Makefile

* already guarded

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2020-05-27 10:22:10 -07:00
Johan Kool
7af4802543 Typo in Effect.swift (#108) 2020-05-16 15:25:25 -07:00
Stephen Celis
0807f9a8f8 Rename certain Effect APIs (#92)
* Rename certain Effect APIs

* Move deprecations

* Fix
2020-05-13 14:12:56 -04:00
Stephen Celis
940207c4ff Minor tweaks to Effect's API for consistency (#90) 2020-05-13 13:13:37 -04:00
Glenn Gonda
7384bd915e Documentation clean up (#11)
* fix some docs

* Update Sources/ComposableArchitecture/Reducer.swift

* Update Sources/ComposableArchitecture/CasePaths/EnumReflection.swift

Co-authored-by: Glenn Gonda <ggonda@pixsystem.com>
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2020-05-04 15:38:52 -04:00
Brandon Williams
d2240d0e76 The Composable Architecture
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2020-05-03 22:26:28 -07:00