diff --git a/build.zig b/build.zig index e3c1ab6..e0bb32f 100644 --- a/build.zig +++ b/build.zig @@ -24,9 +24,6 @@ pub fn build(b: *std.Build) void { exe.root_module.addImport("sqlite", sqlite.module("sqlite")); exe.root_module.addImport("ansi-term", @"ansi-term".module("ansi-term")); - // links the bundled sqlite3, so leave this out if you link the system one - exe.linkLibrary(sqlite.artifact("sqlite")); - // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default // step when running `zig build`). diff --git a/build.zig.zon b/build.zig.zon index 8644b84..0cb023c 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -3,14 +3,12 @@ .version = "0.0.0", .dependencies = .{ .sqlite = .{ - .url = "https://github.com/vrischmann/zig-sqlite/archive/878f8cf92b308dabe2dce9e24bd7849e005f7ab5.tar.gz", - .hash = "1220a3ff3c8e2a41fe0fe73e795e0eee4c3882edceef8ef16b0b250c7895709a9192", + .url = "https://github.com/vrischmann/zig-sqlite/archive/7165a6e4e4b82c8acc058d6a400096010445770c.tar.gz", + .hash = "1220c154890f02ff02d4b1e5e3753f826c045779164774c9e9fb962095947b47bb19", }, .@"ansi-term" = .{ - // ansi-term not yet on zig-0.13.0 - // .url = "https://github.com/ziglibs/ansi-term/archive/f9ea80dc9769dfffbb4c56a904149940c79168da.tar.gz", - // .hash = "1220c650d57ceb323d3e74945189aaae7a9c0ac74afd023cba5533fb7d5874b2955c", - .path = "lib/ansi-term", + .url = "git+https://github.com/ziglibs/ansi-term/?ref=HEAD#010f170cbe72786ed52645a9dd6cde27b02b47b4", + .hash = "12203a64b02d46e6c2e268b7da60cb11b2fa83dc580cad77cf330d1438e2280de46f", }, }, .paths = .{""}, diff --git a/src/print.zig b/src/print.zig index afe25de..3c418c9 100644 --- a/src/print.zig +++ b/src/print.zig @@ -21,14 +21,14 @@ pub fn help(stdout: anytype) !void { const version_number = @embedFile(".version"); pub fn version(stdout: anytype) !void { - const bold = .{ .font_style = style.FontStyle.bold }; + const bold: ansi.style.Style = .{ .font_style = .{ .bold = true } }; try format.updateStyle(stdout, bold, null); try stdout.print("clerk {s}\n", .{version_number}); try format.updateStyle(stdout, .{}, bold); } pub fn err(stdout: anytype, message: []const u8) !void { - const sty = .{ .foreground = style.Color.Red }; + const sty: ansi.style.Style = .{ .foreground = style.Color.Red }; try format.updateStyle(stdout, sty, null); try stdout.print("{s}", .{message}); try format.updateStyle(stdout, .{}, sty); @@ -75,6 +75,6 @@ pub fn noSuchId(stdout: anytype, id: usize) !void { try stdout.print("]\n", .{}); } -const yellow = .{ .foreground = style.Color.Yellow, .font_style = style.FontStyle.bold }; -const red = .{ .foreground = style.Color.Red, .font_style = style.FontStyle.bold }; -const green = .{ .foreground = style.Color.Green, .font_style = style.FontStyle.bold }; +const yellow: ansi.style.Style = .{ .foreground = style.Color.Yellow, .font_style = .{ .bold = true } }; +const red: ansi.style.Style = .{ .foreground = style.Color.Red, .font_style = .{ .bold = true } }; +const green: ansi.style.Style = .{ .foreground = style.Color.Green, .font_style = .{ .bold = true } };