diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
| commit | 71d8744b41dec56d835e30f531b96fede5d610a1 (patch) | |
| tree | 31e2a06fdcfd467d12454cde8be5a477765701b5 /runtime | |
| parent | eae5736ad923731135dd35b3783c90a3358bd0fa (diff) | |
| parent | 4569aefd55d04f434f2e2ed5e6e4a511a414cdc7 (diff) | |
| download | pardes-71d8744b41dec56d835e30f531b96fede5d610a1.tar.gz pardes-71d8744b41dec56d835e30f531b96fede5d610a1.zip | |
integration: the one client loop that the soak runs, with the tape as the handle a step is given: pardes-runners-b (10b: runtime/client.zig run by the terminal's client, the window's and the soak; a client's clipboard and links its own frontend's; an input sent before it is applied) and pardes-handle-1 (the handle's steps 0 to 2: p.tape, the directory listing and the file system read through the tape they are handed), merged without a conflict; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/macos.zig | 4 | ||||
| -rw-r--r-- | runtime/main.zig | 6 | ||||
| -rw-r--r-- | runtime/upgrade.zig | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/runtime/macos.zig b/runtime/macos.zig index 3e9c7b9b..4f8bd709 100644 --- a/runtime/macos.zig +++ b/runtime/macos.zig @@ -643,7 +643,7 @@ fn setThemeFileWatch(st: *State, request_generation: u32, on: bool) void { hostWatchFile(theme_watch_pane, stopped, null, 0); if (!on) return; const request = colors.themeFileRequest(st.core, request_generation) orelse return; - const bytes = filesystem.readFile(st.gpa, request.path) catch |err| { + const bytes = filesystem.readFile(&pardes.tape.none, st.gpa, request.path) catch |err| { colors.failThemeFile(st.core, request_generation, err); return; }; @@ -665,7 +665,7 @@ fn reloadWatchedTheme(st: *State, announce: bool) bool { const watched = if (st.file_watches.entries[theme_watch_pane]) |*entry| entry else return false; const request = colors.themeFileRequest(st.core, watched.serial) orelse return false; if (!std.mem.eql(u8, watched.path, request.path)) return false; - const bytes = filesystem.readFile(st.gpa, watched.path) catch |err| { + const bytes = filesystem.readFile(&pardes.tape.none, st.gpa, watched.path) catch |err| { colors.failThemeFile(st.core, watched.serial, err); return false; }; diff --git a/runtime/main.zig b/runtime/main.zig index 11aceaeb..92821c8a 100644 --- a/runtime/main.zig +++ b/runtime/main.zig @@ -1370,7 +1370,7 @@ fn nativeMain(std_init: std.process.Init) !void { } // `pardes '~/x'`, quoted so the shell left it: home, as a look's. var home_buf: [4096]u8 = undefined; - const word = pardes.filesystem.expandHome(typed_word, &home_buf); + const word = pardes.filesystem.expandHome(&pardes.tape.none, typed_word, &home_buf); const target = @import("core").look.parsePathLine(word); // `@pN[:addr]` addresses a pane of this session: one it has is // looked at, one it has not is refused, never a file of that name. @@ -1388,14 +1388,14 @@ fn nativeMain(std_init: std.process.Init) !void { } var realbuf: [4096]u8 = undefined; var newbuf: [4096]u8 = undefined; - const found_path: ?[]const u8 = if (pardes.filesystem.isVirtual(target.path)) target.path else if (pardes.filesystem.resolveOs(target.path, &realbuf)) |r| r.path else null; + const found_path: ?[]const u8 = if (pardes.filesystem.isVirtual(target.path)) target.path else if (pardes.filesystem.resolveOs(&pardes.tape.none, target.path, &realbuf)) |r| r.path else null; const path = found_path orelse named: { // A name not there yet, as acme's B takes one: its directory // resolved and the name kept, a pane made for it that Save // creates the file from. const base = std.Io.Dir.path.basename(target.path); if (base.len == 0 or std.mem.eql(u8, base, ".") or std.mem.eql(u8, base, "..")) Refuse.with(init.io, word, error.NotAFileName); - const dir = pardes.filesystem.resolveOs(std.Io.Dir.path.dirname(target.path) orelse ".", &realbuf) orelse { + const dir = pardes.filesystem.resolveOs(&pardes.tape.none, std.Io.Dir.path.dirname(target.path) orelse ".", &realbuf) orelse { // Its directory not there either: the name made absolute as // written, and the pane's Save makes the directories. var cwd_buf: [4096]u8 = undefined; diff --git a/runtime/upgrade.zig b/runtime/upgrade.zig index e145eb70..6ee5d29c 100644 --- a/runtime/upgrade.zig +++ b/runtime/upgrade.zig @@ -346,7 +346,7 @@ var state_path: [4200]u8 = undefined; /// for a new build that cannot load it. Null when it is, else why in words /// (`why`'s). pub fn dumpInto(core: *pardes.Pardes, rec: *Record, at: *[1024:0]u8, why: []u8) ?[]const u8 { - const path = pardes.Db.statePath(&state_path, core.settings.dump_dir.get()) orelse return "Upgrade: no directory for the session's dump; this session stays as it is"; + const path = pardes.Db.statePath(&pardes.tape.none, &state_path, core.settings.dump_dir.get()) orelse return "Upgrade: no directory for the session's dump; this session stays as it is"; var name: [64]u8 = undefined; const label = std.fmt.bufPrint(&name, "upgrade-{d}", .{std.c.getpid()}) catch unreachable; const bytes = pardes.dump.image(core, label) catch |err| { @@ -393,7 +393,7 @@ pub fn load(gpa: std.mem.Allocator, core_gpa: std.mem.Allocator, opts: pardes.Op const loaded = loaded: { if (libc.getenv("PARDES_TEST_UPGRADE_REFUSE")) |how| if (rec.refused.len == 0 or std.mem.eql(u8, std.mem.span(how), "all")) break :loaded error.RefusedByTest; - const bytes = (if (rec.label.len > 0) pardes.Db.readDumpAt(gpa, rec.dump, rec.label) else pardes.filesystem.readFile(gpa, rec.dump)) catch |err| break :loaded err; + const bytes = (if (rec.label.len > 0) pardes.Db.readDumpAt(gpa, rec.dump, rec.label) else pardes.filesystem.readFile(&pardes.tape.none, gpa, rec.dump)) catch |err| break :loaded err; defer gpa.free(bytes); break :loaded pardes.dump.resumeFromDump(core_gpa, opts, bytes, &kept); }; |
