diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 20:41:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 22:07:55 -0300 |
| commit | 4c3dbce20f11204f6d4bfb715239beae74259e7f (patch) | |
| tree | 7cc261bdf39843b347b1b1c27829795b2e216774 /src/macos.zig | |
| parent | 50914b0e04ac0129b11bff0f0007d5cedbfc7f8d (diff) | |
| download | pardes-4c3dbce20f11204f6d4bfb715239beae74259e7f.tar.gz pardes-4c3dbce20f11204f6d4bfb715239beae74259e7f.zip | |
fields #38, the jump list, the language servers' question and the core's clock are fields of their nouns: Jump.zig is the jump list's type (list, n, cur, force, its own len annotation) and the session's jumps a Jump where it was jumps, njumps, jcur and jump_force; lsp/Ask.zig is the question's (seq, last, wait) and the session's lsp_ask an Ask where it was lsp_seq, lsp_last and lsp_wait; the clock is the session's clock, a Clock (now_ns, stepped_ns, started) where it was now_ns, stepped_ns and clock_started; a view opened still starts with no query's mark on its jumps and one closed leaves the staying view's (views.zig), as when the mark was a field of its own; callers in 26 files read p.jumps.n, p.lsp_ask.wait, p.clock.now_ns (macos.zig's lsp_wait tests by text, built nowhere here; dump.zig, the persistence agent's, only where it names lsp_seq); a dump written before this change loads these as their defaults once: an Upgrade or Restore from it comes back with no jumps, no language question awaited and its clock unstarted (jumps' kind changed, so the decoder says so), and the wire's semantics change; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/macos.zig')
| -rw-r--r-- | src/macos.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/macos.zig b/src/macos.zig index 9956d706..d7e9f454 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -314,9 +314,9 @@ test "mac queued results never cancel a newer LSP request" { defer st.config_arena.deinit(); defer st.inbox.close(); core.lspRequest(0, .status, ""); - const old_id = core.lsp_wait.?.id; + const old_id = core.lsp_ask.wait.?.id; core.lspRequest(0, .status, ""); - const current_id = core.lsp_wait.?.id; + const current_id = core.lsp_ask.wait.?.id; st.inbox.lsp_id = current_id; st.inbox.lsp_task = .{ .id = current_id, .future = .{ .any_future = null, .result = {} } }; // The inbox turns the superseded answer away. @@ -325,11 +325,11 @@ test "mac queued results never cancel a newer LSP request" { _ = drainInbox(&st); try std.testing.expect(st.inbox.lsp_task != null); try std.testing.expectEqual(current_id, st.inbox.lsp_task.?.id); - try std.testing.expectEqual(current_id, core.lsp_wait.?.id); + try std.testing.expectEqual(current_id, core.lsp_ask.wait.?.id); st.inbox.push(.{ .lsp = .{ .id = current_id, .rows = try gpa.dupe(u8, "") } }); try std.testing.expect(drainInbox(&st)); try std.testing.expect(st.inbox.lsp_task == null); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); } test "mac worker setup failures finish matching LSP and pipe requests" { @@ -358,14 +358,14 @@ test "mac worker setup failures finish matching LSP and pipe requests" { defer st.inbox.close(); core.lspRequest(core.active, .status, ""); const req: host_io.Lsp.Request = .{ - .id = core.lsp_wait.?.id, + .id = core.lsp_ask.wait.?.id, .kind = .status, .pane = @intCast(core.active), .offset = 0, .arg = "", }; lspRequest(&st, req); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); try std.testing.expectEqualStrings("abc", pane.file.?.content); pane.body.cur_col = 2; @@ -1229,7 +1229,7 @@ test "mac Restore keeps host state and rejects callbacks from the old core" { try std.testing.expect(st.rotate_coasting); core.lspRequest(0, .status, ""); - const old_request = core.lsp_wait.?.id; + const old_request = core.lsp_ask.wait.?.id; st.inbox.lsp_id = old_request; st.inbox.lsp_task = .{ .id = old_request, .future = .{ .any_future = null, .result = {} } }; st.inbox.push(.{ .lsp = .{ .id = old_request, .rows = try gpa.dupe(u8, "old result") } }); @@ -1263,14 +1263,14 @@ test "mac Restore keeps host state and rejects callbacks from the old core" { try std.testing.expect(!st.cwd_stale[0]); st.core.lspRequest(0, .status, ""); - const new_request = st.core.lsp_wait.?.id; + const new_request = st.core.lsp_ask.wait.?.id; try std.testing.expect(new_request > old_request); st.inbox.lsp_id = new_request; st.inbox.lsp_task = .{ .id = new_request, .future = .{ .any_future = null, .result = {} } }; st.inbox.push(.{ .lsp = .{ .id = new_request, .rows = &.{} } }); try std.testing.expect(drainInbox(&st)); try std.testing.expect(st.inbox.lsp_task == null); - try std.testing.expect(st.core.lsp_wait == null); + try std.testing.expect(st.core.lsp_ask.wait == null); const pane = st.core.panes[0].?; pane.body.cur_col = 4; |
