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 0.13 #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
version: 0.13.0

- name: Run tests
run: zig build test
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Set up zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
version: 0.13.0

- name: Check formatting
run: zig fmt --check .
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/result
/zig-cache
/.zig-cache
/zig-out
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "zon2nix",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe.addOptions("options", options);
exe.root_module.addOptions("options", options);
exe.linkLibC();
b.installArtifact(exe);

Expand All @@ -27,11 +27,11 @@ pub fn build(b: *std.Build) void {
run_step.dependOn(&run_cmd.step);

const unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
unit_tests.addOptions("options", options);
unit_tests.root_module.addOptions("options", options);
unit_tests.linkLibC();
const run_unit_tests = b.addRunArtifact(unit_tests);
const test_step = b.step("test", "Run unit tests");
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/fetch.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const ArrayList = std.ArrayList;
const ChildProcess = std.ChildProcess;
const ChildProcess = std.process.Child;
const StringHashMap = std.StringHashMap;
const fmt = std.fmt;
const fs = std.fs;
Expand Down