| author | |
| committer | |
| log | 2c004d07b20f8b9d7369426721d4fc4b107a435f |
| tree | 2a6958185dcae4f34183fc0f5cbf8ac721a4eb66 |
| parent | a9c075a8176a61e1af28cc951a438915679e3c40 |
15 files changed, 22 insertions(+), 19 deletions(-)
.github/workflows/nightly.yml+1-1| ... | ... | @@ -27,7 +27,7 @@ jobs: |
| 27 | 27 | uses: mlugg/setup-zig@v1 |
| 28 | 28 | with: |
| 29 | 29 | mirror: "http://mirrors.nektro.net/s3cgi" |
| 30 | version: "0.12.0" | |
| 30 | version: "0.13.0" | |
| 31 | 31 | |
| 32 | 32 | - run: zig version |
| 33 | 33 | - run: zig env |
.github/workflows/push.yml+1-1| ... | ... | @@ -20,7 +20,7 @@ jobs: |
| 20 | 20 | uses: mlugg/setup-zig@v1 |
| 21 | 21 | with: |
| 22 | 22 | mirror: "http://mirrors.nektro.net/s3cgi" |
| 23 | version: "0.12.0" | |
| 23 | version: "0.13.0" | |
| 24 | 24 | |
| 25 | 25 | - run: zig version |
| 26 | 26 | - run: zig env |
.gitignore+3-1| ... | ... | @@ -1,3 +1,5 @@ |
| 1 | zig-* | |
| 1 | zig-cache | |
| 2 | .zig-cache | |
| 3 | zig-out | |
| 2 | 4 | .zigmod |
| 3 | 5 | bin |
README.md+1-1| ... | ... | @@ -16,7 +16,7 @@ A package manager for the Zig programming language. |
| 16 | 16 | - https://github.com/nektro/zigmod/releases |
| 17 | 17 | |
| 18 | 18 | ## Built With |
| 19 | - Zig master (at least `0.12.0`) | |
| 19 | - Zig `0.13.0` | |
| 20 | 20 | - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) |
| 21 | 21 | |
| 22 | 22 | ### Build from Source |
build.zig+1-1| ... | ... | @@ -11,7 +11,7 @@ pub fn build(b: *std.Build) void { |
| 11 | 11 | const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" }); |
| 12 | 12 | const exe = b.addExecutable(.{ |
| 13 | 13 | .name = exe_name, |
| 14 | .root_source_file = .{ .path = "src/main.zig" }, | |
| 14 | .root_source_file = b.path("src/main.zig"), | |
| 15 | 15 | .target = target, |
| 16 | 16 | .optimize = mode, |
| 17 | 17 | }); |
deps.zig+3-3| ... | ... | @@ -40,7 +40,7 @@ pub const GitExactStep = struct { |
| 40 | 40 | return result; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) !void { | |
| 43 | fn make(step: *std.Build.Step, prog_node: std.Progress.Node) !void { | |
| 44 | 44 | _ = step; |
| 45 | 45 | _ = prog_node; |
| 46 | 46 | } |
| ... | ... | @@ -126,7 +126,7 @@ pub const Package = struct { |
| 126 | 126 | }); |
| 127 | 127 | dummy_library.step.dependOn(fetch_step); |
| 128 | 128 | if (self.entry) |capture| { |
| 129 | result.root_source_file = .{ .path = capture }; | |
| 129 | result.root_source_file = .{ .cwd_relative = capture }; | |
| 130 | 130 | } |
| 131 | 131 | for (self.deps) |item| { |
| 132 | 132 | const module_dep = item.module(exe, fetch_step); |
| ... | ... | @@ -168,7 +168,7 @@ pub const Package = struct { |
| 168 | 168 | }; |
| 169 | 169 | |
| 170 | 170 | fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void { |
| 171 | const min = std.SemanticVersion.parse("0.12.0") catch return; | |
| 171 | const min = std.SemanticVersion.parse("0.13.0") catch return; | |
| 172 | 172 | if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min})); |
| 173 | 173 | } |
| 174 | 174 |
docs/README.md+1-1| ... | ... | @@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed. |
| 10 | 10 | |
| 11 | 11 | As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. |
| 12 | 12 | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.12.0`. | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.13.0`. | |
| 14 | 14 | |
| 15 | 15 | ## Download |
| 16 | 16 | You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. |
src/cmd/aquila/install.zig+1-1| ... | ... | @@ -70,7 +70,7 @@ pub fn execute(self_name: []const u8, args: [][]u8) !void { |
| 70 | 70 | "--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }), |
| 71 | 71 | "--cache-dir", try std.fs.path.join(gpa, &.{ cache.?, "zigmod", "zig" }), |
| 72 | 72 | }; |
| 73 | var proc = std.ChildProcess.init(argv, gpa); | |
| 73 | var proc = std.process.Child.init(argv, gpa); | |
| 74 | 74 | proc.cwd = modpath; |
| 75 | 75 | const term = try proc.spawnAndWait(); |
| 76 | 76 | switch (term) { |
src/cmd/aquila/update.zig+1-1| ... | ... | @@ -56,7 +56,7 @@ pub fn execute(self_name: []const u8, args: [][]u8) !void { |
| 56 | 56 | "--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }), |
| 57 | 57 | "--cache-dir", try std.fs.path.join(gpa, &.{ cache.?, "zigmod", "zig" }), |
| 58 | 58 | }; |
| 59 | var proc = std.ChildProcess.init(argv, gpa); | |
| 59 | var proc = std.process.Child.init(argv, gpa); | |
| 60 | 60 | proc.cwd = modpath; |
| 61 | 61 | const term = try proc.spawnAndWait(); |
| 62 | 62 | switch (term) { |
src/cmd/fetch.zig+1-1| ... | ... | @@ -329,7 +329,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 329 | 329 | }); |
| 330 | 330 | if (mod.main.len > 0 and !std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) { |
| 331 | 331 | try w.print( |
| 332 | \\ .import = .{{ "{s}", .{{ .path = dirs._{s} ++ "/{s}" }} }}, | |
| 332 | \\ .import = .{{ "{s}", .{{ .cwd_relative = dirs._{s} ++ "/{s}" }} }}, | |
| 333 | 333 | \\ |
| 334 | 334 | , .{ |
| 335 | 335 | mod.name, |
src/cmd/generate.zig+2-2| ... | ... | @@ -83,7 +83,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 83 | 83 | \\ return result; |
| 84 | 84 | \\ } |
| 85 | 85 | \\ |
| 86 | \\ fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) !void { | |
| 86 | \\ fn make(step: *std.Build.Step, prog_node: std.Progress.Node) !void { | |
| 87 | 87 | \\ _ = step; |
| 88 | 88 | \\ _ = prog_node; |
| 89 | 89 | \\ } |
| ... | ... | @@ -162,7 +162,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 162 | 162 | \\ }); |
| 163 | 163 | \\ dummy_library.step.dependOn(fetch_step); |
| 164 | 164 | \\ if (self.entry) |capture| { |
| 165 | \\ result.root_source_file = .{ .path = capture }; | |
| 165 | \\ result.root_source_file = .{ .cwd_relative = capture }; | |
| 166 | 166 | \\ } |
| 167 | 167 | \\ for (self.deps) |item| { |
| 168 | 168 | \\ const module_dep = item.module(exe, fetch_step); |
src/cmd/init.zig+2-1| ... | ... | @@ -147,7 +147,8 @@ pub fn execute(self_name: []const u8, args: [][]u8) !void { |
| 147 | 147 | if (len > 0 and (try file.reader().readByte()) != '\n') { |
| 148 | 148 | try w.writeAll("\n"); |
| 149 | 149 | } |
| 150 | if (!exists) try w.writeAll("zig-*\n"); | |
| 150 | if (!exists) try w.writeAll(".zig-cache\n"); | |
| 151 | if (!exists) try w.writeAll("zig-out\n"); | |
| 151 | 152 | try w.writeAll(".zigmod\n"); |
| 152 | 153 | try w.writeAll("deps.zig\n"); |
| 153 | 154 | try w.writeAll("files.zig\n"); |
src/main.zig+1-1| ... | ... | @@ -56,7 +56,7 @@ pub fn main() !void { |
| 56 | 56 | for (args[1..]) |item| { |
| 57 | 57 | try sub_cmd_args.append(item); |
| 58 | 58 | } |
| 59 | const result = std.ChildProcess.run(.{ .allocator = gpa, .argv = sub_cmd_args.items }) catch |e| switch (e) { | |
| 59 | const result = std.process.Child.run(.{ .allocator = gpa, .argv = sub_cmd_args.items }) catch |e| switch (e) { | |
| 60 | 60 | else => |ee| return ee, |
| 61 | 61 | error.FileNotFound => { |
| 62 | 62 | fail("unknown command \"{s}\" for \"zigmod\"", .{args[0]}); |
src/util/funcs.zig+2-2| ... | ... | @@ -53,8 +53,8 @@ pub fn file_list(alloc: std.mem.Allocator, dpath: string) ![]const string { |
| 53 | 53 | return try extras.fileList(alloc, dir); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | pub fn run_cmd_raw(alloc: std.mem.Allocator, dir: ?string, args: []const string) !std.ChildProcess.RunResult { | |
| 57 | return std.ChildProcess.run(.{ .allocator = alloc, .cwd = dir, .argv = args, .max_output_bytes = std.math.maxInt(usize) }) catch |e| switch (e) { | |
| 56 | pub fn run_cmd_raw(alloc: std.mem.Allocator, dir: ?string, args: []const string) !std.process.Child.RunResult { | |
| 57 | return std.process.Child.run(.{ .allocator = alloc, .cwd = dir, .argv = args, .max_output_bytes = std.math.maxInt(usize) }) catch |e| switch (e) { | |
| 58 | 58 | error.FileNotFound => { |
| 59 | 59 | u.fail("\"{s}\" command not found", .{args[0]}); |
| 60 | 60 | }, |
zig.mod+1-1| ... | ... | @@ -3,7 +3,7 @@ name: zigmod |
| 3 | 3 | main: src/lib.zig |
| 4 | 4 | license: MIT |
| 5 | 5 | description: A package manager for the Zig programming language. |
| 6 | min_zig_version: 0.12.0 | |
| 6 | min_zig_version: 0.13.0 | |
| 7 | 7 | dependencies: |
| 8 | 8 | - src: git https://github.com/nektro/zig-yaml |
| 9 | 9 | - src: git https://github.com/nektro/zig-ansi |