From 3f1533813b6692a736251e4d467a7f108229ddee Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 11:40:11 -0300 Subject: targets: the DOM web shell goes (src/web.zig and src/web/, its harnesses web_harness, web_snapshot, web_driver_test and web-snapshots/, tools/web_fixture.py, -Dplatform=web, -Ddump, and the web, web-harness, web-snap, web-e2e and web-driver-test steps), and with it what only a freestanding build needed: `hosted` and every guard on it (every build has a host now), memory's stack-fallback arenas and reduced_target sizes, the emscripten main, the tree-sitter libc shim and the stb stub, lsp's has_client, the web arms of the platform switches (-Dplatform is tui, gui or macos); the macOS files pass zig ast-check; docs/web.md is a paragraph on what it was Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/tape.zig | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/tape.zig') diff --git a/src/tape.zig b/src/tape.zig index 0e8bbfe6..3723537e 100644 --- a/src/tape.zig +++ b/src/tape.zig @@ -150,8 +150,8 @@ pub const results = .{ /// taped by its name, and `anyerror` keeps no list of names to look one up /// in. ponytail: kept by hand, the sets of what a host reports from; one /// outside them is a Debug build's panic as it is taped (walk.encode) and a -/// release build's divergence (the replica joins again). No host, none. -pub const Failure = if (!pardes.hosted) error{} else ErrorOf(host_io.forkShell) || ErrorOf(pardes.filesystem.write) || +/// release build's divergence (the replica joins again). +pub const Failure = ErrorOf(host_io.forkShell) || ErrorOf(pardes.filesystem.write) || ErrorOf(pardes.filesystem.readRestore) || ErrorOf(pardes.dump.restore) || @typeInfo(@TypeOf(pardes.config.User.dumpThemes(undefined, undefined, undefined, pardes.themes))).error_union.error_set || ErrorOf(host_io.Lsp.snapshot) || @@ -279,7 +279,6 @@ pub const Tape = struct { } fn flush(t: *Tape) void { - if (comptime !pardes.hosted) return; // A tape in memory (a replica's, an authority's stream) is taken // by whoever holds it. if (t.fd < 0) return; @@ -894,7 +893,6 @@ fn call(comptime s: Site, a: ?std.mem.Allocator, comptime f: anytype, args: anyt } else @compileError("tape: the site ." ++ @tagName(s) ++ " returns " ++ @typeName(R) ++ ", which tape.results does not list"); } // No tape where there is no host to record or replay one. - if (comptime !pardes.hosted) return if (yields) out(f, args) else @call(.auto, f, args); const t = on orelse return if (yields) out(f, args) else @call(.auto, f, args); const id: u16 = @as(u16, host_fns.len) + @backingInt(s); if (t.replay) { @@ -1201,7 +1199,6 @@ pub fn digestOf(p: *const Pardes) u64 { /// PARDES_RECORD set: the tape is written from the session's first call. pub fn startFromEnv() void { - if (comptime !pardes.hosted) return; if (on != null) return; const prefix = std.mem.span(libc.getenv("PARDES_RECORD") orelse return); if (prefix.len == 0) return; @@ -1257,7 +1254,6 @@ pub fn replayMain(io: std.Io, path: []const u8) u8 { } test "a syscall that is no site, made replaying, diverges the replay and poisons a speculation" { - if (comptime !pardes.hosted) return; const gpa = std.testing.allocator; var t: Tape = .{ .gpa = gpa, .replay = true, .scratch = .init(gpa), .arena = .init(gpa) }; defer t.scratch.deinit(); @@ -1276,7 +1272,6 @@ test "a syscall that is no site, made replaying, diverges the replay and poisons } test "a replay that finds no answer where its core reads one diverges, and the read goes on harmless" { - if (comptime !pardes.hosted) return; const gpa = std.testing.allocator; var t: Tape = .{ .gpa = gpa, .replay = true, .scratch = .init(gpa), .arena = .init(gpa) }; defer t.scratch.deinit(); -- cgit v1.3