-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathbuild.zig
716 lines (616 loc) · 24.2 KB
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
const std = @import("std");
pub const BuildAsset = struct {
/// Name of this asset
name: []const u8,
/// LazyPath of the generated asset.
///
/// The LazyPath cannot be generated by calling `b.path`.
/// Use the 'assets' directory for non-buildtime assets.
lp: std.Build.LazyPath,
/// Installation path relative to the website's asset output path prefix.
///
/// It is recommended to give the file an appropriate file extension.
/// No need to specify this value if the asset is not meant to be
/// `link()`ed
install_path: ?[]const u8 = null,
/// Installs the asset unconditionally when set to true.
///
/// When set to false, the asset will be installed only if `link()`ed
/// in a content file or layout (requires `install_path` to be set).
///
/// Note that even when this property is set to false the asset will be
/// generated by the Zig build system regardless.
install_always: bool = false,
};
pub const Options = struct {
/// The directory that contains 'zine.ziggy'.
/// Defaults to the directory where your 'build.zig' lives.
website_root: ?std.Build.LazyPath = null,
/// Assets generated by the Zig build system to be made available to Zine.
build_assets: []BuildAsset = &.{},
/// Path where to install the website, relative to the zig build install
/// prefix.
install_path: []const u8 = "",
/// Whether Zine should be built from source or grabbed from the
/// environment. In ephemeral environments like CI runners you might
/// want to build from source only if you are also saving Zig's cache dirs.
zine: union(enum) {
/// Build Zine from source (the default).
source,
/// Get Zine from the environment. You can either specify a path
/// to the executable or leave it null if you have 'zine' available
/// in PATH.
path: ?[]const u8,
} = .source,
/// Debug settings for Zine.
debug: struct {
/// The optimization level to use when building Zine.
optimize: std.builtin.OptimizeMode = .ReleaseFast,
/// Logging scopes to enable.
scopes: []const []const u8 = &.{},
} = .{},
};
/// Builds a Zine website.
pub fn website(project: *std.Build, opts: Options) *std.Build.Step.Run {
const zine_dep = project.dependencyFromBuildZig(@This(), .{
.optimize = opts.debug.optimize,
.scope = opts.debug.scopes,
});
const run_zine = switch (opts.zine) {
.source => project.addRunArtifact(zine_dep.artifact("zine")),
.path => |path| project.addSystemCommand(&.{path orelse "zine"}),
};
run_zine.setCwd(opts.website_root orelse project.path("."));
run_zine.addArg("release");
const full_install_path = project.pathJoin(&.{
project.install_prefix,
opts.install_path,
});
run_zine.addArg(project.fmt("--install={s}", .{full_install_path}));
for (opts.build_assets) |a| {
run_zine.addArg(project.fmt("--build-asset={s}", .{a.name}));
run_zine.addFileArg(a.lp);
if (a.install_always) {
const out_path = a.install_path orelse std.debug.panic(
"Build assets '{s}' specifies install_always = true " ++
"but defines no install path.",
.{a.name},
);
run_zine.addArg(project.fmt("--output-always={s}", .{
out_path,
}));
} else if (a.install_path) |ip| {
run_zine.addArg(project.fmt("--output={s}", .{ip}));
}
}
return run_zine;
}
/// Serves a Zine website via the Zine live server, allowing you to edit
/// the input files and obtaining instant rebuild and page reload.
/// Currently does not support `--watch` but will in the future.
///
/// Ignores `opts.install_path` as it keeps all generated files in memory.
pub fn serve(project: *std.Build, opts: Options) *std.Build.Step.Run {
const zine_dep = project.dependencyFromBuildZig(@This(), .{
.optimize = opts.debug.optimize,
.scope = opts.debug.scopes,
});
const run_zine = project.addRunArtifact(zine_dep.artifact("zine"));
run_zine.setCwd(opts.website_root orelse project.path("."));
for (opts.build_assets) |a| {
run_zine.addArg(project.fmt("--build-asset={s}", .{a.name}));
run_zine.addFileArg(a.lp);
if (a.install_always) {
const out_path = a.install_path orelse std.debug.panic(
"Build assets '{s}' specifies output_always = true " ++
"but defines no install path.",
.{a.name},
);
run_zine.addArg(project.fmt("--output-always={s}", .{
out_path,
}));
} else if (a.install_path) |ip| {
run_zine.addArg(project.fmt("--output={s}", .{ip}));
}
}
return run_zine;
}
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{
// .preferred_optimize_mode = .ReleaseFast,
});
const version: Version = if (b.option(
bool,
"preview",
"Make a preview release of Zine",
) orelse false) .{
.tag = getVersion(b).commit,
} else getVersion(b);
const tsan = b.option(
bool,
"tsan",
"enable thread sanitizer",
) orelse false;
const enable_tracy = b.option(
bool,
"tracy",
"Enable Tracy profiling",
) orelse false;
const highlight = b.option(
bool,
"highlight",
"Include treesitter grammars for build-time syntax highlighting (enabled by default). Disabling reduces executable size significantly.",
) orelse true;
const tracy = b.dependency("tracy", .{ .enable = enable_tracy });
const scopes: []const []const u8 = b.option(
[]const []const u8,
"scope",
"logging scopes to enable",
) orelse &.{};
const mode = .{ .target = target, .optimize = optimize };
const options = blk: {
const options = b.addOptions();
const out = options.contents.writer();
try out.print(
\\// module = zine
\\const std = @import("std");
\\pub const tsan = {};
\\pub const enable_treesitter = {};
\\pub const version = "{s}";
\\pub const log_scope_levels: []const std.log.ScopeLevel = &.{{
\\
, .{ tsan, highlight, version.string() });
for (scopes) |l| try out.print(
\\.{{.scope = .{s}, .level = .debug}},
, std.zig.fmtId(l));
try out.writeAll("};");
break :blk options.createModule();
};
const scripty = b.dependency("scripty", .{
.target = target,
.optimize = optimize,
.tracy = enable_tracy,
}).module("scripty");
const superhtml = b.dependency("superhtml", .{
.target = target,
.optimize = optimize,
.tracy = enable_tracy,
}).module("superhtml");
const ziggy = b.dependency("ziggy", mode).module("ziggy");
const supermd = b.dependency("supermd", .{
.target = target,
.optimize = optimize,
.tracy = enable_tracy,
}).module("supermd");
supermd.addImport("scripty", scripty);
supermd.addImport("superhtml", superhtml);
supermd.addImport("ziggy", ziggy);
const zeit = b.dependency("zeit", mode).module("zeit");
const syntax = b.dependency("flow_syntax", .{
.target = target,
.optimize = optimize,
});
const ts = syntax.builder.dependency("tree_sitter", mode);
const treez = ts.module("treez");
const mime = b.dependency("mime", .{
.target = target,
.optimize = optimize,
});
// const wuffs = b.dependency("wuffs", mode);
const release = b.step("release", "Create release builds of Zine");
if (version == .tag) {
setupReleaseStep(b, release, version.string());
} else {
release.dependOn(
&b.addFail("error: git tag missing, cannot make release builds").step,
);
}
// const shtml_docgen = b.addExecutable(.{
// .name = "shtml_docgen",
// .root_source_file = b.path("src/exes/docgen.zig"),
// .target = target,
// .optimize = .Debug,
// });
// shtml_docgen.root_module.addImport("zine", zine);
// shtml_docgen.root_module.addImport("zeit", zeit);
// shtml_docgen.root_module.addImport("ziggy", ziggy);
// b.installArtifact(shtml_docgen);
if (b.option(
bool,
"fuzz",
"enable building tooling for fuzz testing",
) orelse false) {
setupFuzzing(b, target, optimize);
}
// setup the Zine standalone executable
const zine_exe = b.addExecutable(.{
.name = "zine",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.single_threaded = b.option(
bool,
"single-threaded",
"build Zine in single-threaded mode",
) orelse false,
.sanitize_thread = tsan,
});
if (target.result.os.tag == .macos) {
const frameworks = b.lazyDependency("frameworks", .{}) orelse return;
zine_exe.addIncludePath(frameworks.path("include"));
zine_exe.addFrameworkPath(frameworks.path("Frameworks"));
zine_exe.addLibraryPath(frameworks.path("lib"));
zine_exe.linkFramework("CoreServices");
}
// zine_exe.root_module.addImport("zine", zine);
zine_exe.root_module.addImport("ziggy", ziggy);
zine_exe.root_module.addImport("scripty", scripty);
zine_exe.root_module.addImport("supermd", supermd);
zine_exe.root_module.addImport("superhtml", superhtml);
zine_exe.root_module.addImport("zeit", zeit);
zine_exe.root_module.addImport("syntax", syntax.module("syntax"));
zine_exe.root_module.addImport("treez", treez);
zine_exe.root_module.addImport("options", options);
zine_exe.root_module.addImport("tracy", tracy.module("tracy"));
zine_exe.root_module.addImport("mime", mime.module("mime"));
const check = b.step("check", "check the standalone zine executable");
check.dependOn(&zine_exe.step);
b.installArtifact(zine_exe);
const run_step = b.step("run", "run the standalone zine executable");
const zine_run = b.addRunArtifact(zine_exe);
zine_run.setCwd(b.path("standalone-test"));
if (b.args) |args| zine_run.addArgs(args);
run_step.dependOn(&zine_run.step);
try setupSnapshotTesting(b, target, zine_exe);
}
fn setupSnapshotTesting(
b: *std.Build,
target: std.Build.ResolvedTarget,
zine_exe: *std.Build.Step.Compile,
) !void {
const test_step = b.step("test", "build snapshot tests and diff the results");
const camera = b.addExecutable(.{
.name = "camera",
.root_source_file = b.path("build/camera.zig"),
.target = target,
.optimize = .ReleaseFast,
});
const diff = b.addSystemCommand(&.{
"git",
"diff",
"--cached",
"--exit-code",
});
diff.addDirectoryArg(b.path("tests"));
diff.setName("git diff tests/");
test_step.dependOn(&diff.step);
// We need to stage all of tests/ in order for untracked files to show up in
// the diff. It's also not a bad automatism since it avoids the problem of
// forgetting to stage new snapshot files.
const git_add = b.addSystemCommand(&.{ "git", "add" });
git_add.addDirectoryArg(b.path("tests/"));
git_add.setName("git add tests/");
diff.step.dependOn(&git_add.step);
// content scanning
{
const tests_dir = try b.build_root.handle.openDir("tests/content-scanning", .{
.iterate = true,
});
var it = tests_dir.iterateAssumeFirstIteration();
while (try it.next()) |entry| {
if (entry.kind != .directory) continue;
if (entry.name[0] == '.') continue;
const path = b.pathJoin(&.{
"tests/content-scanning",
entry.name,
});
const run_camera = b.addRunArtifact(camera);
run_camera.addArtifactArg(zine_exe);
run_camera.addArg("debug");
run_camera.setCwd(b.path(path));
run_camera.has_side_effects = true;
const out = run_camera.captureStdErr();
const update_snap = b.addUpdateSourceFiles();
update_snap.addCopyFileToSource(out, b.pathJoin(&.{ path, "snapshot.txt" }));
update_snap.step.dependOn(&run_camera.step);
git_add.step.dependOn(&update_snap.step);
}
}
// rendering
{
const tests_dir = try b.build_root.handle.openDir("tests/rendering", .{
.iterate = true,
});
var it = tests_dir.iterateAssumeFirstIteration();
while (try it.next()) |entry| {
if (entry.kind != .directory) continue;
if (entry.name[0] == '.') continue;
const src_path = b.pathJoin(&.{
"tests/rendering",
entry.name,
});
const reset_snapshot = b.addRemoveDirTree(b.path(b.pathJoin(
&.{ src_path, "snapshot" },
)));
const run_zine = b.addRunArtifact(zine_exe);
run_zine.addArg("release");
run_zine.addArg("--install=snapshot");
run_zine.setCwd(b.path(src_path));
run_zine.has_side_effects = true;
run_zine.step.dependOn(&reset_snapshot.step);
const stderr_out = run_zine.captureStdErr();
const update_snap = b.addUpdateSourceFiles();
update_snap.addCopyFileToSource(stderr_out, b.pathJoin(
&.{ src_path, "snapshot.txt" },
));
update_snap.step.dependOn(&run_zine.step);
git_add.step.dependOn(&update_snap.step);
}
}
// drafts on
{
const tests_dir = try b.build_root.handle.openDir("tests/drafts", .{
.iterate = true,
});
var it = tests_dir.iterateAssumeFirstIteration();
while (try it.next()) |entry| {
if (entry.kind != .directory) continue;
if (entry.name[0] == '.') continue;
const src_path = b.pathJoin(&.{
"tests/drafts",
entry.name,
});
const reset_snapshot = b.addRemoveDirTree(b.path(b.pathJoin(
&.{ src_path, "snapshot" },
)));
const run_zine = b.addRunArtifact(zine_exe);
run_zine.addArg("release");
run_zine.addArg("--drafts");
run_zine.addArg("--install=snapshot");
run_zine.setCwd(b.path(src_path));
run_zine.has_side_effects = true;
run_zine.step.dependOn(&reset_snapshot.step);
const stderr_out = run_zine.captureStdErr();
const update_snap = b.addUpdateSourceFiles();
update_snap.addCopyFileToSource(stderr_out, b.pathJoin(
&.{ src_path, "snapshot.txt" },
));
update_snap.step.dependOn(&run_zine.step);
git_add.step.dependOn(&update_snap.step);
}
}
}
fn setupFuzzing(
b: *std.Build,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
) void {
const afl = b.lazyImport(@This(), "afl_kit") orelse return;
const scripty_afl_obj = b.addObject(.{
.name = "scripty",
.root_source_file = b.path("src/fuzz/scripty.zig"),
.target = b.resolveTargetQuery(.{}),
.optimize = .Debug,
});
scripty_afl_obj.root_module.stack_check = false;
scripty_afl_obj.root_module.link_libc = true;
const afl_exe = afl.addInstrumentedExe(b, target, optimize, scripty_afl_obj);
b.getInstallStep().dependOn(&b.addInstallFile(afl_exe, "scripty-afl").step);
}
fn setupReleaseStep(
b: *std.Build,
release_step: *std.Build.Step,
version: []const u8,
) void {
const targets: []const std.Target.Query = &.{
.{ .cpu_arch = .aarch64, .os_tag = .macos },
.{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .musl },
.{ .cpu_arch = .x86_64, .os_tag = .macos },
.{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .musl },
.{ .cpu_arch = .x86_64, .os_tag = .windows },
.{ .cpu_arch = .aarch64, .os_tag = .windows },
};
std.fs.cwd().makePath(b.pathJoin(&.{
b.install_prefix,
"releases",
})) catch unreachable;
for (targets) |t| {
const target = b.resolveTargetQuery(t);
const optimize = .ReleaseFast;
const tracy = b.dependency("tracy", .{ .enable = false });
const scripty = b.dependency("scripty", .{
.target = target,
.optimize = optimize,
.tracy = false,
}).module("scripty");
const superhtml = b.dependency("superhtml", .{
.target = target,
.optimize = optimize,
.tracy = false,
}).module("superhtml");
const ziggy = b.dependency("ziggy", .{
.target = target,
.optimize = optimize,
}).module("ziggy");
const supermd = b.dependency("supermd", .{
.target = target,
.optimize = optimize,
.tracy = false,
}).module("supermd");
supermd.addImport("scripty", scripty);
supermd.addImport("superhtml", superhtml);
supermd.addImport("ziggy", ziggy);
const zeit = b.dependency("zeit", .{
.target = target,
.optimize = optimize,
}).module("zeit");
const syntax = b.dependency("flow_syntax", .{
.target = target,
.optimize = optimize,
});
const ts = syntax.builder.dependency("tree_sitter", .{
.target = target,
.optimize = optimize,
});
const treez = ts.module("treez");
const mime = b.dependency("mime", .{
.target = target,
.optimize = optimize,
});
const options = blk: {
const options = b.addOptions();
const out = options.contents.writer();
out.print(
\\// module = zine
\\const std = @import("std");
\\pub const tsan = false;
\\pub const enable_treesitter = true;
\\pub const version = "{s}";
\\pub const log_scope_levels: []const std.log.ScopeLevel = &.{{}};
\\
, .{version}) catch unreachable;
break :blk options.createModule();
};
const zine_exe_release = b.addExecutable(.{
.name = "zine",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = .ReleaseFast,
});
zine_exe_release.root_module.addImport("options", options);
zine_exe_release.root_module.addImport("ziggy", ziggy);
zine_exe_release.root_module.addImport("scripty", scripty);
zine_exe_release.root_module.addImport("supermd", supermd);
zine_exe_release.root_module.addImport("superhtml", superhtml);
zine_exe_release.root_module.addImport("zeit", zeit);
zine_exe_release.root_module.addImport("syntax", syntax.module("syntax"));
zine_exe_release.root_module.addImport("treez", treez);
zine_exe_release.root_module.addImport("tracy", tracy.module("tracy"));
zine_exe_release.root_module.addImport("mime", mime.module("mime"));
if (target.result.os.tag == .macos) {
const frameworks = b.lazyDependency("frameworks", .{
.target = target,
.optimize = optimize,
}) orelse return;
zine_exe_release.addIncludePath(frameworks.path("include"));
zine_exe_release.addFrameworkPath(frameworks.path("Frameworks"));
zine_exe_release.addLibraryPath(frameworks.path("lib"));
zine_exe_release.linkFramework("CoreServices");
}
switch (t.os_tag.?) {
.macos, .windows => {
const archive_name = b.fmt("{s}.zip", .{
t.zigTriple(b.allocator) catch unreachable,
});
const zip = b.addSystemCommand(&.{
"zip",
"-9",
// "-dd",
"-q",
"-j",
});
const archive = zip.addOutputFileArg(archive_name);
zip.addDirectoryArg(zine_exe_release.getEmittedBin());
_ = zip.captureStdOut();
release_step.dependOn(&b.addInstallFileWithDir(
archive,
.{ .custom = "releases" },
archive_name,
).step);
},
else => {
const archive_name = b.fmt("{s}.tar.xz", .{
t.zigTriple(b.allocator) catch unreachable,
});
const tar = b.addSystemCommand(&.{
"tar",
"-cJf",
});
const archive = tar.addOutputFileArg(archive_name);
tar.addArg("-C");
tar.addDirectoryArg(zine_exe_release.getEmittedBinDirectory());
tar.addArg("zine");
_ = tar.captureStdOut();
release_step.dependOn(&b.addInstallFileWithDir(
archive,
.{ .custom = "releases" },
archive_name,
).step);
},
}
}
}
const Version = union(Kind) {
tag: []const u8,
commit: []const u8,
// not in a git repo
unknown,
pub const Kind = enum { tag, commit, unknown };
pub fn string(v: Version) []const u8 {
return switch (v) {
.tag, .commit => |tc| tc,
.unknown => "unknown",
};
}
};
fn getVersion(b: *std.Build) Version {
const git_path = b.findProgram(&.{"git"}, &.{}) catch return .unknown;
var out: u8 = undefined;
const git_describe = std.mem.trim(
u8,
b.runAllowFail(&[_][]const u8{
git_path, "-C",
b.build_root.path.?, "describe",
"--match", "*.*.*",
"--tags",
}, &out, .Ignore) catch return .unknown,
" \n\r",
);
return .{ .commit = git_describe };
// switch (std.mem.count(u8, git_describe, "-")) {
// 0, 1 => return .{ .tag = git_describe },
// 2 => {
// // Untagged development build (e.g. 0.8.0-684-gbbe2cca1a).
// var it = std.mem.splitScalar(u8, git_describe, '-');
// const tagged_ancestor = it.next() orelse unreachable;
// const commit_height = it.next() orelse unreachable;
// const commit_id = it.next() orelse unreachable;
// // Check that the commit hash is prefixed with a 'g'
// // (it's a Git convention)
// if (commit_id.len < 1 or commit_id[0] != 'g') {
// std.debug.panic("Unexpected `git describe` output: {s}\n", .{git_describe});
// }
// // The version is reformatted in accordance with
// // the https://semver.org specification.
// return .{
// .commit = b.fmt("{s}-dev.{s}+{s}", .{
// tagged_ancestor,
// commit_height,
// commit_id[1..],
// }),
// };
// },
// 3 => {
// // Untagged development build (e.g. 0.8.0-684-gbbe2cca1a).
// var it = std.mem.splitScalar(u8, git_describe, '-');
// const tagged_ancestor = it.next() orelse unreachable;
// const commit_height = it.next() orelse unreachable;
// const commit_id = it.next() orelse unreachable;
// // Check that the commit hash is prefixed with a 'g'
// // (it's a Git convention)
// if (commit_id.len < 1 or commit_id[0] != 'g') {
// std.debug.panic("Unexpected `git describe` output: {s}\n", .{git_describe});
// }
// // The version is reformatted in accordance with
// // the https://semver.org specification.
// return .{
// .commit = b.fmt("{s}-dev.{s}+{s}", .{
// tagged_ancestor,
// commit_height,
// commit_id[1..],
// }),
// };
// },
// }
}