A library for helping build high quality forms in SwiftUI and TCA
0

Configure Feed

Select the types of activity you want to include in your feed.

Restore swift-composable-forms TCA26 main support

Woodrow Melling (Jun 16, 2026, 1:48 PM -0600) 937ebcfb d337268f

Waiting for spindle ...
+26 -8
+13 -3
Package.swift
··· 1 - // swift-tools-version: 6.0 1 + // swift-tools-version: 6.1 2 2 // The swift-tools-version declares the minimum version of Swift required to build this package. 3 3 4 4 import PackageDescription ··· 15 15 dependencies: [ 16 16 .package( 17 17 url: "https://github.com/pointfreeco/TCA26", 18 - revision: "3ae5069eea3365f2c8d54a5a6eaaade344916e20" 18 + branch: "main", 19 + traits: ["Dependencies"] 19 20 ), 20 21 .package( 21 22 url: "https://github.com/pointfreeco/swift-dependencies", 22 23 branch: "26" 23 24 ), 25 + .package( 26 + url: "https://github.com/pointfreeco/swift-clocks", 27 + branch: "clocks-2" 28 + ), 24 29 ], 25 30 targets: [ 26 31 .target( ··· 32 37 ), 33 38 .testTarget( 34 39 name: "ComposableFormsTests", 35 - dependencies: ["ComposableForms"] 40 + dependencies: [ 41 + "ComposableForms", 42 + .product(name: "Clocks", package: "swift-clocks"), 43 + .product(name: "Dependencies", package: "swift-dependencies"), 44 + .product(name: "DependenciesTestSupport", package: "swift-dependencies"), 45 + ] 36 46 ), 37 47 ] 38 48 )
+9 -4
Sources/ComposableForms/Form.swift
··· 576 576 } 577 577 } 578 578 let cancelAsyncValidationTasks: (AnyHashable) -> Void = { field in 579 - self.cancelAsyncValidationTasks(for: field) 579 + let validationTaskIDs = self.validationTaskIDs(for: field) 580 + store.addTask { 581 + for validationTaskID in validationTaskIDs { 582 + validationTaskID.cancel() 583 + } 584 + } 580 585 store.addTask(id: self.observedChangeValidationTask) {} 581 586 } 582 587 let scheduleDebouncedObservedValidation: () -> Void = { ··· 764 769 ) 765 770 } 766 771 767 - private func cancelAsyncValidationTasks(for field: AnyHashable) { 768 - for trigger in validationTaskTriggers { 769 - self.validationTaskID(for: field, trigger: trigger)?.cancel() 772 + private func validationTaskIDs(for field: AnyHashable) -> [StoreTaskID] { 773 + validationTaskTriggers.compactMap { trigger in 774 + self.validationTaskID(for: field, trigger: trigger) 770 775 } 771 776 } 772 777
+4 -1
Tests/ComposableFormsTests/FormTests.swift
··· 1 + import Clocks 1 2 import ComposableArchitecture2 3 + import Dependencies 4 + import DependenciesTestSupport 2 5 import Foundation 3 6 import Testing 4 7 @testable import ComposableForms 5 8 6 9 @MainActor 7 - @Suite 10 + @Suite(.serialized) 8 11 struct FormTests { 9 12 @Test 10 13 func valueChangeDebouncesValidationForFieldsWithoutErrors() async {