Adopt Swift 6 + concurrency + remove background diffing#158
Merged
jessesquires merged 1 commit intomainfrom Jan 5, 2026
Merged
Adopt Swift 6 + concurrency + remove background diffing#158jessesquires merged 1 commit intomainfrom
jessesquires merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the ReactiveCollectionsKit library by adopting Swift 6 and removing the background diffing feature. The change simplifies the codebase by eliminating the CollectionViewDriverOptions.diffOnBackgroundQueue option and its associated implementation, which was always questionable and contrary to UIKit team guidance. All diffing now occurs on the main thread with proper @MainActor isolation, aligning with Swift 6's strict concurrency model.
Key changes:
- Updated to Swift 6.0 language mode across Package.swift, Xcode project, and documentation
- Removed
CollectionViewDriverOptions.diffOnBackgroundQueueproperty and related background queue infrastructure - Simplified
DiffableDataSourceby removingnonisolatedannotations andMainActor.assumeIsolatedwrappers, relying on@MainActorclass isolation instead
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Package.swift | Updated Swift language mode from .v5 to .v6, removed experimental StrictConcurrency settings |
| ReactiveCollectionsKit.xcodeproj/project.pbxproj | Updated SWIFT_VERSION from 5.0 to 6.0 for both Debug and Release configurations |
| README.md | Updated Swift version requirement from 5.10+ to 6.0+ |
| Sources/CollectionViewDriverOptions.swift | Removed diffOnBackgroundQueue property and its associated parameter from initializer |
| Sources/CollectionViewDriver.swift | Removed diffOnBackgroundQueue parameter when initializing DiffableDataSource |
| Sources/DiffableDataSource.swift | Removed background queue infrastructure, _diffingQueue property, and conditional background/main queue logic; simplified methods by removing nonisolated and MainActor.assumeIsolated calls |
| Sources/DebugDescriptions.swift | Removed diffOnBackgroundQueue field from debug descriptions |
| Tests/Utils/CollectionViewDriverOptions+Extensions.swift | Updated test helper to remove diffOnBackgroundQueue parameter |
| Tests/TestCollectionViewDriverOptions.swift | Removed tests for diffOnBackgroundQueue property and updated debug description assertions |
| Tests/TestDebugDescriptionDriver.swift | Updated expected debug output to remove diffOnBackgroundQueue field |
| Tests/TestCollectionViewDriver.swift | Updated test to use default options instead of explicitly setting diffOnBackgroundQueue: true |
| Example/Sources/List/ListViewController.swift | Removed diffOnBackgroundQueue option from driver initialization |
| CHANGELOG.md | Added 0.2.0 release notes documenting the breaking change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #157. - Adopt Swift 6 - Support Concurrency - Remove background diffing Maintaining `CollectionViewDriverOptions.diffOnBackgroundQueue` is too large of an effort for very little benefit. It was always questionable, and against guidance from the UIKit team. See this blog post for more: https://www.jessesquires.com/blog/2024/12/19/diffable-data-source-main-actor-inconsistency
88d10ba to
84f241a
Compare
jessesquires
added a commit
that referenced
this pull request
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #157.
Maintaining
CollectionViewDriverOptions.diffOnBackgroundQueueis too large of an effort for very little benefit. It was always questionable, and against guidance from the UIKit team.See this blog post for more:
https://www.jessesquires.com/blog/2024/12/19/diffable-data-source-main-actor-inconsistency
From the UIKit team: