Skip to content

Commit 84a5f27

Browse files
authored
chore: public accessor fixes (#18)
* chore: public accessor fixes * chore: bump TCA version * chore: run CI on 15.4 consistently --------- Co-authored-by: danthorpe <[email protected]>
1 parent d21a0f5 commit 84a5f27

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
{
2525
"os": "macos-14",
2626
"swift": "5.9",
27-
"xcode": "15.1"
27+
"xcode": "15.4"
2828
},
2929
{
3030
"os": "macos-14",
3131
"swift": "5.10",
32-
"xcode": "15.3"
32+
"xcode": "15.4"
3333
}
3434
]
3535
}

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var package = Package(
1414
],
1515
dependencies: [
1616
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
17-
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "1.9.0"),
17+
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "1.15.0"),
1818
],
1919
targets: [
2020
.target(

Sources/ComposableLoadable/Loadable/LoadableClient.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ package protocol LoadableClient<Request, State, Value> {
1010
var load: @Sendable (Request, State) async throws -> Value { get }
1111
}
1212

13-
public struct EmptyLoadRequest: Equatable {}
13+
public struct EmptyLoadRequest: Equatable {
14+
public init() {}
15+
}
1416

1517
struct LoadingClient<Request, State, Value>: LoadableClient {
1618
var load: @Sendable (Request, State) async throws -> Value

Sources/ComposableLoadable/Loadable/LoadableState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ extension LoadableState where Request == EmptyLoadRequest {
239239
self.init(request: EmptyLoadRequest(), failure: error)
240240
}
241241

242-
mutating func becomeActive() {
242+
mutating public func becomeActive() {
243243
becomeActive(EmptyLoadRequest())
244244
}
245245

246-
mutating func finish(
246+
mutating public func finish(
247247
_ result: Result<Value, Error>
248248
) {
249249
finish(EmptyLoadRequest(), result: result)

Sources/ComposableLoadable/Loadable/LoadingAction.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ extension LoadingAction where Request == EmptyLoadRequest {
2222

2323
// MARK: - Conformances
2424

25-
extension LoadingAction: Equatable where Value: Equatable {}
25+
extension LoadingAction: Equatable where Value: Equatable {
26+
// NOTE: Define conformance here, but implementation is below
27+
}
2628

2729
extension LoadingAction where Request: Equatable, Value: Equatable, Action: Equatable {
2830
public static func == (lhs: Self, rhs: Self) -> Bool {

Sources/ComposableLoadable/Pagination/PaginationFeature+.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ extension PaginationFeature.Action: Equatable where Element: Equatable {
4848
}
4949
}
5050
}
51+
52+
extension PaginationFeature: Equatable where Element: Equatable {
53+
public static func == (lhs: Self, rhs: Self) -> Bool {
54+
true // There is only behaviour in the reducer itself.
55+
}
56+
}

Sources/ComposableLoadable/Pagination/PaginationFeature.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ import Foundation
179179

180180
public typealias Page = State.Page
181181
public typealias PageRequest = State.PageRequest
182-
183182
public typealias LoadPage = @Sendable (PageRequest) async throws -> Page
184183

185184
public var body: some ReducerOf<Self> {

0 commit comments

Comments
 (0)