Skip to content

Update to clocks-2 - #592

Open
woodymelling wants to merge 1 commit into
pointfreeco:clocks-2from
woodymelling:clocks-2
Open

woodymelling wants to merge 1 commit into
pointfreeco:clocks-2from
woodymelling:clocks-2

Conversation

@woodymelling

Copy link
Copy Markdown

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 Task resolved 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant