Fix Swift 6 strict concurrency violation in fetchReminders#3
Merged
steipete merged 1 commit intoJan 11, 2026
Merged
Conversation
This fixes the "Incorrect actor executor assumption" error that occurred when running `remindctl list`. ## Problem The `fetchReminders` method was calling the actor-isolated `item(from:)` method from inside a non-isolated EventKit completion handler. Additionally, `EKReminder` objects are not `Sendable`, which violates Swift 6's strict concurrency checking. ## Solution Restructured `fetchReminders` to: 1. Extract all needed data from `EKReminder` objects inside the callback (where it's safe to access them) 2. Store that data in a local `Sendable` struct (`ReminderData`) 3. Pass the Sendable data across the concurrency boundary 4. Convert to `ReminderItem` on the actor using the safe data This ensures all actor-isolated code runs on the correct executor and all data crossing concurrency boundaries is Sendable. ## Testing - Built successfully with Swift 6.0 - All commands tested: list, show, status - JSON output verified
Collaborator
|
Thank you! Reviewing... |
Collaborator
|
Merged via #3 (Swift 6 strict concurrency-safe boundary). Thanks! |
This was referenced Jan 11, 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.
Problem
When running
remindctl list, users encounter this error:This is a Swift 6 strict concurrency violation caused by:
item(from:)method from inside a non-isolated EventKit completion handlerEKReminderobjects not beingSendable, which violates data race safety requirementsSolution
Restructured the
fetchRemindersmethod inEventKitStore.swiftto properly handle concurrency:EKReminderobjects inside the EventKit completion handler (where it's safe to access them)Sendablestruct calledReminderDataReminderItemhappens on the actor using the safe dataThis ensures:
SendableTesting
remindctl list- works without errorsremindctl list <name>- displays reminders correctlyremindctl show today/week- works as expectedremindctl list --json- JSON output verifiedremindctl status- authorization check worksChanges
Sources/RemindCore/EventKitStore.swift:206-252ReminderDatastruct for safe data transferfetchRemindersto extract data before crossing concurrency boundaryFixes the runtime error and ensures compatibility with Swift 6's strict concurrency model.