| author | |
| committer | |
| log | bb3fd063b8560ce4b11e2b800656ad9c9308b3dc |
| tree | 703c447a0ab2197f81d8ef806f4bba6f540e9e44 |
| parent | 52af404f587454370900f8227c6d5c56c6f4a3a3 |
11 files changed, 29 insertions(+), 29 deletions(-)
src/cmd/aquila/showjson.zig+1-1| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const out = std.io.getStdOut().writer(); | |
| 3 | 4 | |
| 4 | 5 | const u = @import("./../../util/index.zig"); |
| 5 | 6 | const aq = @import("./../aq.zig"); |
| ... | ... | @@ -11,6 +12,5 @@ pub fn execute(args: [][]u8) !void { |
| 11 | 12 | const url = try std.mem.join(gpa, "/", &.{ aq.server_root, args[0] }); |
| 12 | 13 | const val = try aq.server_fetch(url); |
| 13 | 14 | |
| 14 | const out = std.io.getStdOut().writer(); | |
| 15 | 15 | try out.print("{}\n", .{val}); |
| 16 | 16 | } |
src/cmd/fetch.zig+11-11| ... | ... | @@ -1,8 +1,8 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const fs = std.fs; | |
| 4 | 3 | |
| 5 | 4 | const known_folders = @import("known-folders"); |
| 5 | ||
| 6 | 6 | const u = @import("./../util/index.zig"); |
| 7 | 7 | const common = @import("./../common.zig"); |
| 8 | 8 | |
| ... | ... | @@ -11,7 +11,7 @@ const common = @import("./../common.zig"); |
| 11 | 11 | |
| 12 | 12 | pub fn execute(args: [][]u8) !void { |
| 13 | 13 | // |
| 14 | const dir = try fs.path.join(gpa, &.{ ".zigmod", "deps" }); | |
| 14 | const dir = try std.fs.path.join(gpa, &.{ ".zigmod", "deps" }); | |
| 15 | 15 | const should_update = !(args.len >= 1 and std.mem.eql(u8, args[0], "--no-update")); |
| 16 | 16 | |
| 17 | 17 | const top_module = try common.collect_deps_deep(dir, "zig.mod", .{ |
| ... | ... | @@ -20,7 +20,7 @@ pub fn execute(args: [][]u8) !void { |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | 22 | // |
| 23 | const f = try fs.cwd().createFile("deps.zig", .{}); | |
| 23 | const f = try std.fs.cwd().createFile("deps.zig", .{}); | |
| 24 | 24 | defer f.close(); |
| 25 | 25 | |
| 26 | 26 | const w = f.writer(); |
| ... | ... | @@ -109,7 +109,7 @@ pub fn execute(args: [][]u8) !void { |
| 109 | 109 | try w.writeAll("};\n\n"); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | fn print_ids(w: fs.File.Writer, list: []u.Module) !void { | |
| 112 | fn print_ids(w: std.fs.File.Writer, list: []u.Module) !void { | |
| 113 | 113 | for (list) |mod| { |
| 114 | 114 | if (std.mem.eql(u8, mod.id, "root")) { |
| 115 | 115 | continue; |
| ... | ... | @@ -121,7 +121,7 @@ fn print_ids(w: fs.File.Writer, list: []u.Module) !void { |
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | fn print_paths(w: fs.File.Writer, list: []u.Module) !void { | |
| 124 | fn print_paths(w: std.fs.File.Writer, list: []u.Module) !void { | |
| 125 | 125 | for (list) |mod| { |
| 126 | 126 | if (std.mem.eql(u8, mod.id, "root")) { |
| 127 | 127 | continue; |
| ... | ... | @@ -138,7 +138,7 @@ fn print_paths(w: fs.File.Writer, list: []u.Module) !void { |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | fn print_deps(w: fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32, array: bool) anyerror!void { | |
| 141 | fn print_deps(w: std.fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32, array: bool) anyerror!void { | |
| 142 | 142 | if (m.has_no_zig_deps() and tabs > 0) { |
| 143 | 143 | try w.print("null", .{}); |
| 144 | 144 | return; |
| ... | ... | @@ -163,7 +163,7 @@ fn print_deps(w: fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32, array: |
| 163 | 163 | try w.print("{s}", .{try u.concat(&.{ r, "}" })}); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | fn print_incl_dirs_to(w: fs.File.Writer, list: []u.Module) !void { | |
| 166 | fn print_incl_dirs_to(w: std.fs.File.Writer, list: []u.Module) !void { | |
| 167 | 167 | for (list) |mod, i| { |
| 168 | 168 | if (mod.is_sys_lib) { |
| 169 | 169 | continue; |
| ... | ... | @@ -178,7 +178,7 @@ fn print_incl_dirs_to(w: fs.File.Writer, list: []u.Module) !void { |
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | fn print_csrc_dirs_to(w: fs.File.Writer, list: []u.Module) !void { | |
| 181 | fn print_csrc_dirs_to(w: std.fs.File.Writer, list: []u.Module) !void { | |
| 182 | 182 | for (list) |mod, i| { |
| 183 | 183 | if (mod.is_sys_lib) { |
| 184 | 184 | continue; |
| ... | ... | @@ -193,7 +193,7 @@ fn print_csrc_dirs_to(w: fs.File.Writer, list: []u.Module) !void { |
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | fn print_csrc_flags_to(w: fs.File.Writer, list: []u.Module) !void { | |
| 196 | fn print_csrc_flags_to(w: std.fs.File.Writer, list: []u.Module) !void { | |
| 197 | 197 | for (list) |mod, i| { |
| 198 | 198 | if (mod.is_sys_lib) { |
| 199 | 199 | continue; |
| ... | ... | @@ -209,7 +209,7 @@ fn print_csrc_flags_to(w: fs.File.Writer, list: []u.Module) !void { |
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | fn print_sys_libs_to(w: fs.File.Writer, list: []u.Module, list2: *std.ArrayList([]const u8)) !void { | |
| 212 | fn print_sys_libs_to(w: std.fs.File.Writer, list: []u.Module, list2: *std.ArrayList([]const u8)) !void { | |
| 213 | 213 | for (list) |mod| { |
| 214 | 214 | if (!mod.is_sys_lib) { |
| 215 | 215 | continue; |
| ... | ... | @@ -218,7 +218,7 @@ fn print_sys_libs_to(w: fs.File.Writer, list: []u.Module, list2: *std.ArrayList( |
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | fn print_pkg_data_to(w: fs.File.Writer, list: *std.ArrayList(u.Module), list2: *std.ArrayList(u.Module)) anyerror!void { | |
| 221 | fn print_pkg_data_to(w: std.fs.File.Writer, list: *std.ArrayList(u.Module), list2: *std.ArrayList(u.Module)) anyerror!void { | |
| 222 | 222 | var i: usize = 0; |
| 223 | 223 | while (i < list.items.len) : (i += 1) { |
| 224 | 224 | const mod = list.items[i]; |
src/cmd/license.zig+3-5| ... | ... | @@ -1,14 +1,12 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | |
| 4 | const style = @import("ansi").style; | |
| 5 | const licenses = @import("licenses"); | |
| 6 | ||
| 4 | 7 | const u = @import("./../util/index.zig"); |
| 5 | 8 | const common = @import("./../common.zig"); |
| 6 | 9 | |
| 7 | const ansi = @import("ansi"); | |
| 8 | const style = ansi.style; | |
| 9 | ||
| 10 | const licenses = @import("licenses"); | |
| 11 | ||
| 12 | 10 | const Module = u.Module; |
| 13 | 11 | const List = std.ArrayList(u.Module); |
| 14 | 12 | const Map = std.StringArrayHashMap(*List); |
src/cmd/sum.zig+1| ... | ... | @@ -2,6 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | |
| 4 | 4 | const known_folders = @import("known-folders"); |
| 5 | ||
| 5 | 6 | const u = @import("./../util/index.zig"); |
| 6 | 7 | const common = @import("./../common.zig"); |
| 7 | 8 |
src/cmd/zpm/showjson.zig+1-1| ... | ... | @@ -4,7 +4,7 @@ const gpa = std.heap.c_allocator; |
| 4 | 4 | const zfetch = @import("zfetch"); |
| 5 | 5 | const json = @import("json"); |
| 6 | 6 | |
| 7 | const u = @import("./../util/index.zig"); | |
| 7 | const u = @import("./../../util/index.zig"); | |
| 8 | 8 | const zpm = @import("./../zpm.zig"); |
| 9 | 9 | |
| 10 | 10 | // |
src/cmd/zpm/tags.zig+2-2| ... | ... | @@ -6,7 +6,7 @@ const zfetch = @import("zfetch"); |
| 6 | 6 | const json = @import("json"); |
| 7 | 7 | const range = @import("range").range; |
| 8 | 8 | |
| 9 | const u = @import("./../util/index.zig"); | |
| 9 | const u = @import("./../../util/index.zig"); | |
| 10 | 10 | const zpm = @import("./../zpm.zig"); |
| 11 | 11 | |
| 12 | 12 | // |
| ... | ... | @@ -41,7 +41,7 @@ pub fn execute(args: [][]u8) !void { |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | fn print_c_n(c: u8, n: usize) !void { |
| 44 | for (range(n)) |_, i| { | |
| 44 | for (range(n)) |_| { | |
| 45 | 45 | try out.writeAll(&.{c}); |
| 46 | 46 | } |
| 47 | 47 | } |
src/common.zig+5-6| ... | ... | @@ -1,6 +1,5 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const fs = std.fs; | |
| 4 | 3 | |
| 5 | 4 | const u = @import("./util/index.zig"); |
| 6 | 5 | |
| ... | ... | @@ -68,9 +67,9 @@ pub fn collect_pkgs(mod: u.Module, list: *std.ArrayList(u.Module)) anyerror!void |
| 68 | 67 | } |
| 69 | 68 | |
| 70 | 69 | fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: CollectOptions) ![]const u8 { |
| 71 | const p = try fs.path.join(gpa, &.{ basedir, try d.clean_path() }); | |
| 72 | const pv = try fs.path.join(gpa, &.{ basedir, try d.clean_path_v() }); | |
| 73 | const tempdir = try fs.path.join(gpa, &.{ basedir, "temp" }); | |
| 70 | const p = try std.fs.path.join(gpa, &.{ basedir, try d.clean_path() }); | |
| 71 | const pv = try std.fs.path.join(gpa, &.{ basedir, try d.clean_path_v() }); | |
| 72 | const tempdir = try std.fs.path.join(gpa, &.{ basedir, "temp" }); | |
| 74 | 73 | if (options.log) { |
| 75 | 74 | u.print("fetch: {s}: {s}: {s}", .{ parent_name, @tagName(d.type), d.path }); |
| 76 | 75 | } |
| ... | ... | @@ -101,8 +100,8 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: C |
| 101 | 100 | if ((try u.run_cmd(tempdir, &.{ "git", "checkout", vers.string })) > 0) { |
| 102 | 101 | u.assert(false, "fetch: git: {s}: {s} {s} does not exist", .{ d.path, @tagName(vers.id), vers.string }); |
| 103 | 102 | } |
| 104 | const td_fd = try fs.cwd().openDir(basedir, .{}); | |
| 105 | try fs.cwd().makePath(pv); | |
| 103 | const td_fd = try std.fs.cwd().openDir(basedir, .{}); | |
| 104 | try std.fs.cwd().makePath(pv); | |
| 106 | 105 | try td_fd.rename("temp", try d.clean_path_v()); |
| 107 | 106 | if (vers.id != .branch) { |
| 108 | 107 | const pvd = try std.fs.cwd().openDir(pv, .{}); |
src/main.zig+2-1| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const builtin = std.builtin; |
| 3 | ||
| 3 | 4 | const build_options = @import("build_options"); |
| 4 | 5 | const zigmod = @import("zigmod"); |
| 5 | 6 | |
| ... | ... | @@ -17,7 +18,7 @@ pub fn main() !void { |
| 17 | 18 | |
| 18 | 19 | if (args.len == 0) { |
| 19 | 20 | u.print("zigmod {s} {s} {s} {s}", .{ |
| 20 | @import("build_options").version, | |
| 21 | build_options.version, | |
| 21 | 22 | @tagName(builtin.os.tag), |
| 22 | 23 | @tagName(builtin.arch), |
| 23 | 24 | @tagName(builtin.abi), |
src/util/dep.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const builtin = @import("builtin"); | |
| 3 | const builtin = std.builtin; | |
| 4 | 4 | |
| 5 | 5 | const u = @import("index.zig"); |
| 6 | 6 | const yaml = @import("./yaml.zig"); |
src/util/funcs.zig+1| ... | ... | @@ -2,6 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | |
| 4 | 4 | const ansi = @import("ansi"); |
| 5 | ||
| 5 | 6 | const u = @import("index.zig"); |
| 6 | 7 | |
| 7 | 8 | // |
src/util/module.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const builtin = @import("builtin"); | |
| 3 | const builtin = std.builtin; | |
| 4 | 4 | |
| 5 | 5 | const u = @import("index.zig"); |
| 6 | 6 | const yaml = @import("./yaml.zig"); |