| ... | @@ -1,10 +1,16 @@ | ... | @@ -1,10 +1,16 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const gpa = std.heap.c_allocator; | 2 | const gpa = std.heap.c_allocator; |
| 3 | | 3 | |
| | 4 | const ansi = @import("ansi"); |
| | 5 | |
| 4 | const u = @import("./util/index.zig"); | 6 | const u = @import("./util/index.zig"); |
| 5 | const yaml = @import("./util/yaml.zig"); | 7 | const yaml = @import("./util/yaml.zig"); |
| 6 | const string = []const u8; | 8 | const string = []const u8; |
| 7 | | 9 | |
| | 10 | const root = @import("root"); |
| | 11 | const build_options = if (@hasDecl(root, "build_options")) root.build_options else struct {}; |
| | 12 | const bootstrap = if (@hasDecl(build_options, "bootstrap")) build_options.bootstrap else false; |
| | 13 | |
| 8 | // | 14 | // |
| 9 | // | 15 | // |
| 10 | | 16 | |
| ... | @@ -97,6 +103,12 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: * | ... | @@ -97,6 +103,12 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: * |
| 97 | if (options.log and d.type != .local) { | 103 | if (options.log and d.type != .local) { |
| 98 | u.print("fetch: {s}: {s}: {s}", .{ parent_name, @tagName(d.type), d.path }); | 104 | u.print("fetch: {s}: {s}: {s}", .{ parent_name, @tagName(d.type), d.path }); |
| 99 | } | 105 | } |
| | 106 | defer { |
| | 107 | if (!bootstrap and options.log and d.type != .local) { |
| | 108 | std.debug.print("{s}", .{ansi.csi.CursorUp(1)}); |
| | 109 | std.debug.print("{s}", .{ansi.csi.EraseInLine(0)}); |
| | 110 | } |
| | 111 | } |
| 100 | switch (d.type) { | 112 | switch (d.type) { |
| 101 | .local => { | 113 | .local => { |
| 102 | if (!std.mem.endsWith(u8, d.main, ".zig")) { | 114 | if (!std.mem.endsWith(u8, d.main, ".zig")) { |