diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 15:39:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 19:16:37 -0300 |
| commit | cd712084c68b9e2bad350066a92a96ce78a9ff35 (patch) | |
| tree | e7dee186af5e761450f0b8b0f1bce24802e3babf /src/pardes.zig | |
| parent | 1eae252b80ddab0a06574de700b6b2957d3b64fc (diff) | |
| download | pardes-cd712084c68b9e2bad350066a92a96ce78a9ff35.tar.gz pardes-cd712084c68b9e2bad350066a92a96ce78a9ff35.zip | |
migration: a state file that holds no Recent yet reads it once from the files before it, 0.24's $XDG_STATE_HOME/pardes/recent (merged as another session's commit is), else the `store` before that (its `@r` records, the oldest first, as W4's one-time read did), and leaves both where they are (Options.recent_import names their directory, set by main.zig alone, so no test reads the user's); an old `.dump` file, the byte dump, stays readable for one release: `-l <path>` and `Restore <path>` read it, told from an image by its first bytes rather than by its name (the snapshot and process harnesses' dumps are `.dump.zon` files, and a renamed file is the same file), and an Upgrade from the build before, whose record names its `.dump` file and no label, loads it and deletes it as before, so the next Upgrade commits to the state file; tests: Db.zig's 'Recent is read once from the file it replaced, else from the store before that, both left where they are' (in place of W4's 'the store Recent's file replaced is read once, its newest records first, over the file's list'), dump.zig's 'an old dump's file, a byte dump, is read by -l and by a Restore of its path, for one release', and upgrade.zig's 'an upgrade from the build before reads the dump file its record names, and deletes it once loaded'
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 571f7db4..462d9481 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3229,6 +3229,10 @@ pub const Options = struct { /// file, set by a host that has one; none, Recent lasts as long as the /// session; memory, the test host's. state: Db.Kind = .off, + /// Where Recent's files were before the state file (0.24's `recent`, the + /// `store` before it): a state file that holds no Recent yet reads them + /// once (Db.zig). Set by a host that had them. + recent_import: ?[]const u8 = null, startup_config_path: ?[]const u8 = null, image_allocator: ?std.mem.Allocator = null, pdf_allocator: ?std.mem.Allocator = null, |
