Repository navigation
Model store - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The model store on Linux: the guest's CoreModel, through AppRuntime's
ModelStorecontracts, toHostModelStore, over CoreModel's own SQLite backend.LinuxCoreModelLinuxModelStore, the host module. Stores go in<container>/Stores(a PortMaster port'sconf/Stores), or$XDG_DATA_HOME/<id>/Stores: beside the app'sDocuments, out of reach of itsFiles. Answers go to the main loop.SQLiteModelStorageProvider: oneCoreModelSQLite.SQLiteDatabaseper store.canMigrate(from:to:)allows is migrated by copying into a new database that replaces the old one. Any other model fails withmigrationRequired, or empties the store with.reset.SQLiteModelStorage, anAtomicModelStorage.outOfSpace, a file that isn't a databasecorrupted, one that can't be opened or readunavailable.libsqlite3.Upstream fixes, both merged. About 500 requests answered by SQLite and by CoreModel's in-memory evaluation disagreed on both sides:
INagainst a string, an emptyOR, sort ties, andcountwith a limit or offset.LIKEon values that contain a*, and where nulls sort.Package.swiftuses both packages'masteruntil they're released; point it back at the tags then.Tests (
LinuxCoreModelTests, Swift Testing):All 9 pass on macOS and on Debian 13 in Docker, as do the other suites.
A storage still open on a model that a later open migrated from, emptied or destroyed is closed, and fails with
unavailable. Without that, SQLite failed it on macOS but went on reading the replaced file on Linux.End to end:
ExampleModellinked intolinux-app-hoston Debian 13 and launched twice on one container, with two to-dos written into itstodos.sqlitebetween the launches. The second launch shows them under their lists, and it doesn't add the lists again: