You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor FieldValue ↔ Components conversion to drop large switch/if-else chains #378
cloudKitListType(for:) / cloudKitComplexListType(for:) — if-else chains keyed on FieldValue cases
These chains are easy to forget to update when a new FieldValue case or a new CloudKit type is added, and the logic for each type is spread across four files instead of being co-located.
Proposal: explore replacing the chains with one of:
Protocol-based dispatch — e.g. a FieldValuePayloadConvertible protocol implemented by each value-payload type (or by a per-case wrapper), with the request/response conversion methods living alongside the payload they describe.
Static dictionary dispatch — table keyed by _typePayload / a FieldValue.Kind discriminator, mapping each tag to its converter closure.
Either approach keeps the conversion exhaustive at compile time and reduces the duplication across the four files above.
Activity
leogdion commentedon Aug 20, 2026
Moving from the v1.0.0-beta.3 milestone to v1.0.0-beta.4 — work not yet complete.
Refactor FieldValue <-> Components conversion onto exhaustive dispatch (
Merge #378: table-dispatch refactor of FieldValue conversion
Refactor FieldValue <-> Components conversion onto exhaustive dispatch (
Refactor FieldValue <-> Components conversion onto exhaustive dispatch (
Refactor FieldValue <-> Components conversion onto exhaustive dispatch (
Remove deprecated API, model server error codes, refactor FieldValue …
leogdion commentedon Aug 28, 2026
Resolved on
v1.0.0-beta.4via #424 (commit 1411227). FieldValue ↔ Components conversion refactored off the large switch/if-else chains.Remove deprecated API, model server error codes, refactor FieldValue …
v1.0.0 beta.4 (#439)