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 <douglase@element.io>
This commit is contained in:
Copilot
2026-06-24 16:57:20 +01:00
committed by GitHub
parent a6384500c9
commit 3c5c1c62e3
+5 -3
View File
@@ -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.
---