Skip to documentation
SLOP

tiny.smg.command.watch

Reference tiny.smg command watch

Defined in command.

API (1)

Actions

Public operations.

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

Source

No direct callersNo direct callscommand.watchrun
Static calls · unresolved targets: 0 · external targets: 7.

Source: tools/smg/src/command/root.zig:25

zig
pub const watch = @import("watch.zig");

Source: tools/smg/src/command/watch.zig

zig
const std = @import("std");const smg = @import("../root.zig");const watch = smg.watch;const cli_options = smg.cli.options;const cli_validation = smg.cli.validation;const storage = smg.storage;pub fn run(allocator: std.mem.Allocator, phases: std.mem.Allocator, args: []const []const u8, limits: smg.Limits) !u8 {    const signature = "[OPTIONS] [PATHS]...";    if (try cli_validation.rejectMissingOptionValues(allocator, args, &.{"--debounce"})) return 2;    if (try cli_validation.rejectUnexpectedOptionsPlain(allocator, "watch", signature, args, &.{"--debounce"})) return 2;    if (try cli_validation.rejectInvalidFloatOption(allocator, "watch", signature, args, "--debounce")) return 2;    const paths = try cli_options.positional(allocator, args);    if (try cli_validation.rejectMissingPaths(allocator, "watch", signature, paths)) return 2;    const root = try storage.requireRoot(allocator);    const debounce = if (cli_options.flagValue(args, "--debounce")) |raw| std.fmt.parseFloat(f64, raw) catch unreachable else 0.5;    try watch.run(        allocator,        phases,        root,        paths,        debounce,        limits,        storage.graph.publish,    );    return 0;}

Audit

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433