| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | |
| 4 | const string = []const u8; |
| 4 | 5 | |
| 5 | 6 | const u = @import("./../util/index.zig"); |
| 6 | 7 | const common = @import("./../common.zig"); |
| ... | ... | @@ -33,7 +34,7 @@ pub fn execute(args: [][]u8) !void { |
| 33 | 34 | try create_lockfile(list, dir); |
| 34 | 35 | } |
| 35 | 36 | |
| 36 | | pub fn create_depszig(dir: []const u8, top_module: u.Module, list: *std.ArrayList(u.Module)) !void { |
| 37 | pub fn create_depszig(dir: string, top_module: u.Module, list: *std.ArrayList(u.Module)) !void { |
| 37 | 38 | const f = try std.fs.cwd().createFile("deps.zig", .{}); |
| 38 | 39 | defer f.close(); |
| 39 | 40 | |
| ... | ... | @@ -110,7 +111,7 @@ pub fn create_depszig(dir: []const u8, top_module: u.Module, list: *std.ArrayLis |
| 110 | 111 | try w.writeAll("};\n\n"); |
| 111 | 112 | } |
| 112 | 113 | |
| 113 | | fn create_lockfile(list: *std.ArrayList(u.Module), dir: []const u8) !void { |
| 114 | fn create_lockfile(list: *std.ArrayList(u.Module), dir: string) !void { |
| 114 | 115 | const fl = try std.fs.cwd().createFile("zigmod.lock", .{}); |
| 115 | 116 | defer fl.close(); |
| 116 | 117 | |
| ... | ... | @@ -254,7 +255,7 @@ fn print_pkgs(w: std.fs.File.Writer, m: u.Module) !void { |
| 254 | 255 | try w.writeAll("}"); |
| 255 | 256 | } |
| 256 | 257 | |
| 257 | | fn print_imports(w: std.fs.File.Writer, m: u.Module, dir: []const u8) !void { |
| 258 | fn print_imports(w: std.fs.File.Writer, m: u.Module, dir: string) !void { |
| 258 | 259 | for (m.deps) |d| { |
| 259 | 260 | if (d.main.len == 0) { |
| 260 | 261 | continue; |