[2026-09-25] eagle: work/tech-design/coredata-code-defined-models.md

This commit is contained in:
Alexey Martemyanov committed 2026-09-25 18:37:47 +06:00
1 parent a6baec7ead
commit 470a8a8208
1 file changed
+4 -4
@@ -42,7 +42,7 @@ Existing stores are unaffected: Core Data matches a store to a model by schema h
Steps (one PR each):
1. `Persistence` support + PrivacyStats and BrowsingHistory. *(PR ready.)*
1. `Persistence` support + PrivacyStats and BrowsingHistory.
2. Bookmarks + SyncMetadata.
3. Stores combining several models: HTTPSUpgrade, RemoteMessaging, AppRatingPrompt.[2]
4. macOS app models: History, Downloads, legacy Bookmark.
@@ -57,10 +57,10 @@ Each step is revertible: the on-disk format doesn't change.
[2] A combined store needs the old versions of all its models, so they're converted together.
Alternatives:
- Remove only the generated classes: `momc` is still needed.
- Remove only the generated dynamic CoreData property accessors: `momc` is still needed and compiled as a separate Swift Build System Plugin step.
- Commit precompiled `.momd` files: binary artifacts that can drift from the source.
Trade-off: we lose Xcode's visual model editor.
Trade-off: we lose Xcode's visual model editor (but we get standardized, structured, great&shiny code definitions!)
## Testing
@@ -75,5 +75,5 @@ Trade-off: we lose Xcode's visual model editor.
- **Security** — No change.
- **Site Breakage** — N/A.
- **Experimentation** — N/A. The schema can't be feature-flagged; rollback is a revert.
- **Operational** — Package builds no longer need Xcode. Migration failures are reported through the existing store-loading errors.
- **Operational** — Package builds no longer need Xcode‘s momd compiler. Migration failures are reported through the existing store-loading errors.
- **Localization / Internationalization** — N/A.