Skip to content

Swift 6: Main actor-isolated property 'listener' cannot be used to satisfy nonisolated protocol requirement with RIBs 0.9.2 #43

Description

@jeongjinho

When generating a new RIB using the RIBs template (version 0.9.2) under Swift 6, I encounter the following compiler error:

Main actor-isolated property 'listener' cannot be used to satisfy nonisolated protocol requirement

This happens because the generated code marks the listener property as @MainActor, but the corresponding protocol requirement is nonisolated.

Steps to Reproduce
1. Create a new RIB module using the RIBs template on version 0.9.2.
2. Build the project in Xcode with Swift 6 enabled.
3. Observe the compiler error above.

Expected Behavior

Generated RIB code should compile successfully under Swift 6 without actor isolation mismatches.

Actual Behavior

Compilation fails due to mismatch between @MainActor isolated property and nonisolated protocol requirement.

Environment
• RIBs version: 0.9.2
• Swift version: 6.0

Is there a recommended way to update the generated RIBs code (or RIBs framework itself) so that the listener property works correctly with Swift 6’s stricter actor isolation rules?
Should protocol definitions also be annotated with @MainActor, or is there an official workaround planned?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions