summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 17:01:35 -0300
committerGabriel Schneider <[email protected]>2026-10-29 21:13:33 -0300
commit70de5ec5ff3dad01afcc45244ad5e5a481486da6 (patch)
treecd4b723dcc2cfd94c4ba2361c134927b0e2df60b /src/builtins.zig
parent349790339897466f323ff28748916aa48aa344f7 (diff)
downloadpardes-70de5ec5ff3dad01afcc45244ad5e5a481486da6.tar.gz
pardes-70de5ec5ff3dad01afcc45244ad5e5a481486da6.zip
dump: one walker dump of the whole session, by name across builds, for Restore, -l, Handover and the store; dump.zig's hand-written schema gone
A dump is walk.zig's walk of the core with a table of every type it reaches (fields, enum and union names, number widths), read back by name; terminals are ghostty's snapshot (screens, history, kitty images); a failed load frees what it made. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index a89b1180..0ad59fd4 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -725,7 +725,7 @@ pub const Restore = struct {
var why_buf: [256]u8 = undefined;
pardes.dump.check(c.p.gpa, bytes, &why_buf) catch |err| {
var buf: [limits.host_path_cap + 320]u8 = undefined;
- const why = if (err == error.ParseZon) why_buf[0..std.mem.indexOfScalar(u8, &why_buf, 0).?] else pardes.Messages.errorWords(err, &why_buf);
+ const why = if (err == error.OutOfMemory) pardes.Messages.errorWords(err, &why_buf) else why_buf[0..std.mem.indexOfScalar(u8, &why_buf, 0).?];
return c.p.reportFailure(c.id, std.fmt.bufPrint(&buf, "Restore: {s}: not a pardes dump: {s}", .{ path, why }) catch "Restore: not a pardes dump");
};
}