summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 21:37:55 -0300
committerGabriel Schneider <[email protected]>2026-11-20 22:00:10 -0300
commit948dbf486168f2fb797776c3825aa40f44095251 (patch)
treee652858ee23acfbadc679c9464b012efc16f7459 /runtime
parent4e1432049765be6e793a3834c93c4cd5318e82bc (diff)
downloadpardes-948dbf486168f2fb797776c3825aa40f44095251.tar.gz
pardes-948dbf486168f2fb797776c3825aa40f44095251.zip
macos: the Mac's own tests take the typed Pane.Id (pardes-slots typed Lsp.Request.pane and Inbox's acceptReader/pushOutput; runtime/macos.zig's tests still passed bare integers: `.pane = @intCast(view().active)`, `acceptReader(0, 23)`, `pushOutput(1, 1, ...)`), so `unit-test -Dplatform=macos` compiles again: on a real Mac (mbair-1, macOS 26.6.2 arm64, Zig 0.17.1) it was 3 compile errors at runtime/macos.zig:2115, 2269, 2340 and is now 18/19 (the one failure, "mac Restore keeps host state and rejects callbacks from the old core" at macos.zig:2274, `serial > old_serial`, fails the same on main); test code only: the library, the app and the e2e harness built without it
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime')
-rw-r--r--runtime/macos.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/macos.zig b/runtime/macos.zig
index 88eab2bb..23d70b27 100644
--- a/runtime/macos.zig
+++ b/runtime/macos.zig
@@ -2112,7 +2112,7 @@ test "mac worker setup failures finish matching LSP and pipe requests" {
const req: host_io.Lsp.Request = .{
.id = core.lsp_ask.wait.?.id,
.kind = .status,
- .pane = @intCast(core.view().active),
+ .pane = .at(core.view().active),
.offset = 0,
.arg = "",
};
@@ -2266,8 +2266,8 @@ test "mac Restore keeps host state and rejects callbacks from the old core" {
.failure = .{ .kind = .exit, .code = 1, .stderr = try gpa.dupe(u8, "old filter failure") },
} });
}
- st.inbox.acceptReader(0, 23);
- _ = st.inbox.pushOutput(0, 23, try gpa.dupe(u8, "old PTY output"));
+ st.inbox.acceptReader(.at(0), 23);
+ _ = st.inbox.pushOutput(.at(0), 23, try gpa.dupe(u8, "old PTY output"));
core.update(.{ .command = try std.fmt.bufPrint(&command, "Restore .zig-cache/tmp/{s}/restore.zon", .{tmp.sub_path}) });
try std.testing.expect(restoreCore(&st));
try std.testing.expect(st.core != core);
@@ -2337,8 +2337,8 @@ test "mac Restore cancels a PTY reader waiting for output capacity" {
try dump.dumpState(st.core);
try tmp.dir.writeFile(io, .{ .sub_path = "restore.zon", .data = st.core.dump_out.? });
while (st.core.nextEffect()) |_| {}
- st.inbox.acceptReader(1, 1);
- for (0..Inbox.output_capacity) |_| _ = st.inbox.pushOutput(1, 1, try gpa.dupe(u8, "retained output"));
+ st.inbox.acceptReader(.at(1), 1);
+ for (0..Inbox.output_capacity) |_| _ = st.inbox.pushOutput(.at(1), 1, try gpa.dupe(u8, "retained output"));
const child = try host_io.forkShell(null, 0, &st.prompt_rcs, "/bin/sh", "", 12, 40);
st.gens[0] = 1;
st.ptys[0] = .{ .file = child.file, .pid = child.pid, .gen = 1, .reader = .{ .any_future = null, .result = {} } };
@@ -2362,8 +2362,8 @@ test "mac Restore cancels a PTY reader waiting for output capacity" {
try std.testing.expect(st.ptys[0] == null);
try std.testing.expectEqual(@as(usize, 0), st.inbox.len);
try std.testing.expectEqual(@as(u16, 0), st.inbox.space.state.load(.acquire).waiters);
- st.inbox.acceptReader(0, st.gens[0]);
- _ = st.inbox.pushOutput(0, st.gens[0], try gpa.dupe(u8, "fresh output"));
+ st.inbox.acceptReader(.at(0), st.gens[0]);
+ _ = st.inbox.pushOutput(.at(0), st.gens[0], try gpa.dupe(u8, "fresh output"));
var batch = st.inbox.take();
defer for (batch.slice()) |msg| msg.deinit(gpa, gpa);
try std.testing.expectEqual(@as(usize, 1), batch.len);