From b22fa2638bca470bbd8c5ea4768eb0eaaa3e8195 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 19:14:11 -0300 Subject: Build: a word that prints this build into a +Build pane (SPC h b): the version line, the commit, the jj change and the build time (stamped as the commit is: release builds and the ~/.local install, else "not stamped"), the zig that built it, its mode, target, platform and grammars, whether the addons are compiled in, the wire's semantics hash and the dependencies; build.zig stamps the change (jj log -r git_head()) and the time (date -u) through one command helper beside gitCommit; a T1 case reads the pane Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/builtins.zig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 4712a67a..15319d6e 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -108,7 +108,6 @@ fn isEnabled(comptime T: type) bool { return !@hasDecl(T, "enabled") or T.enabled; } - /// Why `word`, a builtin some build has, is none in this one: `GUI-only` /// for the GUI's own (`gui_only`), else `not in this build`; null for a /// word that is one here, or in no build. @@ -1618,6 +1617,18 @@ pub const Messages = struct { } }; +/// This build: its version, commit, jj change and build time (a stamped +/// build's: a release or the ~/.local install), the zig that built it, its +/// optimize mode, target, platform, grammars, whether the addons are compiled +/// in, and its dependencies, printed into an output buffer. +pub const Build = struct { + pub const scope: Scope = .session; + pub const output: OutputTraits = .{ .name = config.build_buffer }; + pub fn run(c: Ctx) void { + panes.Output.openBuild(c.p, c.id) catch |err| c.p.reportError(c.id, "build", err); + } +}; + /// This build's version and what changed to reach it, printed into an output /// buffer the same way Config prints the live settings. pub const Changelog = struct { -- cgit v1.3