Add ability to restore previous layout.

This commit is contained in:
Greyson Parrelli
2026-08-27 10:55:04 -04:00
parent 5cb9bb117a
commit 0bf85b3b2a
6 changed files with 1029 additions and 33 deletions
+16
View File
@@ -134,6 +134,22 @@ pub fn build(b: *std.Build) void {
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&b.addRunArtifact(tests).step);
// The session snapshot is its own root for the same reason, and is the same
// kind of thing: a file the app writes and reads back, whose shape is worth
// being sure about. It imports Layouts.zig for the node grammar the two
// share, and needs libc for the one call GLib does not expose — see
// `Snapshot.remove`.
const snapshot_tests = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("src/Snapshot.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
}),
});
snapshot_tests.root_module.addImport("glib", gobject.module("glib2"));
test_step.dependOn(&b.addRunArtifact(snapshot_tests).step);
// The directory field's rules are their own root, for the same reason as
// the layouts file: which directory a half-typed path names, which entries
// in it are offered and how far they agree is text and filesystem, and the