Function make [src]

If the Step's make function reports error.MakeFailed, it indicates they have already reported the error. Otherwise, we add a simple error report here.

Prototype

pub fn make(s: *Step, options: MakeOptions) error{ MakeFailed, MakeSkipped }!void

Parameters

s: *Stepoptions: MakeOptions

Possible Errors

MakeFailed
MakeSkipped

Source

pub fn make(s: *Step, options: MakeOptions) error{ MakeFailed, MakeSkipped }!void { const arena = s.owner.allocator; s.makeFn(s, options) catch |err| switch (err) { error.MakeFailed => return error.MakeFailed, error.MakeSkipped => return error.MakeSkipped, else => { s.result_error_msgs.append(arena, @errorName(err)) catch @panic("OOM"); return error.MakeFailed; }, }; if (!s.test_results.isSuccess()) { return error.MakeFailed; } if (s.max_rss != 0 and s.result_peak_rss > s.max_rss) { const msg = std.fmt.allocPrint(arena, "memory usage peaked at {d} bytes, exceeding the declared upper bound of {d}", .{ s.result_peak_rss, s.max_rss, }) catch @panic("OOM"); s.result_error_msgs.append(arena, msg) catch @panic("OOM"); return error.MakeFailed; } }