From 5376b6a725d406b0b9581eb65505a852730d6a98 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 25 Oct 2023 00:14:33 -0700 Subject: [PATCH] fix downstream build issues --- build.zig | 2 +- src/console.zig | 4 ++-- src/universal_lambda_build.zig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index 4ee79e7..b376ec2 100644 --- a/build.zig +++ b/build.zig @@ -57,5 +57,5 @@ pub fn configureBuild(b: *std.Build, cs: *std.Build.Step.Compile) !void { try @import("src/universal_lambda_build.zig").configureBuild(b, cs); } pub fn addModules(b: *std.Build, cs: *std.Build.Step.Compile) ![]const u8 { - try @import("src/universal_lambda_build.zig").addModules(b, cs); + return try @import("src/universal_lambda_build.zig").addModules(b, cs); } diff --git a/src/console.zig b/src/console.zig index 4669231..7a95c0a 100644 --- a/src/console.zig +++ b/src/console.zig @@ -23,7 +23,7 @@ pub fn run(allocator: ?std.mem.Allocator, event_handler: interface.HandlerFn) !u const data = if (is_test) test_content else - std.io.getStdIn().reader().readAllAlloc(aa, std.math.maxInt(usize)); + try std.io.getStdIn().reader().readAllAlloc(aa, std.math.maxInt(usize)); // We're setting up an arena allocator. While we could use a gpa and get // some additional safety, this is now "production" runtime, and those // things are better handled by unit tests @@ -173,7 +173,7 @@ pub fn findHeaders(allocator: std.mem.Allocator) !Headers { // or the command line. For headers, we'll prioritize command line options // with a fallback to environment variables const is_test = @import("builtin").is_test; - var argIterator = if (is_test) test_args.iterator(0) else std.process.argsWithAllocator(allocator); + var argIterator = if (is_test) test_args.iterator(0) else try std.process.argsWithAllocator(allocator); _ = argIterator.next(); var is_header_option = false; while (argIterator.next()) |a| { diff --git a/src/universal_lambda_build.zig b/src/universal_lambda_build.zig index 43dff52..8702945 100644 --- a/src/universal_lambda_build.zig +++ b/src/universal_lambda_build.zig @@ -17,7 +17,7 @@ pub var module_root: ?[]const u8 = null; pub fn configureBuild(b: *std.Build, cs: *std.Build.Step.Compile) !void { const function_name = b.option([]const u8, "function-name", "Function name for Lambda [zig-fn]") orelse "zig-fn"; - const file_location = addModules(b, cs); + const file_location = try addModules(b, cs); // Add steps try @import("lambda_build.zig").configureBuild(b, cs, function_name);