From b85893000b874f751422957dce28a3ab4c85694b Mon Sep 17 00:00:00 2001 From: Bob Farrell Date: Sun, 25 May 2025 12:43:17 +0100 Subject: [PATCH] Zmpl array detection Latest Zmpl detects compatible arrays in structs added to template data. Small fix for static route compilation. --- build.zig.zon | 4 ++-- src/compile_static_routes.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 01f98b4..c17043c 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -25,8 +25,8 @@ .hash = "jetkv-0.0.0-zCv0fmCGAgCyYqwHjk0P5KrYVRew1MJAtbtAcIO-WPpT", }, .zmpl = .{ - .url = "https://github.com/jetzig-framework/zmpl/archive/b96cb431742b63302d8afc881660eabaeb1c4554.tar.gz", - .hash = "zmpl-0.0.1-SYFGBrujAwDTRz6rfcxcmmMGT0sL9v2JP85-uG7BdEDb", + .url = "https://github.com/jetzig-framework/zmpl/archive/febec2dd477adadf09c67676ac4bf2079046b1d6.tar.gz", + .hash = "zmpl-0.0.1-SYFGBhilAwAoY1evzcCHqpNFZf1zuB6IhY0P2w-bgM3t", }, .httpz = .{ .url = "https://github.com/karlseguin/http.zig/archive/37d7cb9819b804ade5f4b974b82f8dd0622225ed.tar.gz", diff --git a/src/compile_static_routes.zig b/src/compile_static_routes.zig index b027218..a39cbf9 100644 --- a/src/compile_static_routes.zig +++ b/src/compile_static_routes.zig @@ -31,7 +31,7 @@ pub fn main() !void { var index: usize = 0; while (it.next()) |arg| : (index += 1) { if (index == 0) continue; - const file = try std.fs.createFileAbsolute(arg, .{}); + const file = try std.fs.cwd().createFile(arg, .{}); const writer = file.writer(); try compileStaticRoutes(allocator, writer); file.close();