authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 21:31:27 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 21:31:27 -07:00
log36e29e29829658c2028a1d2fcd5d6fa579516ca9
tree2c0609cd04d30e3f567e934639394513dc455189
parentff3bc553c65894e1dce033a7c0b89acdb97696fc
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

cmd/zpm: dont json parse streaming yet

https://github.com/nektro/zigmod/actions/runs/26798344024/job/78999475269

1 files changed, 2 insertions(+), 1 deletions(-)

src/cmd/zpm.zig+2-1
...@@ -68,7 +68,8 @@ pub fn server_fetch(url: string) !json.Document {...@@ -68,7 +68,8 @@ pub fn server_fetch(url: string) !json.Document {
68 try req.sendBodiless();68 try req.sendBodiless();
69 var resp = try req.receiveHead(&.{});69 var resp = try req.receiveHead(&.{});
70 if (resp.head.status != .ok) u.fail("expected: 200 from '{s}' got: {s}", .{ url, @tagName(resp.head.status) });70 if (resp.head.status != .ok) u.fail("expected: 200 from '{s}' got: {s}", .{ url, @tagName(resp.head.status) });
71 return json.parse(gpa, "", nio.AnyReadable.fromStd(resp.reader(&buf)), .{ .support_trailing_commas = true, .maximum_depth = 100 });71 const content = try resp.reader(&buf).allocRemaining(gpa, .limited(1024 * 1024 * 5));
72 return json.parseFromSlice(gpa, "", content, .{ .support_trailing_commas = true, .maximum_depth = 100 });
72}73}
7374
74pub fn server_fetchArray(url: string) ![]const Package {75pub fn server_fetchArray(url: string) ![]const Package {