From 3c5c1c62e38909019d1f20120a8778ff019e595f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 16:57:20 +0100 Subject: [PATCH] Update AGENTS.md for Swift 6.2 migration (#5766) * Update AGENTS.md concurrency section for Swift 6.2 migration * Add a caveman update line to AGENTS.md. --------- Co-authored-by: Doug --- AGENTS.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 311beb473..85c569ea5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,7 @@ # AGENTS.md — Element X iOS > **Repo:** `element-hq/element-x-ios` — iOS Matrix client (SwiftUI + `matrix-rust-sdk`). +> **Keep current:** Change break fact here — path, command, convention, structure? Fix that fact, same PR. Change not described here? Leave file alone. Edit file? Use caveman skill — match terse voice. No caveman, no edit. --- @@ -274,9 +275,10 @@ Services = where product-level opinions live (Rust SDK stays spec-faithful). ## Concurrency & Actors -- Most protocols `@MainActor`. Conforming types inherit. -- Views, screens, coordinators: always `@MainActor`. -- Some services `nonisolated` for background work. +- All targets **Swift 6.2**, approachable concurrency. +- **ElementX** app, **UnitTests** + **PreviewTests**: `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor` — no redundant `@MainActor`. Other targets (incl. app extensions) nonisolated. +- Services + data-layer types: `nonisolated` + `Sendable` when background work need. +- Never `@unchecked Sendable` / `nonisolated(unsafe)`. Dev add these. - `actor` types rare in codebase. ---