DoxigAlpha

dump

For debugging purposes, prints identifying information about this Step.

Function parameters

Parameters

#
step:*Step
w:*std.Io.Writer
tty_config:std.Io.tty.Config

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
make
If the Step's `make` function reports `error.MakeFailed`, it indicates they
dump
For debugging purposes, prints identifying information about this Step.
evalZigProcess
Assumes that argv contains `--listen=-` and that the process being spawned
installFile
Wrapper around `std.fs.Dir.updateFile` that handles verbose and error output.
installDir
Wrapper around `std.fs.Dir.makePathStatus` that handles verbose and error output.
cacheHit
Prefer `cacheHitAndWatch` unless you already added watch inputs
cacheHitAndWatch
Clears previous watch inputs, if any, and then populates watch inputs from
writeManifest
Prefer `writeManifestAndWatch` unless you already added watch inputs
writeManifestAndWatch
Clears previous watch inputs, if any, and then populates watch inputs from
singleUnchangingWatchInput
For steps that have a single input that never changes when re-running `make`.
addWatchInput
Places a *file* dependency on the path.
addDirectoryWatchInput
Any changes inside the directory will trigger invalidation.
addDirectoryWatchInputFromPath
Any changes inside the directory will trigger invalidation.
reset
Implementation detail of file watching and forced rebuilds.
recursiveReset
Implementation detail of file watching.

Source

Implementation

#
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 {};
    }
}