Function dump [src]

For debugging purposes, prints identifying information about this Step.

Prototype

pub fn dump(step: *Step, w: *std.Io.Writer, tty_config: std.Io.tty.Config) void

Parameters

step: *Stepw: *std.Io.Writertty_config: std.Io.tty.Config

Source

pub fn dump(step: *Step, w: *std.Io.Writer, tty_config: std.Io.tty.Config) void { const debug_info = std.debug.getSelfDebugInfo() catch |err| { w.print("Unable to dump stack trace: Unable to open debug info: {s}\n", .{ @errorName(err), }) catch {}; return; }; if (step.getStackTrace()) |stack_trace| { w.print("name: '{s}'. creation stack trace:\n", .{step.name}) catch {}; std.debug.writeStackTrace(stack_trace, w, debug_info, tty_config) catch |err| { w.print("Unable to dump stack trace: {s}\n", .{@errorName(err)}) catch {}; return; }; } else { const field = "debug_stack_frames_count"; comptime assert(@hasField(Build, field)); tty_config.setColor(w, .yellow) catch {}; w.print("name: '{s}'. no stack trace collected for this step, see std.Build." ++ field ++ "\n", .{step.name}) catch {}; tty_config.setColor(w, .reset) catch {}; } }