Skip to content

Pull request#2

Open
Gleb-Kovalenko wants to merge 270 commits into
Incetro:feature/fork_pointfreefrom
pointfreeco:main
Open

Pull request#2
Gleb-Kovalenko wants to merge 270 commits into
Incetro:feature/fork_pointfreefrom
pointfreeco:main

Conversation

@Gleb-Kovalenko

Copy link
Copy Markdown

No description provided.

stephencelis and others added 30 commits August 30, 2024 09:14
* Address effect cancellation sendability

* fix

* wip

* wip
* Address `Reducer._printChanges()` sendability

Because printing is done on a queue, both `State` and `Action` must be
sendable. While `State` is easy enough to make sendable, it might be a
pain to do so in a large, modularized application. Actions are not
always so easy, but are in simple cases.

Alternately, since this is a debugging affordance:

1. We could forego sendability since all we're doing is hitting it with
   a `Mirror` at the end of the day, and traffic the state/action along
   in a `nonisolated(unsafe)`.

2. We could ditch the queue...but that could affect the performance
   pretty negatively in some cases.

* Unchecked send the debug printing
* Require main actor isolation in store collection

* `preconditionIsolated` is not available in iOS <14

* Update Sources/ComposableArchitecture/Observation/IdentifiedArray+Observation.swift
…rray (#3346)

* Added failing test to document behavior with observation and identified array.

* Update Tests/ComposableArchitectureTests/ObservableTests.swift

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
* Update 05-HigherOrderReducers CaseStudies

* Replace alert(store:) to alert(_:)

* View clean up.

* Fixed alert.

* Update DownloadComponent.swift

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
* Warn if bindable store binding action isn't processed

Looks like the warnings we emit when we detect `BindingReducer` is
missing are only applied to view stores, and were not ported over to the
newer observable store bindings.

This PR fixes that, though the main caveat is the messages can't seem to
point to any good context. These bindings are derived from dynamic
member lookup, which can't include source context like file/line.

* wip

* Add test
#3327)

* Edit 04-Navigation-Lists-NavigateAndLoad file in SwiftUI CaseStudies

* Update Examples/CaseStudies/SwiftUICaseStudies/04-Navigation-Lists-NavigateAndLoad.swift

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

* change selection Type to `Identified<Row.ID, Counter.State?>?`

---------

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
* Remove subscription on cancel

* Slight refactor

* Small refactor

Subscription keeps strong reference of `CurrentValueRelay` similar to `CurrentValueSubject`

* Add subscription lifetime tests

* Use weak subscriptions and remove inside send

* Change relay implementation

* For loop better

* Move tests to StoreTests.swift

* A few more locks and a Shared test.

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
* [FIX] Replace deprecated viewStore with store

* [FIX] Replace deprecated viewStore with store in Article

* [TEST] Match the changed view store message with the test message

* [TEST] Match the changed view store message with the test message
* Fixed shared deadlock.

* Fix deadlock>

* wip

* wip

* Improve test.
* Address @shared sendability.

* Undo UncheckedSendable<UserDefaults>.

* clean up

* wip

* drop AnySendable.

* wip

* Address `Effect.throttle` sendability (#3325)

* Address effect cancellation sendability (#3326)

* Address effect cancellation sendability

* fix

* wip

* wip

* Separate SendableDefaultSubscript from DefaultSubscript.

* fix test

* drop escaping

* switch on swift 6 language mode

* xcode 16

* update test

* wip

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
* Update issue template.

* wip
* Apply existential any to protocol for Swift 6

* Update Package@swift-6.0.swift

* Update Package.swift

* Apply any to Macro.Type

* Apply any for the rest

* Applying the any keyword internally for typealias in a _KeyPath

* Undoing accidental syntax

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
* Improve CI jobs.

* wip

* wip

* exclude

* more exclude

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* try out caching

* fix yml

* fix makefile syntax

* cache key

* wip

* fix

* wip

* wip

* boop

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* boop

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix visionos tests

* wip

* wip

* wip

* wip

* wip

* wip

* boop

* wip

* boop

* Update ci.yml

* Update Makefile

* Update Makefile

* clean up

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
stephencelis and others added 30 commits March 19, 2026 11:10
We've found a migration path that can preserve `Effect` as it exists
today, so let's make the pre-migration less annoying.

`EffectOf` will work fine for folks who have already migrated in
preparation.
Enum scoping does not currently have a hard trait deprecation associated
with it because overloads could cause existing apps to fail to compile
with the dreaded "complex expression" error.

Users should still have a migration path here, which is served by a
trait that can be enabled temporarily.
When using @Reducer on a public or package enum, the generated computed
properties inside AllCasePaths were missing the access modifier, defaulting
to internal. This made the enum scope API inaccessible across module
boundaries.

Fixes #3893
We'll favor wrapping with `withAnimation` in TCA2.
Alerts and confirmation dialogs held in `@Reducer enum`s will require a
bit of extra ceremony to be 2.0-compatible, but 2.0 will come with more
flexible tooling around handling prompts.
…n raises deprecation warning (#3906)

In a `View` context, reading a `@Shared` value from the store's state will raise a deprecation warning when the store's `Action` conforms to `BindableAction`.

```swift
@Reducer
struct Feature {
  @ObservableState
  struct State: Equatable {
    @shared(.inMemory("value")) var value: Int = 0
  }
  enum Action: BindableAction {
    case binding(BindingAction<State>)
  }
}

struct FeatureView: View {
  let store: StoreOf<Feature>

  var body: some View {
    let _ = store.value
    // 🛑 Setter for 'value' is deprecated: Use '$shared.withLock' to modify a shared value with exclusive access; when constructing a SwiftUI binding, use 'Binding($shared)'
  }
}
```

This is because the dynamicMemberLookup selects an overload that requires a `WritableKeyPath` which is enough to trigger Swift to require a setter for the property which is invalid for a `@Shared` value. Applying `@_disfavoredOverload` will drive the lookup toward an overload requiring a `KeyPath` instead.

Co-authored-by: Sean <sean@snowfort.software>
Fixes a compiler error by helping it disambiguate between this implementation of ~= and the more constrained one declared in Binding+Observation.swift
* Fix enum scoping to alerts

* wip
* Add `scope(_:action:)` and `Scope(_:action:)`

To prepare for changes coming in 2.0, we are introducing new scoping overloads that omit the
`state:` parameter label. This label is already omitted for some scoping operations (`ifLet`,
`forEach`, etc.) and is just added noise for the dominant part of the operation.

The old API has been trait-deprecated so that folks can migrate at their own pace without too much
noise.

* wip
* Update docs for Store.

* wip
* Xcode 27 Support

This pins Sharing to a fix branch of its own:

pointfreeco/swift-sharing#216

As well as what appears to be a regression in actor isolation checking.

* wip
* docs: fix binding action case patterns

* docs: fix Toggle binding label

* docs: fix switch syntax in bindings docs

* docs: fix closing delimiter in binding test example
* fix: SharingState fileStorage attribute syntax

* fix: SharingState code fence delimiter

* fix: SharingState fileStorage URL delimiter

* fix: SharingState shared state projection
* docs: update stack navigation testing example

* docs: wrap stack navigation test state in path case

* Apply suggestion from @mbrandonw

---------

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
- Add missing closing parenthesis to a store.send(.textFieldChanged("Hello")) example in Performance.md, consistent with the surrounding examples.
- Fix "trialing" -> "trailing" typo in TreeBasedNavigation.md.

Co-authored-by: devk4nt <devk4nt@users.noreply.github.com>
The FAQ's exhaustive-testing answer ended with "See  for more information on
testing in TCA", where the link to the testing article had been dropped,
leaving a double space and no reference. Link it to the already-defined
`[testing-article]` (`<doc:TestingTCA>`).
* fix await in TestStore state examples

* fix await in TestStore exhaustivity examples
* Add docs badge to readme

* wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.