diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 23:51:23 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 00:00:00 -0300 |
| commit | 8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68 (patch) | |
| tree | 24c4d770b8ac5a11e1f0169f9e0707fda8cde678 /core/ninep | |
| parent | d236dff22567c2f563756695598678afb84fbef4 (diff) | |
| parent | a310585195484b8420f14cff3e736c604f47c11e (diff) | |
| download | pardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.tar.gz pardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.zip | |
integration: the ruled renames on the documents and the load-independent tests: pardes-renames (config.Settings, macos.Callbacks, core/ninep/harness.zig, Pane.docked_to and the word Undock) and pardes-merge23; one conflict, in core/CHANGELOG.md, where both sides added Unreleased entries: both kept; no old name left in the tree; tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/ninep')
| -rw-r--r-- | core/ninep/addr.zig | 2 | ||||
| -rw-r--r-- | core/ninep/cols.zig | 2 | ||||
| -rw-r--r-- | core/ninep/ctl.zig | 28 | ||||
| -rw-r--r-- | core/ninep/events.zig | 2 | ||||
| -rw-r--r-- | core/ninep/harness.zig (renamed from core/ninep/testing.zig) | 0 | ||||
| -rw-r--r-- | core/ninep/pane.zig | 2 | ||||
| -rw-r--r-- | core/ninep/pty.zig | 2 | ||||
| -rw-r--r-- | core/ninep/screen.zig | 2 | ||||
| -rw-r--r-- | core/ninep/sources.zig | 2 | ||||
| -rw-r--r-- | core/ninep/tree.zig | 2 |
10 files changed, 22 insertions, 22 deletions
diff --git a/core/ninep/addr.zig b/core/ninep/addr.zig index 72a2d815..fd343363 100644 --- a/core/ninep/addr.zig +++ b/core/ninep/addr.zig @@ -319,7 +319,7 @@ pub const Addr = struct { }; const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const tree = @import("tree.zig"); const Node = tree.Node; const E = tree.E; diff --git a/core/ninep/cols.zig b/core/ninep/cols.zig index 561a5ffa..88d8ef88 100644 --- a/core/ninep/cols.zig +++ b/core/ninep/cols.zig @@ -241,7 +241,7 @@ pub fn remove(p: *Pardes, req: Req, serial: u32, file: tree.ColFile) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const Node = tree.Node; test "New written to a column's exec makes its scratch in the session's directory, as tagexec's does" { diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index 302b916a..7b4e2754 100644 --- a/core/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -298,7 +298,7 @@ pub fn captured(p: *Pardes, req: Req, id: usize, exec: bool, text: []const u8, i // ...and one that takes none, written with one (`Config extra`): // refused as a ctl's is, not run as a shell command of that name. if (std.mem.indexOfAny(u8, cmd, " \t")) |sp| if (std.meta.stringToEnum(Builtin, cmd[0..sp])) |b| { - if (!builtins.registry.takesArg(b) and config.Runtime.find(cmd[0..sp]) == null) { + if (!builtins.registry.takesArg(b) and config.Settings.find(cmd[0..sp]) == null) { p.fs.results_len = 0; return refuse(p, req, "wrong #args in control message", cmd); } @@ -535,7 +535,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ? // A setting this build's frontend cannot show (Lift, GripWidth on a // terminal, the window's own words in a terminal's view) is known, // and says so rather than sound misspelt. - if (builtins.absentWhy(word) orelse if (config.Runtime.find(word) != null or std.meta.stringToEnum(Builtin, word) != null) @as([]const u8, "GUI-only") else null) |absent| { + if (builtins.absentWhy(word) orelse if (config.Settings.find(word) != null or std.meta.stringToEnum(Builtin, word) != null) @as([]const u8, "GUI-only") else null) |absent| { var why: pardes.Kind.Buf(64) = .{}; // EINVAL, a request this build cannot take, in words 9ns reads // as that: `invalid`. @@ -553,7 +553,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ? ": write it to pane/<n>/ctl"); if (arg.len > 0 and !builtins.registry.takesArg(b)) return refuse(p, req, "wrong #args in control message", line); if (arg.len == 0 and builtins.registry.requiresArg(b)) return refuse(p, req, "wrong #args in control message", line); - const setting = config.Runtime.find(word) orelse return null; + const setting = config.Settings.find(word) orelse return null; const takes = switch (setting.action) { .theme => if (pardes.colors.themeIndex(arg) != null) true else { // `refuse` quotes the line after it, all in the 128 bytes an @@ -565,7 +565,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ? var why: pardes.Kind.Buf(256) = .{}; return refuse(p, req, why.print(head ++ "{s}" ++ tail, .{pardes.colors.themesNear(near[0..@min(room, near.len)], arg)}), arg); }, - .font => config.Runtime.FontSpec.parse(arg) != null, + .font => config.Settings.FontSpec.parse(arg) != null, // Bare, it says the width, as from a pane's exec. .tab => arg.len == 0 or (std.fmt.parseInt(u16, arg, 10) catch 0) -% 1 < 16, .callstack_depth => arg.len == 0 or (std.fmt.parseInt(u8, arg, 10) catch 0) -% 1 < pardes.lsp.callstack_max_depth, @@ -578,7 +578,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ? var why: pardes.Kind.Buf(160) = .{}; // The offending word is the value: quoted, so two bad values read, // and log, as two. - return refuseQuoting(p, req, if (config.Runtime.takes(setting.action)) |values| + return refuseQuoting(p, req, if (config.Settings.takes(setting.action)) |values| why.print("bad value in control message; takes {s}", .{values}) else "bad value in control message", arg, ""); @@ -628,13 +628,13 @@ fn writeSettings(p: *Pardes, w: *std.Io.Writer) !void { /// The setting words of `s`, one a line, those a frontend of `caps` takes /// (the root ctl's: the live view's), and the session's LocationsConfig. -fn writeSettingsFor(p: *Pardes, s: *const config.Runtime, w: *std.Io.Writer, caps: config.Runtime.Capabilities) !void { +fn writeSettingsFor(p: *Pardes, s: *const config.Settings, w: *std.Io.Writer, caps: config.Settings.Capabilities) !void { // DumpConfig's words: a `# Word unsupported` comment for what `caps` lacks. var dump_dir: [1024]u8 = undefined; var located_buf: [256]u8 = undefined; var located: std.Io.Writer = .fixed(&located_buf); try p.locations_config.write(&located); - try config.Runtime.writeSettings(w, .{ + try config.Settings.writeSettings(w, .{ .locations = located.buffered(), .theme_name = p.theme().name, .theme_file = pardes.colors.loadedThemeFile(p), @@ -879,7 +879,7 @@ fn writeCommands(p: *const Pardes, w: *std.Io.Writer) !void { }); // A setting that chooses among words: the words, comma-joined. Bare, // it steps to the next of them (a two-valued one flips). - if (config.Runtime.find(@tagName(b))) |setting| if (config.Runtime.choices(setting.action)) |values| { + if (config.Settings.find(@tagName(b))) |setting| if (config.Settings.choices(setting.action)) |values| { try w.writeByte(' '); var parts = std.mem.splitSequence(u8, values, ", "); var first = true; @@ -887,7 +887,7 @@ fn writeCommands(p: *const Pardes, w: *std.Io.Writer) !void { }; // Then ` -- ` and what it does: a setting's doc, else its source's. var summary_buf: [2048]u8 = undefined; - const summary = if (config.Runtime.find(@tagName(b))) |setting| setting.doc else summaryOf(@tagName(b), &summary_buf); + const summary = if (config.Settings.find(@tagName(b))) |setting| setting.doc else summaryOf(@tagName(b), &summary_buf); if (summary.len > 0) { // The sentence whole unless it is long, then cut between words. const kept = @import("../Messages.zig").clip(summary, 240); @@ -1323,7 +1323,7 @@ pub fn get(p: *Pardes, pane: *Pane) GetError!void { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; @@ -1374,7 +1374,7 @@ test "commands lists every builtin with its argument and the ctl that takes it" const b = std.meta.stringToEnum(Builtin, words.next().?).?; if (builtins.registry.takesArg(b)) try testing.expectEqualStrings("arg", words.next().?); try testing.expectEqualStrings(if (b == .Edit) "both" else if (builtins.registry.scope(b) == .session) "root" else "pane", words.next().?); - if (config.Runtime.find(@tagName(b))) |s| if (config.Runtime.choices(s.action) != null) try testing.expect(words.next() != null); + if (config.Settings.find(@tagName(b))) |s| if (config.Settings.choices(s.action) != null) try testing.expect(words.next() != null); // Then, where the source has one, ` -- ` and what it does. if (words.next()) |dashes| try testing.expectEqualStrings("--", dashes); } @@ -1766,7 +1766,7 @@ test "after a ThemeFile the root ctl and DumpConfig say ThemeFile and its path, try testing.expect(std.mem.indexOf(u8, settings, "Theme mine") == null); var storage: [16384]u8 = undefined; var out: std.Io.Writer = .fixed(&storage); - try config.Runtime.writeReport(&out, .{ + try config.Settings.writeReport(&out, .{ .startup_config_path = null, .platform = @tagName(pardes.platform), .theme_name = p.theme().name, @@ -2490,7 +2490,7 @@ test "every word's /commands description is its own doc comment's first sentence continue; }; const word = line[0..std.mem.indexOfScalar(u8, line, ' ').?]; - if (config.Runtime.find(word)) |setting| { + if (config.Settings.find(word)) |setting| { try testing.expect(std.mem.endsWith(u8, line, setting.doc)); continue; } @@ -2890,7 +2890,7 @@ test "the init file reads past a BOM, and every line it fails is a notice and an } test "a setting the other frontend has is passed over in the init file, not failed" { - const other = for (config.Runtime.settings) |s| { + const other = for (config.Settings.settings) |s| { if (!s.enabled(pardes.builtins.capabilities)) break s.word; } else return; // this frontend has them all var text: [64]u8 = undefined; diff --git a/core/ninep/events.zig b/core/ninep/events.zig index 93a1187a..1951a434 100644 --- a/core/ninep/events.zig +++ b/core/ninep/events.zig @@ -828,7 +828,7 @@ pub fn writeEvent(p: *Pardes, asked: Req, id: usize) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; diff --git a/core/ninep/testing.zig b/core/ninep/harness.zig index cf75d80d..cf75d80d 100644 --- a/core/ninep/testing.zig +++ b/core/ninep/harness.zig diff --git a/core/ninep/pane.zig b/core/ninep/pane.zig index 8be26602..1d514a3c 100644 --- a/core/ninep/pane.zig +++ b/core/ninep/pane.zig @@ -1031,7 +1031,7 @@ pub fn truncate(p: *Pardes, pane: *Pane, file: PaneFile) tree.Status { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig index 6f3a8af0..26bb7661 100644 --- a/core/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -469,7 +469,7 @@ pub fn writeData(p: *Pardes, req: Req, id: usize) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const events = @import("events.zig"); const call = th.call; const rd = th.rd; diff --git a/core/ninep/screen.zig b/core/ninep/screen.zig index 1e2791b1..1e31bac0 100644 --- a/core/ninep/screen.zig +++ b/core/ninep/screen.zig @@ -83,7 +83,7 @@ pub fn listenersText(p: *Pardes) std.Io.Writer.Error![]const u8 { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const fs = @import("../fs.zig"); const call = th.call; const rd = th.rd; diff --git a/core/ninep/sources.zig b/core/ninep/sources.zig index 1d804e31..540506d4 100644 --- a/core/ninep/sources.zig +++ b/core/ninep/sources.zig @@ -109,7 +109,7 @@ pub fn handle(p: *Pardes, req: Req) Reply { } const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const limits = @import("../memory.zig").limits; test "embedded sources appear under the root only when the build carries them" { diff --git a/core/ninep/tree.zig b/core/ninep/tree.zig index d5a6b2fe..46a4e3d2 100644 --- a/core/ninep/tree.zig +++ b/core/ninep/tree.zig @@ -1504,7 +1504,7 @@ fn writeSend(p: *Pardes, req: Req) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const config = @import("../config.zig"); const call = th.call; const rd = th.rd; |
