Commit Graph

1582 Commits

Author SHA1 Message Date
Stephen Celis
ef432a7ae1 wip 2024-10-24 10:40:22 -07:00
Stephen Celis
2009b9c3cb wip 2024-10-17 14:30:12 -07:00
Stephen Celis
d468b45abb wip 2024-10-17 14:17:30 -07:00
Stephen Celis
160bebb7a8 Shared: Simplify internal reference protocol 2024-10-16 14:31:38 -07:00
Stephen Celis
fc5cbeec88 Infrastructure: Address concurrency warnings in tests (#3438)
* Infrastructure: Address concurrency warnings in tests

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
1.15.1
2024-10-15 10:03:23 -07:00
Stephen Celis
f43a154fd4 Fix Swift <6 warning (#3445)
Bit casting a type to the type it already is produces a warning.
2024-10-15 10:03:03 -07:00
mbrandonw
1aca801ee2 Run swift-format 2024-10-14 17:09:44 +00:00
Brandon Williams
2d0590bedd Clean up key path bitcasting. (#3411)
* Clean up key path bitcasting.

* wip

* wip

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2024-10-14 13:08:23 -04:00
Christopher Rex
4699a1e613 Add explicit @mainactor to NavigationLink initializer (#3430)
* Add explicit @MainActor to NavigationLink initializer

* Access Notification from within an explicit Task

Fixes the "Conformance of 'Notification' to 'Sendable' is unavailable" error

* Revert "Add explicit @MainActor to NavigationLink initializer"

This reverts commit d8cb0706c1.

* Add explicit @MainActor to NavigationLink initializer

* Update Examples/CaseStudies/SwiftUICaseStudies/03-Effects-LongLiving.swift

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

* Update swift-navigation dependency version to 2.2.2

* Discard changes to Examples/CaseStudies/CaseStudies.xcodeproj/project.pbxproj

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update Package@swift-6

* Fix tests

---------

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2024-10-09 16:57:34 -07:00
mbrandonw
15a2accc28 Run swift-format 2024-10-09 17:46:30 +00:00
Brandon Williams
bc47c51ee6 Run sync ups tests with main serial executor (#3431)
* wip

* wip
2024-10-09 13:09:57 -04:00
Stephen Celis
f9f3e3a4cb Use AnyHashableSendable from Concurrency Extras (#3428)
* Use `AnyHashableSendable` from Concurrency Extras

Rather than use an ad hoc implementation with an `AnyHashable` under the
hood that may not be concurrency safe, let's adopt the helper we added
to the Concurrency Extras packages.

* fix

* wip

* wip
2024-10-08 13:08:38 -07:00
Stephen Celis
61e3809a97 CI: Don't xcbeautify Swift Testing suites (#3425)
* wip

* benchmark update

* wip

* Add CI for benchmarks

* wip

* Update benchmark.yml

* Update benchmark.yml

* Delete Benchmarks/Benchmarks/swift-composable-architecture-benchmark/ Benchmarks.swift

* Update benchmark.yml

* Update benchmark.yml

* Update Benchmarks.swift

* wip

* Delete .github/workflows/benchmark.yml

* Update Benchmarks.swift

* Add slight delay for expected failure

Test expected failure is flakey, so hopefully will pass more
consistently now.

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2024-10-07 16:52:39 -07:00
Stephen Celis
00cd6aaa0e Update documentation.yml 2024-10-03 15:39:36 -07:00
stephencelis
e98d09b400 Run swift-format 2024-10-03 18:54:43 +00:00
Stephen Celis
4cd62511ab Update benchmarks target (#3424)
* wip

* benchmark update

* wip

* Rename  Benchmarks.swift to Benchmarks.swift

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2024-10-03 11:53:20 -07:00
Mateusz Bąk
f043956877 Add Swift Macro Compatibility Check to CI (#3406)
* Add Swift Macro Compatibility Check GitHub Action

This PR adds a **Swift Macro Compatibility Check** GitHub Action to ensure that macro changes remain compatible across different versions of `swift-syntax`. The action automatically verifies compatibility with major `swift-syntax` versions (`509.0.0`, `510.0.0`, `600.0.0`), running builds and tests. It's also posible to turn on checking agains all versions of `swift-syntax`.

#### Key Benefits:
- **Automated Compatibility Checks**: No need to manually test changes across different `swift-syntax` versions—this is handled automatically in CI.
- **Prevents Breakages**: Helps avoid accidentally committing changes that break older versions.

* Use major versions only

* Use `v1` version

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2024-10-02 23:06:29 -07:00
Inhwan Kim
c8c97a45ae Add Import modules on NavigationStack tutorial source codes. (#3409) 2024-10-02 21:46:33 -07:00
Stephen Celis
85417e000e Update documentation and examples to use Swift Testing (#3413)
* Testing: Case Studies

* Testing: Search

* Testing: Speech Recognition

* Testing: SyncUps

* Project Settings

* Testing: TicTacToe

* Testing: Todos

* Testing: Voice Memos

* Update tutorials/docs

* fix

* Fixes

* wip

* Update ci.yml

* Update ci.yml

* Update ci.yml

* wip

* wip

* Quiet

* fix

* wip

* wip

* flaky

* wip

* wip

* fix
2024-10-02 16:28:33 -07:00
stephencelis
4c0866420f Run swift-format 2024-09-18 21:39:29 +00:00
Brandon Williams
52258dc115 Update case studies to run in Swift 6 mode. (#3394) 2024-09-18 14:38:18 -07:00
Ken Grigsby
6dc5f98629 Update documentation links (#3397) 2024-09-18 14:37:53 -07:00
Brandon Williams
d631d48c16 Added migration guide for 1.15 (#3390)
* Added migration guide for 1.15

* wip
2024-09-17 08:12:10 -04:00
Stephen Celis
dcecad3fe2 Soft-deprecate Store.ifLet (#3382)
* Soft-deprecate `Store.ifLet`

We can prefer `observe` and `if let store.scope` now.

* wip

* wip

* Update MigratingTo1.7.md

* wip
2024-09-13 13:51:00 -07:00
stephencelis
d750b2a96c Run swift-format 2024-09-12 21:30:41 +00:00
Stephen Celis
f1af33763e Swift 6 updates (#3379)
* Swift 6 updates

  - Soft-deprecate `_SynthesizedConformance` now that Xcode 16 has fixed
    this bug.
    - Update docs accordingly.

  - Document Xcode 16 macro gotcha around custom build configuration
    names.

* wip
2024-09-12 14:11:05 -07:00
mbrandonw
8013f1a72a Run swift-format 1.15.0 2024-09-12 17:49:35 +00:00
Brandon Williams
03ad0cce2d Bucket effect cancel IDs. (#3374)
* Bucket effect cancel IDs.

* wip

* wip

* remove cache reset

* wip

* wip

* wip
2024-09-12 13:48:39 -04:00
Stephen Celis
912192b619 Remove unused perception branches (#3376) 2024-09-12 08:10:06 -07:00
mbrandonw
5e9943d8cc Run swift-format 2024-09-10 18:13:25 +00:00
Brandon Williams
02292e70cf Improve CI jobs (#3357)
* 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>
2024-09-10 14:11:47 -04:00
stephencelis
e0367371e6 Run swift-format 2024-09-10 15:20:01 +00:00
Mason Kim
71cfb1ef2d Existential any to protocol for Swift 6 (#3370)
* 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>
2024-09-10 08:01:24 -07:00
Brandon Williams
af07aa947f Update issue template. (#3363)
* Update issue template.

* wip
2024-09-09 16:05:36 -04:00
Stephen Celis
19efcf62ce Update MigrationGuides.md 2024-09-09 12:40:56 -07:00
mbrandonw
12280a2253 Run swift-format 2024-09-06 20:47:24 +00:00
Brandon Williams
7c6fb26700 Address @Shared sendability. (#3329)
* 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>
2024-09-06 16:28:23 -04:00
mbrandonw
83ed123041 Run swift-format 2024-09-06 16:12:40 +00:00
Brandon Williams
2c8b1c0cad Fix potential deadlock in Shared (#3356)
* Fixed shared deadlock.

* Fix deadlock>

* wip

* wip

* Improve test.
2024-09-06 12:11:40 -04:00
이동영
105bc0f34a fix typo - encapsulates (#3354) 2024-09-05 20:53:18 -07:00
Mason Kim
71f8291ee7 Replace deprecated viewStore with store (#3341)
* [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
2024-09-05 14:41:59 -07:00
mbrandonw
0352611d2b Run swift-format 2024-09-05 21:06:01 +00:00
Pat Brown
5660c58164 Remove subscriptions from CurrentValueRelay when cancelled (#2699)
* 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>
2024-09-05 17:04:54 -04:00
Brandon Williams
87608bcb1b Add missing test 2024-09-05 11:56:42 -04:00
mino
64cf3e8509 fix typo (#3349) 2024-09-05 09:39:20 -04:00
stephencelis
a619c3fe60 Run swift-format 2024-09-05 01:39:30 +00:00
MaraMincho
80aac23cf5 Edit 04-Navigation-Lists-NavigateAndLoad file in SwiftUI CaseStudies (#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>
2024-09-04 18:37:51 -07:00
Stephen Celis
d5c2d7679f Warn if bindable store binding action isn't processed (#3347)
* 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
2024-09-04 18:37:41 -07:00
mbrandonw
e4371a552e Run swift-format 2024-09-04 19:19:54 +00:00
Mason Kim
5267e5b778 Update 05-HigherOrderReducers CaseStudies (#3342)
* 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>
2024-09-04 15:18:58 -04:00