While we should get both dependencies picked up from
swift-dependencies' exports, we've heard reports from folks that they're
getting linker/symbol errors here. We should update these uses
regardless!
* Add support for custom decoding/encoding to `fileStorage`
* Update FileStorageKey.swift
---------
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
* Make 'didSet' main actor.
* tests for AppStorageKey
* wip
* tests
* clean up
* Update Sources/ComposableArchitecture/SharedState/PersistenceKey/AppStorageKey.swift
* Update Sources/ComposableArchitecture/SharedState/PersistenceKey/AppStorageKeyPathKey.swift
* try working around CI problem
* Added NB
* wip
* Update MigratingTo1.11.md
---------
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Currently, the following reducer enum:
```swift
@Reducer
enum Destination {
case alert(AlertState<Never>)
}
```
Generates the following action:
```swift
@CasePathable
enum Action {
case alert(AlertState<Never>.Action)
}
```
And this produces a warning in Case Paths 1.5 due to the nested `Never`
not being referenced directly.
This PR plucks the action type out and embeds it directly, instead:
```diff
-case alert(AlertState<Never>.Action)
+case alert(Never)
```
Which will allow us to better suppress warnings Swift emits for
uninhabited types.
* Disfavor shared optional dynamic member lookup
This makes the default work as expected, avoiding the issue brought up
in #3169.
Technically this breaks the following invocation:
```swift
if let wrapped = $shared.optional { /* ... */ }
```
And limits the warning to:
```swift
func share<T>(_: Shared<T>?) {}
share($shared.optional)
```
We consider this lookup to be a bug, though, which is already deprecated
in 1.11.0.
Since we encourage folks to migrate by one minor version at a time, we
should only merge this when we plan on releasing 1.12.0.
* wip
* failing AppStorageKey stored value and set to nil
* setting SharedAppStorageLocals when removing
* Clean up
---------
Co-authored-by: Brandon Williams <mbrandonw@hey.com>
`AnyCasePath` closures will be required to be `@Sendable` for Swift 6
data race checking, but `Enum.case` functions are not `@Sendable`
implicitly. As such we cannot pass `Enum.case` directly to functions
that expect sendable closures. Instead, we must explicitly write:
```swift
{ .case($0) }
```
* Support swift-syntax from 600.0.0-latest
The Xcode 16 beta generates macro projects using these swift-syntax
snapshots. Luckily things seem to be backwards compatible, so we can
expand our supported range.
* wip
* Fixes for TestingSyncUpForm
* Typo, heirarchy -> hierarchy
* Typo: recursive -> recursively
* Typo: comes -> combines
* Further fixes for TestingSyncUpForm
* Typo: is -> to be
* Typo: add -> we added
* Typo: 3 -> 2
* Adding a note to avoid confusion
* Add more detail to step
* Remove stray whitespace causing a diff to incorrectly display
* Removed step documentation for unused code
* Typo: apart -> a part
* Fix App.Path Equatable conformance
* App -> AppReducer to avoid conflict with SwiftUI.App
* Fix code file link
* Typo: reducer -> reducers
* Add missing mock
* AppReducer -> AppFeature
* Standardize tutorial on `@Shared(.syncUps)`
* Fix mainactor placement
* Fix transcript param not compiling
* Add durationPerAttendee to be usable
* Add a minimal dismiss override to fit with the docs
* Fix commenting out of Tagged discussion
* Fix commenting out of TestingSyncUpDetail discussion
* Undo a whitespace change
* Partial revert of TestingSyncUpForm-02-code-0004.swift
* Undo unintentionally committed code
* Revert "Add missing mock"
This reverts commit 9672ecbd20.
* Revert "Fixes for TestingSyncUpForm"
This reverts commit 5bece14c2a.
* wip
---------
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
* Deprecate `Shared`'s optional dynamic member lookup overload
Currently, `Shared`'s dynamic member lookup is overloaded for
convenience:
```swift
$shared // Shared<Root>
$shared.value // Shared<Value>
$shared.optionalValue // Shared<Value>?
```
Unfortunately, this is also perhaps surprising, and goes against the
grain when folks might expect to be handed a `Shared<Value?>`.
Also, there are times when you have a `Shared<Value?>` already, and you
want to unwrap it. Dynamic member lookup doesn't help there (unless you
know you can call `$shared[dynamicMember: \.self]`), and so you need a
totally different operation to handle it:
```swift
if let unwrappedShared = Shared($optional) {
// Do something with 'Shared<Value>'
}
```
So let's avoid this confusion in the future and focus on a single API
for unwrapping shared values, which is the failable initializer that
mirrors an API on `Binding`.
* wip
* Update SharedReader.swift
* Update Shared.swift
* Update SharedReader.swift