Skip to content

[ECO-5702] Fix Xcode 26.4 compilation error#482

Merged
lawrence-forooghian merged 1 commit intomainfrom
typing-queue-fix
Apr 7, 2026
Merged

[ECO-5702] Fix Xcode 26.4 compilation error#482
lawrence-forooghian merged 1 commit intomainfrom
typing-queue-fix

Conversation

@lawrence-forooghian
Copy link
Copy Markdown
Collaborator

@lawrence-forooghian lawrence-forooghian commented Apr 7, 2026

Resolves ably/ably-cocoa#2202. See commit message for more details.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated CI/CD pipeline runner configuration to macOS 26 across all build jobs for improved compatibility and stability
    • Updated Xcode build tooling to version 26.4
    • Enhanced thread safety in asynchronous request handling

@github-actions github-actions bot temporarily deployed to staging/pull/482/AblyChat April 7, 2026 12:55 Inactive
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 86eb9cbd-92c5-4500-a05e-5be9022057da

📥 Commits

Reviewing files that changed from the base of the PR and between 571f2a0 and b8c7443.

📒 Files selected for processing (3)
  • .github/workflows/check.yaml
  • Sources/AblyChat/TypingOperationQueue.swift
  • Sources/BuildTool/BuildTool.swift

Walkthrough

This PR updates CI infrastructure to support Xcode 26.4/Swift 6.2 by upgrading macOS runner versions, fixes a Swift 6.2 actor-isolation compilation error in TypingOperationQueue by adding @MainActor annotation, and updates the build matrix tooling to reference Xcode 26.4.

Changes

Cohort / File(s) Summary
CI Runner Configuration
.github/workflows/check.yaml
Updated macOS runner from macos-15 to macos-26 across all CI jobs (lint, spec-coverage, generate-matrices, build-and-test-spm, build-release-configuration-spm, build-and-test-xcode, build-release-configuration-xcode, check-example-app, check-documentation) and commented-out code-coverage job.
Actor Isolation Fix
Sources/AblyChat/TypingOperationQueue.swift
Added @MainActor annotation to the nested Request.performOperation() method to satisfy Swift 6.2 stricter actor-isolation requirements.
Build Tooling Version
Sources/BuildTool/BuildTool.swift
Updated generated build matrix Xcode version from 26.2 to 26.4.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Swift and steady, we hop to the beat,
With actors aligned, our fix is complete!
From twenty-six-two to twenty-six-four,
The tools and the runners, now ready for more! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR contains out-of-scope changes: updating macOS runner versions from 15 to 26 in CI workflows and updating Xcode version in build matrices are unrelated to fixing the Xcode 26.4 compilation error. Remove CI workflow runner version updates and Xcode version updates in BuildTool.swift as they are separate from the compilation fix and should be addressed in separate PRs.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main fix addressing the Xcode 26.4 compilation error in TypingOperationQueue, which is the primary change in the changeset.
Linked Issues check ✅ Passed The PR fully addresses the compilation error by annotating TypingOperationQueue.Request.performOperation() with @MainActor as required by issue #2202, resolving the actor-isolation sendability checking failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch typing-queue-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/482/AblyChat April 7, 2026 13:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/482/AblyChat April 7, 2026 14:19 Inactive
The error was:

> TypingOperationQueue.swift:96:38: error: sending 'pendingRequest' risks causing data races
> await pendingRequest.performOperation()
>       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
>
> note: sending main actor-isolated 'pendingRequest' to nonisolated instance method 'performOperation()' risks causing data races between nonisolated and main actor-isolated uses

A Swift 6.3 issue, it would seem. I guess that perhaps the nested
Request type no longer inherits the main actor isolation of its
containing type?

Resolves ably/ably-cocoa#2202 (reporter opened issue there).
Copy link
Copy Markdown
Contributor

@ttypic ttypic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a thought: maybe it's worth to run on macos-latest? Can it help us find future bugs with new version of Xcode faster?

@lawrence-forooghian
Copy link
Copy Markdown
Collaborator Author

Unfortunately macos-latest isn't actually the latest; it's still on macOS 15! https://github.com/actions/runner-images?tab=readme-ov-file#available-images

and likewise the default version of xcode that the runners use is not the latest either; e.g. it's currently 26.2: https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md

We could have a CI job that also tests against whatever the default version of Xcode is too, so that we will eventually catch issues introduced by new versions of Xcode (once they become the default)

@lawrence-forooghian lawrence-forooghian merged commit 4c8db1a into main Apr 7, 2026
16 of 17 checks passed
@lawrence-forooghian lawrence-forooghian deleted the typing-queue-fix branch April 7, 2026 14:43
@lawrence-forooghian lawrence-forooghian mentioned this pull request Apr 7, 2026
3 tasks
@lawrence-forooghian
Copy link
Copy Markdown
Collaborator Author

I think another problem is the fact that we only run our CI jobs when we actually make a change, so in periods where there isn't much change on a given SDK it can take a while to find out; maybe we should consider nightly builds of everything too

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

TypingOperationQueue.swift fails to compile on Xcode 26.4 / Swift 6.2 due to actor-isolation error

3 participants