Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to zig changes: std.Progress API and zig-cache > .zig-cache #141

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
zig-cache
.zig-cache
zig-out
3 changes: 1 addition & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,12 @@ const CreateSymlinksStep = struct {
return self;
}

fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) anyerror!void {
fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {
const self: *CreateSymlinksStep = @fieldParentPtr("step", step);
const install_path = self.install.artifact.getEmittedBin().getPath(self.builder);
const rel_source = fs.path.basename(install_path);

var node = prog_node.start("creating symlinks", self.targets.len);
node.activate();
defer node.end();
for (self.targets, 0..) |target, i| {
const target_path = self.builder.getInstallPath(.bin, target);
Expand Down
4 changes: 2 additions & 2 deletions src/Zld.zig
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ pub fn getAllErrorsAlloc(base: *Zld) !ErrorBundle {
}

fn renderWarningToStdErr(eb: ErrorBundle) void {
std.debug.getStderrMutex().lock();
defer std.debug.getStderrMutex().unlock();
std.debug.lockStdErr();
defer std.debug.unlockStdErr();
const stderr = std.io.getStdErr();
return renderWarningToWriter(eb, stderr.writer()) catch return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ pub const SkipTestStep = struct {
return self;
}

fn make(step: *Step, prog_node: *std.Progress.Node) anyerror!void {
fn make(step: *Step, prog_node: std.Progress.Node) anyerror!void {
_ = step;
_ = prog_node;
return error.MakeSkipped;
Expand Down
Loading