update the codebase for the new std.Progress API

This commit is contained in:
Andrew Kelley
2024-05-24 08:22:47 -07:00
parent f6873c6b00
commit f97c2f28fd
49 changed files with 226 additions and 355 deletions

View File

@@ -1059,7 +1059,7 @@ pub fn getUninstallStep(b: *Build) *Step {
return &b.uninstall_tls.step;
}
fn makeUninstall(uninstall_step: *Step, prog_node: *std.Progress.Node) anyerror!void {
fn makeUninstall(uninstall_step: *Step, prog_node: std.Progress.Node) anyerror!void {
_ = prog_node;
const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step);
const b: *Build = @fieldParentPtr("uninstall_tls", uninstall_tls);
@@ -2281,10 +2281,10 @@ pub const LazyPath = union(enum) {
.cwd_relative => |p| return src_builder.pathFromCwd(p),
.generated => |gen| {
var file_path: []const u8 = gen.file.step.owner.pathFromRoot(gen.file.path orelse {
std.debug.getStderrMutex().lock();
std.debug.lockStdErr();
const stderr = std.io.getStdErr();
dumpBadGetPathHelp(gen.file.step, stderr, src_builder, asking_step) catch {};
std.debug.getStderrMutex().unlock();
std.debug.unlockStdErr();
@panic("misconfigured build script");
});
@@ -2351,8 +2351,8 @@ fn dumpBadDirnameHelp(
comptime msg: []const u8,
args: anytype,
) anyerror!void {
debug.getStderrMutex().lock();
defer debug.getStderrMutex().unlock();
debug.lockStdErr();
defer debug.unlockStdErr();
const stderr = io.getStdErr();
const w = stderr.writer();