summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-07-10 10:24:09 +0300
committerGravatar Uko Kokņevičs2024-07-10 10:24:09 +0300
commit4f35f40441b195749b88352c1b7e6487541b03d7 (patch)
treeb0e4612eaa18c4edee3c587ac5378d2b4b8928a8
parentRelease 0.4.0 (diff)
downloadzup-4f35f40441b195749b88352c1b7e6487541b03d7.tar.gz
zup-4f35f40441b195749b88352c1b7e6487541b03d7.tar.xz
zup-4f35f40441b195749b88352c1b7e6487541b03d7.zip
Update for zig 0.13.0
-rw-r--r--.gitignore4
-rw-r--r--build.zig10
-rw-r--r--build.zig.zon12
-rw-r--r--src/Installation.zig2
-rw-r--r--src/main.zig4
5 files changed, 19 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index d816eba..dabae4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
1*~ 1*~
2zig-cache/** 2.zig-cache/
3zig-out/** 3zig-out/
4README.html 4README.html
5.DS_Store 5.DS_Store
diff --git a/build.zig b/build.zig
index fc642a7..f1159b0 100644
--- a/build.zig
+++ b/build.zig
@@ -20,7 +20,10 @@ pub fn build(b: *Build) void {
20 const exe = b.addExecutable(.{ 20 const exe = b.addExecutable(.{
21 .name = "zup", 21 .name = "zup",
22 .version = version, 22 .version = version,
23 .root_source_file = .{ .path = "src/main.zig" }, 23 .root_source_file = .{ .src_path = .{
24 .owner = b,
25 .sub_path = "src/main.zig",
26 } },
24 .target = target, 27 .target = target,
25 .optimize = optimize, 28 .optimize = optimize,
26 }); 29 });
@@ -40,7 +43,10 @@ pub fn build(b: *Build) void {
40 run_step.dependOn(&run_cmd.step); 43 run_step.dependOn(&run_cmd.step);
41 44
42 const exe_tests = b.addTest(.{ 45 const exe_tests = b.addTest(.{
43 .root_source_file = .{ .path = "src/main.zig" }, 46 .root_source_file = .{ .src_path = .{
47 .owner = b,
48 .sub_path = "src/main.zig",
49 } },
44 .target = target, 50 .target = target,
45 .optimize = optimize, 51 .optimize = optimize,
46 }); 52 });
diff --git a/build.zig.zon b/build.zig.zon
index aed6a59..2d7a69c 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -5,16 +5,16 @@
5 .paths = .{""}, 5 .paths = .{""},
6 .dependencies = .{ 6 .dependencies = .{
7 .clap = .{ 7 .clap = .{
8 .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-0.8.0.tar.xz", 8 .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-0.9.1.tar.xz",
9 .hash = "1220949d4e88864579067b6d4cdad6476c6176f27e782782c2c39b7f2c4817a10efb", 9 .hash = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b",
10 }, 10 },
11 .libarchive = .{ 11 .libarchive = .{
12 .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-0.3.0.tar.xz", 12 .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-0.4.0.tar.xz",
13 .hash = "1220d8262d35559168d67d60797829a36958320556b277cd0e701a34eb00880461ab", 13 .hash = "1220b21cc99fca50b7fa495191a17abe440dc8229aa3bc5a638c4a0f2ffdceccbdda",
14 }, 14 },
15 .xdg = .{ 15 .xdg = .{
16 .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-0.3.0.tar.xz", 16 .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-0.4.0.tar.xz",
17 .hash = "1220e214475ea8ff31ac110f593be121663eefdca27d19508d0c96bc49f47c31756f", 17 .hash = "12206c1b6e163e79b83eb1e6cb1d575b256e603a0bbf9c2726e6f3235028eabbff41",
18 }, 18 },
19 }, 19 },
20} 20}
diff --git a/src/Installation.zig b/src/Installation.zig
index 6565263..6e2e120 100644
--- a/src/Installation.zig
+++ b/src/Installation.zig
@@ -5,7 +5,7 @@ const zup = @import("root");
5const Allocator = std.mem.Allocator; 5const Allocator = std.mem.Allocator;
6const ArenaAllocator = std.heap.ArenaAllocator; 6const ArenaAllocator = std.heap.ArenaAllocator;
7const Config = zup.Config; 7const Config = zup.Config;
8const ChildProcess = std.ChildProcess; 8const ChildProcess = std.process.Child;
9const EasyHttp = zup.EasyHttp; 9const EasyHttp = zup.EasyHttp;
10const JsonValue = std.json.Value; 10const JsonValue = std.json.Value;
11const SemanticVersion = std.SemanticVersion; 11const SemanticVersion = std.SemanticVersion;
diff --git a/src/main.zig b/src/main.zig
index f5b6c1e..57baac1 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -16,8 +16,8 @@ const std = @import("std");
16const zup_config = @import("zup-config"); 16const zup_config = @import("zup-config");
17 17
18const ArgIterator = std.process.ArgIterator; 18const ArgIterator = std.process.ArgIterator;
19const ComptimeStringMap = std.ComptimeStringMap;
20const GPA = std.heap.GeneralPurposeAllocator(.{}); 19const GPA = std.heap.GeneralPurposeAllocator(.{});
20const StaticStringMap = std.StaticStringMap;
21const Tuple = std.meta.Tuple; 21const Tuple = std.meta.Tuple;
22 22
23pub fn main() !void { 23pub fn main() !void {
@@ -65,7 +65,7 @@ const CommandMap = blk: {
65 idx += 1; 65 idx += 1;
66 } 66 }
67 67
68 break :blk ComptimeStringMap(Command, map_data); 68 break :blk StaticStringMap(Command).initComptime(map_data);
69}; 69};
70 70
71fn dispatch( 71fn dispatch(