Function dumpBadGetPathHelp [src]
In this function the stderr mutex has already been locked.
Prototype
pub fn dumpBadGetPathHelp( s: *Step, w: *std.Io.Writer, tty_config: std.Io.tty.Config, src_builder: *Build, asking_step: ?*Step, ) anyerror!void
Parameters
s: *Step
w: *std.Io.Writer
tty_config: std.Io.tty.Config
src_builder: *Build
asking_step: ?*Step
Source
pub fn dumpBadGetPathHelp(
s: *Step,
w: *std.Io.Writer,
tty_config: std.Io.tty.Config,
src_builder: *Build,
asking_step: ?*Step,
) anyerror!void {
try w.print(
\\getPath() was called on a GeneratedFile that wasn't built yet.
\\ source package path: {s}
\\ Is there a missing Step dependency on step '{s}'?
\\
, .{
src_builder.build_root.path orelse ".",
s.name,
});
tty_config.setColor(w, .red) catch {};
try w.writeAll(" The step was created by this stack trace:\n");
tty_config.setColor(w, .reset) catch {};
s.dump(w, tty_config);
if (asking_step) |as| {
tty_config.setColor(w, .red) catch {};
try w.print(" The step '{s}' that is missing a dependency on the above step was created by this stack trace:\n", .{as.name});
tty_config.setColor(w, .reset) catch {};
as.dump(w, tty_config);
}
tty_config.setColor(w, .red) catch {};
try w.writeAll(" Hope that helps. Proceeding to panic.\n");
tty_config.setColor(w, .reset) catch {};
}