uber / uber/RIBs-iOS

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

Open
#43 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
193
Forks
23
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RIBs template and the generated listener property and corresponding protocol requirement described in the issue. Reproduce the Swift 6 build in Xcode, then determine the compatible actor-isolation treatment for the generated code and protocol; done means a newly generated RIB compiles without the isolation mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.