diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b526c2..d64bcf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,14 @@ jobs: fail-fast: false matrix: include: + - xcode: "Xcode_16.0" + runsOn: macOS-14 + name: "macOS 14, Xcode 16.0, Swift 6.0" + params: "-skipMacroValidation" + - xcode: "Xcode_15.4" + runsOn: macOS-14 + name: "macOS 14, Xcode 15.4, Swift 5.10" + params: "-skipMacroValidation" - xcode: "Xcode_15.0" runsOn: macos-13 name: "macOS 13, Xcode 15.0, Swift 5.9.0" @@ -42,27 +50,17 @@ jobs: runsOn: macos-13 name: "macOS 13, Xcode 14.3.1, Swift 5.8.0" params: "" - - xcode: "Xcode_14.2" - runsOn: macOS-12 - name: "macOS 12, Xcode 14.2, Swift 5.7.2" - - xcode: "Xcode_14.1" - runsOn: macOS-12 - name: "macOS 12, Xcode 14.1, Swift 5.7.1" - params: "" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} run: xcodebuild test -scheme "Blade-Package" -destination "platform=macOS" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.5.0 + - name: Upload test coverage reports to Codecov + uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main with: + scheme_name: Blade-Package + filename: ${{ matrix.name }} token: ${{ secrets.CODECOV_TOKEN }} - xcode: true - xcode_archive_path: test_output/${{ matrix.name }}.xcresult - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: test_output + iOS: name: ${{ matrix.name }} runs-on: ${{ matrix.runsOn }} @@ -73,6 +71,21 @@ jobs: fail-fast: false matrix: include: + - destination: "OS=18.1,name=iPhone 16 Pro" + name: "iOS 18.1" + xcode: "Xcode_16.1" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=18.0,name=iPhone 16 Pro" + name: "iOS 18.0" + xcode: "Xcode_16.0" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=17.5,name=iPhone 15 Pro" + name: "iOS 17.5" + xcode: "Xcode_15.4" + runsOn: macOS-14 + params: "-skipMacroValidation" - destination: "OS=17.0.1,name=iPhone 14 Pro" name: "iOS 17.0.1" xcode: "Xcode_15.0" @@ -87,10 +100,13 @@ jobs: - uses: actions/checkout@v3 - name: ${{ matrix.name }} run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 - - uses: actions/upload-artifact@v4 + - name: Upload test coverage reports to Codecov + uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main with: - name: ${{ matrix.name }} - path: test_output + scheme_name: Blade-Package + filename: ${{ matrix.name }} + token: ${{ secrets.CODECOV_TOKEN }} + tvOS: name: ${{ matrix.name }} runs-on: ${{ matrix.runsOn }} @@ -101,6 +117,21 @@ jobs: fail-fast: false matrix: include: + - destination: "OS=18.1,name=Apple TV" + name: "tvOS 18.1" + xcode: "Xcode_16.1" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=18.0,name=Apple TV" + name: "tvOS 18.0" + xcode: "Xcode_16.0" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=17.5,name=Apple TV" + name: "tvOS 17.5" + xcode: "Xcode_15.4" + runsOn: macOS-14 + params: "-skipMacroValidation" - destination: "OS=17.0,name=Apple TV" name: "tvOS 17.0" xcode: "Xcode_15.0" @@ -115,16 +146,13 @@ jobs: - uses: actions/checkout@v3 - name: ${{ matrix.name }} run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.5.0 + - name: Upload test coverage reports to Codecov + uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main with: + scheme_name: Blade-Package + filename: ${{ matrix.name }} token: ${{ secrets.CODECOV_TOKEN }} - xcode: true - xcode_archive_path: test_output/${{ matrix.name }}.xcresult - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: test_output + watchOS: name: ${{ matrix.name }} runs-on: ${{ matrix.runsOn }} @@ -135,6 +163,21 @@ jobs: fail-fast: false matrix: include: + - destination: "OS=11.1,name=Apple Watch Series 10 (46mm)" + name: "watchOS 11.1" + xcode: "Xcode_16.1" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=11.0,name=Apple Watch Series 10 (46mm)" + name: "watchOS 11.0" + xcode: "Xcode_16.0" + runsOn: macOS-14 + params: "-skipMacroValidation" + - destination: "OS=10.5,name=Apple Watch Series 9 (45mm)" + name: "watchOS 10.5" + xcode: "Xcode_15.4" + runsOn: macOS-14 + params: "-skipMacroValidation" - destination: "OS=10.0,name=Apple Watch Series 9 (45mm)" name: "watchOS 10.0" xcode: "Xcode_15.0" @@ -145,25 +188,17 @@ jobs: xcode: "Xcode_14.3.1" runsOn: macos-13 params: "" - - destination: "OS=8.5,name=Apple Watch Series 7 (45mm)" - name: "watchOS 8.5" - xcode: "Xcode_14.3.1" - runsOn: macos-13 - params: "" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.5.0 + - name: Upload test coverage reports to Codecov + uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main with: + scheme_name: Blade-Package + filename: ${{ matrix.name }} token: ${{ secrets.CODECOV_TOKEN }} - xcode: true - xcode_archive_path: test_output/${{ matrix.name }}.xcresult - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: test_output + spm: name: ${{ matrix.name }} runs-on: ${{ matrix.runsOn }} @@ -174,18 +209,22 @@ jobs: fail-fast: false matrix: include: - - name: "Xcode 15" + - name: "macOS 14, SPM 6.0.2 Test" + xcode: "Xcode_16.1" + runsOn: macOS-14 + - name: "macOS 14, SPM 6.0.0 Test" + xcode: "Xcode_16.0" + runsOn: macOS-14 + - name: "macOS 14, SPM 5.9.0 Test" xcode: "Xcode_15.0" - runsOn: macos-13 - - name: "Xcode 14" + runsOn: macos-14 + - name: "macOS 13, SPM 5.8.1 Test" xcode: "Xcode_14.3.1" runsOn: macos-13 steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - run: | - swift build -c release --target "Blade" - swift build -c release --target "BladeTCA" + run: swift build -c release merge-test-reports: needs: [iOS, macOS, watchOS, tvOS] @@ -204,14 +243,14 @@ jobs: discover-typos: name: Discover Typos - runs-on: macOS-12 + runs-on: macOS-13 env: DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Discover typos run: | export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin" python3 -m pip install --upgrade pip python3 -m pip install codespell - codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" + codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" \ No newline at end of file diff --git a/.swiftlint.yml b/.swiftlint.yml index 44740c2..f70bfd6 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -3,6 +3,8 @@ excluded: - Package.swift - Package@swift-5.7.swift - Package@swift-5.8.swift + - Package@swift-5.9.swift + - Package@swift-5.10.swift - .build # Rules @@ -134,4 +136,4 @@ nesting: type_name: max_length: warning: 40 - error: 50 \ No newline at end of file + error: 50 diff --git a/CHANGELOG.md b/CHANGELOG.md index d369d25..eb01ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +## [Unreleased] + +#### Added +- Bump the Swift version to 6.0. + - Added in Pull Request [#6](https://github.com/space-code/blade/pull/6). + #### 1.x Releases - `1.0.x` Releases - [1.0.0](#100) | [1.1.0](#110) diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 4284f1c..0000000 --- a/Package.resolved +++ /dev/null @@ -1,113 +0,0 @@ -{ - "pins" : [ - { - "identity" : "combine-schedulers", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/combine-schedulers", - "state" : { - "revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb", - "version" : "1.0.0" - } - }, - { - "identity" : "swift-case-paths", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-case-paths", - "state" : { - "revision" : "76d7791b5bda47df7e3d4690c4c3aaf089730707", - "version" : "1.2.1" - } - }, - { - "identity" : "swift-clocks", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-clocks", - "state" : { - "revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33", - "version" : "1.0.2" - } - }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections", - "state" : { - "revision" : "d029d9d39c87bed85b1c50adee7c41795261a192", - "version" : "1.0.6" - } - }, - { - "identity" : "swift-composable-architecture", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-composable-architecture.git", - "state" : { - "revision" : "ae491c9e3f66631e72d58db8bb4c27dfc3d3afd4", - "version" : "1.6.0" - } - }, - { - "identity" : "swift-concurrency-extras", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-concurrency-extras", - "state" : { - "revision" : "bb5059bde9022d69ac516803f4f227d8ac967f71", - "version" : "1.1.0" - } - }, - { - "identity" : "swift-custom-dump", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-custom-dump", - "state" : { - "revision" : "aedcf6f4cd486ccef5b312ccac85d4b3f6e58605", - "version" : "1.1.2" - } - }, - { - "identity" : "swift-dependencies", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-dependencies", - "state" : { - "revision" : "adb04a8e35f07edc001877af9f9f97fcc21d409e", - "version" : "1.2.0" - } - }, - { - "identity" : "swift-identified-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-identified-collections", - "state" : { - "revision" : "d1e45f3e1eee2c9193f5369fa9d70a6ddad635e8", - "version" : "1.0.0" - } - }, - { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax", - "state" : { - "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d", - "version" : "509.1.1" - } - }, - { - "identity" : "swiftui-navigation", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swiftui-navigation", - "state" : { - "revision" : "78f9d72cf667adb47e2040aa373185c88c63f0dc", - "version" : "1.2.0" - } - }, - { - "identity" : "xctest-dynamic-overlay", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", - "state" : { - "revision" : "b58e6627149808b40634c4552fcf2f44d0b3ca87", - "version" : "1.1.0" - } - } - ], - "version" : 2 -} diff --git a/Package@swift-5.10.swift b/Package@swift-5.10.swift new file mode 100644 index 0000000..58f87e9 --- /dev/null +++ b/Package@swift-5.10.swift @@ -0,0 +1,40 @@ +// swift-tools-version: 5.10 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Blade", + platforms: [ + .iOS(.v13), + .macOS(.v11), + .tvOS(.v13), + .watchOS(.v7), + .visionOS(.v1), + ], + products: [ + .library(name: "Blade", targets: ["Blade"]), + .library(name: "BladeTCA", targets: ["BladeTCA"]), + ], + dependencies: [ + .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", .upToNextMajor(from: "1.5.5")), + ], + targets: [ + .target(name: "Blade"), + .target( + name: "BladeTCA", + dependencies: [ + "Blade", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), + .testTarget(name: "BladeTests", dependencies: ["Blade"]), + .testTarget( + name: "BladeTCATests", + dependencies: [ + "BladeTCA", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), + ] +) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 0000000..fa74cab --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,40 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Blade", + platforms: [ + .iOS(.v13), + .macOS(.v11), + .tvOS(.v13), + .watchOS(.v7), + .visionOS(.v1), + ], + products: [ + .library(name: "Blade", targets: ["Blade"]), + .library(name: "BladeTCA", targets: ["BladeTCA"]), + ], + dependencies: [ + .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", .upToNextMajor(from: "1.5.5")), + ], + targets: [ + .target(name: "Blade"), + .target( + name: "BladeTCA", + dependencies: [ + "Blade", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), + .testTarget(name: "BladeTests", dependencies: ["Blade"]), + .testTarget( + name: "BladeTCATests", + dependencies: [ + "BladeTCA", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), + ] +) diff --git a/Sources/Blade/Classes/Core/Paginator/PageLoader/ICursorPageLoader.swift b/Sources/Blade/Classes/Core/Paginator/PageLoader/ICursorPageLoader.swift index 1424f7e..85713bd 100644 --- a/Sources/Blade/Classes/Core/Paginator/PageLoader/ICursorPageLoader.swift +++ b/Sources/Blade/Classes/Core/Paginator/PageLoader/ICursorPageLoader.swift @@ -5,7 +5,7 @@ import Foundation -public protocol ICursorPageLoader { +public protocol ICursorPageLoader: Sendable { /// The type of elements the paginator is handling, which must conform to `Decodable` & `Equatable`. associatedtype Element: Decodable & Equatable & Identifiable diff --git a/Sources/Blade/Classes/Core/Paginator/PageLoader/IOffsetPageLoader.swift b/Sources/Blade/Classes/Core/Paginator/PageLoader/IOffsetPageLoader.swift index 140a149..fba2d4f 100644 --- a/Sources/Blade/Classes/Core/Paginator/PageLoader/IOffsetPageLoader.swift +++ b/Sources/Blade/Classes/Core/Paginator/PageLoader/IOffsetPageLoader.swift @@ -5,7 +5,7 @@ import Foundation -public protocol IOffsetPageLoader { +public protocol IOffsetPageLoader: Sendable { /// The type of elements the paginator is handling, which must conform to `Decodable` & `Equatable`. associatedtype Element: Decodable & Equatable diff --git a/Sources/Blade/Classes/Core/Paginator/Strategies/CursorSeekStrategy.swift b/Sources/Blade/Classes/Core/Paginator/Strategies/CursorSeekStrategy.swift index 804dd4e..829087f 100644 --- a/Sources/Blade/Classes/Core/Paginator/Strategies/CursorSeekStrategy.swift +++ b/Sources/Blade/Classes/Core/Paginator/Strategies/CursorSeekStrategy.swift @@ -7,7 +7,7 @@ import Foundation // MARK: - CursorSeekStrategy -actor CursorSeekStrategy { +actor CursorSeekStrategy: Sendable { // MARK: Properties private let configuration: PaginationCursorSeek diff --git a/Sources/Blade/Classes/Core/Paginator/Strategies/LimitOffsetStrategy.swift b/Sources/Blade/Classes/Core/Paginator/Strategies/LimitOffsetStrategy.swift index e3bfc41..aa19eaa 100644 --- a/Sources/Blade/Classes/Core/Paginator/Strategies/LimitOffsetStrategy.swift +++ b/Sources/Blade/Classes/Core/Paginator/Strategies/LimitOffsetStrategy.swift @@ -7,7 +7,7 @@ import Foundation // MARK: - LimitOffsetStrategy -actor LimitOffsetStrategy { +actor LimitOffsetStrategy: Sendable { // MARK: Properties private let configuration: PaginationLimitOffset diff --git a/Sources/Blade/Classes/Core/Paginator/Strategies/Protocols/IPaginationStrategy.swift b/Sources/Blade/Classes/Core/Paginator/Strategies/Protocols/IPaginationStrategy.swift index a0f6e86..c152955 100644 --- a/Sources/Blade/Classes/Core/Paginator/Strategies/Protocols/IPaginationStrategy.swift +++ b/Sources/Blade/Classes/Core/Paginator/Strategies/Protocols/IPaginationStrategy.swift @@ -5,4 +5,4 @@ import Foundation -protocol IPaginationStrategy: IPaginator where Element: Decodable & Equatable {} +protocol IPaginationStrategy: IPaginator, Sendable where Element: Decodable & Equatable {} diff --git a/Sources/Blade/Classes/Models/Configuration/PaginationCursorSeek.swift b/Sources/Blade/Classes/Models/Configuration/PaginationCursorSeek.swift index dd57163..0d00087 100644 --- a/Sources/Blade/Classes/Models/Configuration/PaginationCursorSeek.swift +++ b/Sources/Blade/Classes/Models/Configuration/PaginationCursorSeek.swift @@ -5,7 +5,7 @@ import Foundation -public struct PaginationCursorSeek { +public struct PaginationCursorSeek: @unchecked Sendable { // MARK: Properties public let id: T.ID diff --git a/Sources/Blade/Classes/Models/Configuration/PaginationLimitOffset.swift b/Sources/Blade/Classes/Models/Configuration/PaginationLimitOffset.swift index 0ce0315..8e7a957 100644 --- a/Sources/Blade/Classes/Models/Configuration/PaginationLimitOffset.swift +++ b/Sources/Blade/Classes/Models/Configuration/PaginationLimitOffset.swift @@ -5,7 +5,7 @@ import Foundation -public struct PaginationLimitOffset { +public struct PaginationLimitOffset: Sendable { // MARK: Properties public let firstPage: Int diff --git a/Sources/Blade/Classes/Models/Page.swift b/Sources/Blade/Classes/Models/Page.swift index 5b99678..0035b00 100644 --- a/Sources/Blade/Classes/Models/Page.swift +++ b/Sources/Blade/Classes/Models/Page.swift @@ -6,7 +6,7 @@ import Foundation /// A generic struct representing a paginated collection of items. -public struct Page: Equatable { +public struct Page: Equatable, @unchecked Sendable { // MARK: Properties /// An array of items of generic type T contained in the current page. diff --git a/Sources/Blade/Classes/Models/Requests/CursorPaginationRequest.swift b/Sources/Blade/Classes/Models/Requests/CursorPaginationRequest.swift index eea7eb3..cdfcca4 100644 --- a/Sources/Blade/Classes/Models/Requests/CursorPaginationRequest.swift +++ b/Sources/Blade/Classes/Models/Requests/CursorPaginationRequest.swift @@ -5,7 +5,7 @@ import Foundation -public struct CursorPaginationRequest: Equatable { +public struct CursorPaginationRequest: Equatable, @unchecked Sendable { // MARK: Properties public let id: T.ID diff --git a/Sources/Blade/Classes/Models/Requests/OffsetPaginationRequest.swift b/Sources/Blade/Classes/Models/Requests/OffsetPaginationRequest.swift index ff30950..dfc7bf9 100644 --- a/Sources/Blade/Classes/Models/Requests/OffsetPaginationRequest.swift +++ b/Sources/Blade/Classes/Models/Requests/OffsetPaginationRequest.swift @@ -6,7 +6,7 @@ import Foundation /// A struct representing a request for paginated data with specified limits and offsets. -public struct OffsetPaginationRequest: Equatable { +public struct OffsetPaginationRequest: Equatable, Sendable { // MARK: Properties /// The maximum number of items to be included in a page. diff --git a/Sources/BladeTCA/Classes/COre/Reducers/Internal/PaginatorIntegrationReducer.swift b/Sources/BladeTCA/Classes/COre/Reducers/Internal/PaginatorIntegrationReducer.swift index a05aa9a..717a0b7 100644 --- a/Sources/BladeTCA/Classes/COre/Reducers/Internal/PaginatorIntegrationReducer.swift +++ b/Sources/BladeTCA/Classes/COre/Reducers/Internal/PaginatorIntegrationReducer.swift @@ -12,7 +12,7 @@ struct PaginatorIntegrationReducer< Action: Equatable, PositionType: Equatable, Request: Equatable ->: Reducer { +>: Reducer, @unchecked Sendable where Parent.State: Sendable, Request: Sendable { // MARK: Properties let parent: Parent diff --git a/Sources/BladeTCA/Classes/COre/Reducers/Reducer+.swift b/Sources/BladeTCA/Classes/COre/Reducers/Reducer+.swift index 093485e..2c327c6 100644 --- a/Sources/BladeTCA/Classes/COre/Reducers/Reducer+.swift +++ b/Sources/BladeTCA/Classes/COre/Reducers/Reducer+.swift @@ -9,7 +9,7 @@ import ComposableArchitecture // MARK: - Reducer Extension for Paginator Integration /// An extension on the `Reducer` type providing a method for integrating a paginator into a Composable Architecture. -public extension Reducer { +public extension Reducer where State: Sendable { /// Integrates a paginator into a Composable Architecture, facilitating paginated data loading. /// /// - Parameters: diff --git a/Sources/BladeTCA/Classes/Models/State/PaginatorState.swift b/Sources/BladeTCA/Classes/Models/State/PaginatorState.swift index e9d4285..6ff470f 100644 --- a/Sources/BladeTCA/Classes/Models/State/PaginatorState.swift +++ b/Sources/BladeTCA/Classes/Models/State/PaginatorState.swift @@ -8,8 +8,10 @@ import Foundation // MARK: - OffsetPaginatorState +// TODO: Remove `@unchecked Sendable` + /// Represents the state of a paginator for cursor-based pagination. -public struct PaginatorState: Equatable, IPaginatorState { +public struct PaginatorState: Equatable, IPaginatorState, @unchecked Sendable { // MARK: Properties /// The array of identifiable items managed by the paginator. diff --git a/Tests/BladeTCATests/Models/TestItem.swift b/Tests/BladeTCATests/Models/TestItem.swift index 35dbef3..f4c4345 100644 --- a/Tests/BladeTCATests/Models/TestItem.swift +++ b/Tests/BladeTCATests/Models/TestItem.swift @@ -7,7 +7,7 @@ import Foundation // MARK: - TestItem -struct TestItem: Equatable, Identifiable { +struct TestItem: Equatable, Identifiable, Sendable { // MARK: Properties let id: UUID diff --git a/Tests/BladeTCATests/UnitTests/PaginatorIntegrationReducerTests.swift b/Tests/BladeTCATests/UnitTests/PaginatorIntegrationReducerTests.swift index 0fe9934..8361fae 100644 --- a/Tests/BladeTCATests/UnitTests/PaginatorIntegrationReducerTests.swift +++ b/Tests/BladeTCATests/UnitTests/PaginatorIntegrationReducerTests.swift @@ -81,8 +81,8 @@ final class PaginatorIntegrationReducerTests: XCTestCase { private extension PaginatorIntegrationReducerTests { @Reducer - struct TestReducer { - struct State: Equatable { + struct TestReducer: Sendable { + struct State: Equatable, Sendable { var paginator: PaginatorState } diff --git a/Tests/BladeTests/Mocks/CursorPageLoaderMock.swift b/Tests/BladeTests/Mocks/CursorPageLoaderMock.swift index a345a9e..fd8b840 100644 --- a/Tests/BladeTests/Mocks/CursorPageLoaderMock.swift +++ b/Tests/BladeTests/Mocks/CursorPageLoaderMock.swift @@ -5,7 +5,7 @@ import Blade -final class CursorPageLoaderMock: ICursorPageLoader { +final class CursorPageLoaderMock: ICursorPageLoader, @unchecked Sendable { var invokedLoadPage = false var invokedLoadPageCount = 0 var invokedLoadPageParameters: (request: CursorPaginationRequest, Void)? diff --git a/Tests/BladeTests/Mocks/OffsetPageLoaderMock.swift b/Tests/BladeTests/Mocks/OffsetPageLoaderMock.swift index 1d80496..d7570b6 100644 --- a/Tests/BladeTests/Mocks/OffsetPageLoaderMock.swift +++ b/Tests/BladeTests/Mocks/OffsetPageLoaderMock.swift @@ -5,7 +5,7 @@ import Blade -final class OffsetPageLoaderMock: IOffsetPageLoader { +final class OffsetPageLoaderMock: IOffsetPageLoader, @unchecked Sendable { var invokedLoadPage = false var invokedLoadPageCount = 0 var invokedLoadPageParameters: (request: OffsetPaginationRequest, Void)?