╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │103 - const work_path = try std.fs.path.join(allocator, &.{ server_path, "admin" }); │ │103 + const work_path = try std.Io.Dir.path.join(allocator, &.{ server_path, "admin" });│ │104 defer allocator.free(work_path); │ │105 │ │106 const Repo = rp.Repo(.xit, evt.admin_repo_opts); │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │229 }; │ │230 } │ │231 // commit the seed events and consume them into the database │ │232 - const users_dir = try std.fs.path.join(arena.allocator(), &.{ server_path, "users" }); │ │232 + const users_dir = try std.Io.Dir.path.join(arena.allocator(), &.{ server_path, "users" }); │ │233 try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &events_to_consume);│ │234 │ │235 // admin is granted ownership of every repo, so it has full privileges │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │281 // every repo gets the same generated history, so build it once into a │ │282 // template repo and copy that to each repo's location below rather than │ │283 // redoing the expensive commit work for every repo. │ │284 - const template_path = try std.fs.path.join(arena.allocator(), &.{ cwd_path, temp_dir_name, "template" }); │ │284 + const template_path = try std.Io.Dir.path.join(arena.allocator(), &.{ cwd_path, temp_dir_name, "template" });│ │285 { │ │286 var template_repo = try rp.Repo(.xit, .{}).init(io, allocator, .{ .path = template_path }); │ │287 defer template_repo.deinit(io, allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │905 │ │906 // let the native TUI's page builders open the on-disk repos for the file tree │ │907 session.io = io; │ │908 - session.users_dir = try std.fs.path.join(session_arena.allocator(), &.{ server_path, "users" }); │ │908 + session.users_dir = try std.Io.Dir.path.join(session_arena.allocator(), &.{ server_path, "users" });│ │909 │ │910 // leave a one-shot session for the first browser to hit the web ui, so it │ │911 // starts logged in as admin │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │1100 defer fork_dir.close(io); │ │1101 var writer = std.Io.Writer.Allocating.init(allocator); │ │1102 defer writer.deinit(); │ │1103 - if (std.fs.path.dirname(path)) |dir| try fork_dir.createDirPath(io, dir); │ │1103 + if (std.Io.Dir.path.dirname(path)) |dir| try fork_dir.createDirPath(io, dir);│ │1104 for (contents, 0..) |content, i| { │ │1105 { │ │1106 const file = try fork_dir.createFile(io, path, .{}); │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │1213 }, │ │1214 }; │ │1215 │ │1216 - const users_dir = try std.fs.path.join(allocator, &.{ server_path, "users" }); │ │1216 + const users_dir = try std.Io.Dir.path.join(allocator, &.{ server_path, "users" }); │ │1217 defer allocator.free(users_dir); │ │1218 const patch_author = evt.CommitAuthor{ .name = "admin", .email = "admin@example.test" };│ │1219 var patch_ids: [patch_data.len][evt.event_id_size]u8 = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1424 │ │1425 // a null tree keeps the parent's content, so the branch advances │ │1426 // without the fixture having to build one │ │1427 - const author_line = try std.fmt.allocPrint(aa, "{s} <{s}>", .{ ctx.author.name, ctx.author.email }); │ │1427 + const author_line = try aa.print("{s} <{s}>", .{ ctx.author.name, ctx.author.email }); │ │1428 const feature_old = (try rf.readRecur(.xit, opts, state.readOnly(), ctx.io, .{ .ref = .{ .kind = .head, .name = "feature" } })) orelse return error.NotFound;│ │1429 const feature_new = try obj.writeCommit(.xit, opts, state, ctx.io, ctx.allocator, .{ │ │1430 .message = "Revise the feature branch", │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1444 }, │ │1445 .{ │ │1446 .ref_name = try aa.dupe(u8, "refs/heads/docs"), │ │1447 - .old_oid = try aa.dupe(u8, "0" ** hash.hexLen(opts.hash)), │ │1447 + .old_oid = try aa.dupe(u8, &@as([hash.hexLen(opts.hash)]u8, @splat('0'))),│ │1448 .new_oid = try aa.dupe(u8, &docs_new), │ │1449 }, │ │1450 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │13 const Focus = xitui.focus.Focus; │ │14 // the random page art and the not-found page's fixed art. wasm receives its art│ │15 // from the server, so it links none. │ │16 -const ansi_art = if (builtin.cpu.arch == .wasm32) struct { │ │16 +const ansi_art = if (builtin.target.cpu.arch == .wasm32) struct { │ │17 const art: []const []const u8 = &.{}; │ │18 const not_found: []const u8 = ""; │ │19 } else @import("ansi_art"); │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │284 // the single branch:/tag:/object: param, null when none is set │ │285 fn ref(self: Params) error{BadUrl}!?RefParam { │ │286 var result: ?RefParam = null; │ │287 - inline for (@typeInfo(RefOrOid).@"enum".fields) |field| { │ │288 - if (self.values.get(@field(ParamKey, field.name))) |value| { │ │287 + inline for (@typeInfo(RefOrOid).@"enum".field_names) |name| { │ │288 + if (self.values.get(@field(ParamKey, name))) |value| { │ │289 if (result != null) return error.BadUrl; │ │290 - result = .{ .kind = @field(RefOrOid, field.name), .value = value };│ │290 + result = .{ .kind = @field(RefOrOid, name), .value = value }; │ │291 } │ │292 } │ │293 return result; │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯