[2026-09-25] eagle: work/tech-design/coredata-code-defined-models.md
This commit is contained in:
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):
|
Steps (one PR each):
|
||||||
|
|
||||||
1. `Persistence` support + PrivacyStats and BrowsingHistory. *(PR ready.)*
|
1. `Persistence` support + PrivacyStats and BrowsingHistory.
|
||||||
2. Bookmarks + SyncMetadata.
|
2. Bookmarks + SyncMetadata.
|
||||||
3. Stores combining several models: HTTPSUpgrade, RemoteMessaging, AppRatingPrompt.[2]
|
3. Stores combining several models: HTTPSUpgrade, RemoteMessaging, AppRatingPrompt.[2]
|
||||||
4. macOS app models: History, Downloads, legacy Bookmark.
|
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.
|
[2] A combined store needs the old versions of all its models, so they're converted together.
|
||||||
|
|
||||||
Alternatives:
|
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.
|
- 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
|
## Testing
|
||||||
|
|
||||||
@@ -75,5 +75,5 @@ Trade-off: we lose Xcode's visual model editor.
|
|||||||
- **Security** — No change.
|
- **Security** — No change.
|
||||||
- **Site Breakage** — N/A.
|
- **Site Breakage** — N/A.
|
||||||
- **Experimentation** — N/A. The schema can't be feature-flagged; rollback is a revert.
|
- **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.
|
- **Localization / Internationalization** — N/A.
|
||||||
Reference in new issue
Block a user