Skip to documentation
SLOP

tiny.smg.cli

Reference tiny.smg cli

Defined in tiny.smg.

API (12)

Actions

Public operations.

Namespaces

Public namespaces.

No direct callersNo direct callstiny.smgcli
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: tools/smg/src/cli/run.zig:7

zig
pub fn run(    allocator: std.mem.Allocator,    phases: std.mem.Allocator,    args: []const []const u8,    command_name: []const u8,    build: cli_dispatch.Build,    limits: smg.Limits,    boundary: alloc.PhaseBoundary,) !u8 {    _ = try limits.derive();    return cli_dispatch.run(        allocator,        phases,        args,        command_name,        build,        limits,        boundary,    ) catch |err| {        if (err == error.NoProject) {            cli_output.writeErrFmt(allocator, "Error: no .smg/ found. Run {s} init first.\n", .{command_name}) catch {};            return 3;        }        if (err == error.UnsupportedCatalogFormat) {            cli_output.writeErrFmt(allocator, "Error: .smg/ has an incompatible store format. The graph is scan-derived: delete .smg/, then run {s} init and {s} scan.\n", .{ command_name, command_name }) catch {};            return 3;        }        if (err == error.StaleSourceHead) {            cli_output.writeStaleSourceHead() catch {};            return 3;        }        if (err == error.GraphRefreshIncomplete) {            cli_output.writeErrFmt(allocator, "Error: graph refresh is incomplete. Move .smg/ aside, then run {s} init and {s} scan . to rebuild it.\n", .{ command_name, command_name }) catch {};            return 3;        }        if (err == error.GraphStoreMigrationRequired) {            cli_output.writeErrFmt(allocator, "Error: .smg/ requires a schema upgrade. Move .smg/ aside, then run {s} init and {s} scan . to rebuild it.\n", .{ command_name, command_name }) catch {};            return 3;        }        if (err == error.GraphStoreRepairRequired) {            cli_output.writeErrFmt(allocator, "Error: .smg/ has no safe readable snapshot. Move .smg/ aside, then run {s} init and {s} scan . to rebuild it.\n", .{ command_name, command_name }) catch {};            return 3;        }        if (err == error.SearchCacheRepairRequired) {            cli_output.writeErrFmt(allocator, "Error: search cache is missing, stale, or invalid. Run {s} index in a writable checkout.\n", .{command_name}) catch {};            return 3;        }        if (cli_dispatch.diagnosedErrorExitCode(err)) |code| return code;        cli_output.writeProcessError(err);        return 1;    };}

Source: tools/smg/src/cli/root.zig

zig
pub const dispatch = @import("dispatch.zig");pub const facts = @import("facts.zig");pub const graph = @import("graph.zig");pub const json = @import("json.zig");pub const metadata = @import("metadata.zig");pub const output = @import("output.zig");pub const options = @import("options.zig");pub const resolve = @import("resolve.zig");pub const subgraph = @import("subgraph.zig");pub const table = @import("table/root.zig");pub const validation = @import("validation/root.zig");pub const run = @import("run.zig").run;

Source: tools/smg/src/root.zig:16

zig
pub const cli = @import("cli/root.zig");

Audit

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433