Repository navigation
Update to clocks-2 - #592
Open
woodymelling wants to merge 1 commit into
Open
woodymelling wants to merge 1 commit into
woodymelling wants to merge 1 commit into
Conversation
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.
This wasn't quite as trivial as I hoped.
Getting SQLiteData to compile was straightforward. I pointed the Package.swift to the clocks-2 branch for swift-clocks and swift-dependencies, then updated the .cloudkitClock dependency to be a
NonsendingClock, which was the only compile issue.However, this exposed some problems around the SyncEngine preview test suite. Running the test suite gave me thousands of errors across the entire test suite, with most being:
"TestClock.swift:121: Issue recorded: 'TestClock' cannot sleep in nonisolated contexts because it cannot be deterministically tested. Call 'sleep' from actor-isolated code."
Moving the @dependency(.continuousClock) inside the
Taskresolved most of the "nonisolated context" errors, but 14 still remained. Changing that Task to @mainactor brought the error count to 1, but I'm not sure that's correct, though all the tests (and previews?) are @mainactor bound already.That left one remaining error in
BaseCloudKitTests.autoSyncChangesInPreviews(),"Expectation failed: syncEngine.private.state.hasPendingUntrackedChanges → false"
This one seems a bit more complex to fix, and is beyond my understanding for now.