Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Template-expansion errors behind single constructors with stable keys.

This module owns every expansion template and key (proc.expand.*). It builds on the generic oxdock_diagnostics::Diagnostic transport but owns its wording: changing expansion text happens here, never at the call sites. Call sites pass structured data only, never format! strings. Suggestion hints render inline in the message (never via with_hint, avoiding double-print in Display); the did you mean shape lives here, call sites pass only the scope.

Enums§

OverrideSuggest
Suggestion scope for a missing step-override miss: the name also lives in the script variables or the environment.
ScriptSuggest
Suggestion scope for an undefined $var miss: the name also lives in the step environment or the override table.

Functions§

call_arg_empty_var
Empty $ variable reference in a call argument. Parameterless: the wording is fixed.
call_arg_invalid
Unresolvable placeholder call argument. Takes the raw source; quoting lives here.
call_arg_nested_calls
Nested calls inside placeholder arguments. Parameterless: the wording is fixed.
call_arg_too_deep
Placeholder call argument nesting past the literal depth cap. Takes the cap; rendering lives here.
call_without_registry
Placeholder call with no registered resolver. Takes the module and function names; quoting lives here.
invalid_placeholder_format
Placeholder in no resolvable shape. Takes the raw key; quoting lives here.
job_assign_failed
Windows job-object assignment failed. Takes the underlying failure; the flattened chain lives here so the call site stays format!-free. Third-party-feeling OS errors ride the lift below and never attach a source.
job_assign_io_failed
Windows job-object assignment failed at the OS call. Takes the operation name (CreateJobObjectW, AssignProcessToJobObject) and the underlying I/O failure; the io text rides verbatim in both message and reason field. Native ? propagation plus with_contexts keeps the chain flattened byte-identical to the retired shape. Sourceless: the chain text is the message.
key_path_bad_index
Non-numeric list index during key-path traversal. Takes the root variable and the segment; quoting lives here.
key_path_index_out_of_bounds
Out-of-bounds list index during key-path traversal. Takes the root variable, the index, and the list length; rendering lives here.
key_path_missing_property
Missing property on a map during key-path traversal. Takes the root variable and the segment; quoting lives here.
key_path_on_primitive
Property access on a primitive during key-path traversal. Takes the root variable and the segment; quoting lives here.
map_duplicate_key
Duplicate key in a map literal. Takes the key; quoting lives here.
map_entry_invalid
Map literal entry without exactly one top-level :. Takes the raw entry; quoting lives here.
missing_step_override
Missing step-override argument. Takes the name plus an optional suggestion scope; hinted and bare share one key and one mode.
render_permit
PERMIT value interpolated as text. Parameterless: the wording lives here.
render_pipe
PIPE value interpolated as text. Parameterless: the wording and the LET capture guidance live here.
render_semaphore
SEMAPHORE value interpolated as text. Parameterless: the wording lives here.
run_argv_unimplemented
Default run_argv with no override. Takes the argv; Debug rendering lives here.
run_bg_capture_unsupported
Stdout capture for a background command. Parameterless: the wording is fixed.
run_bg_capture_unsupported_miri
Stdout capture for a background command under Miri isolation. Parameterless: the wording is fixed.
run_bg_stderr_stream_unsupported_miri
Stderr streaming for a background command under Miri isolation. Parameterless: the wording is fixed.
run_bg_stdout_stream_unsupported_miri
Stdout streaming for a background command under Miri isolation. Parameterless: the wording is fixed.
run_capture_lock_poisoned
Capture buffer losing the lock race. Parameterless: the wording is fixed.
run_command_failed
Spawned command exiting non-zero. Takes the command (any Debug: std::process::Command, argv slice, or script text) and the wait status; both renderings live here.
run_current_exe_failed
Current-executable lookup failed. Takes the I/O failure; rendering lives here. The typed I/O error rides as the chained source so Error::source and {err:#} chains keep it.
run_exec_requires_argv
Empty RUN exec argv. Parameterless: the wording is fixed.
run_exec_requires_program
RUN exec form with an empty program. Parameterless: the wording is fixed.
run_failed
Spawning or waiting on a shell command failed. Takes the command (any Debug: std::process::Command) and the I/O failure; rendering lives here. Shared by the status-wait and piped-output paths: one key, one mode. The typed I/O error rides as the chained source.
run_interactive_unsupported
Interactive shell on a platform without one. Parameterless: the wording is fixed.
run_interpreter_unsupported_miri
INTERPRETER lookup under Miri isolation. Parameterless: the wording is fixed.
run_spawn_unsupported_miri
Native spawn under the Miri synthetic backend. Parameterless: the wording is fixed.
run_stdin_lock_failed
Mock stdin snapshot losing the lock race. Parameterless: the wording is fixed.
run_stdin_read_failed
Mock stdin snapshot read failed. Takes the I/O failure; rendering lives here. The typed I/O error rides as the chained source so Error::source and {err:#} chains keep it. Distinct key from run_stdin_lock_failed: that names a poisoned stream lock, while this names a failed read on the live stream.
run_unguarded_writes_unsupported_miri
Unguarded write under Miri isolation. Parameterless: the wording is fixed.
run_wait_failed
Waiting on a managed shell child failed. Takes the command (any Debug: std::process::Command) plus the wrapped wait failure; the chain renders inline. Distinct key from run_failed: that wraps a direct std::io::Error from std spawn/wait calls, while this wraps the managed-handle wait chain (already keyed wait_failed inside); the retired wordings match byte-identically through {reason:#}.
shell_exited_with_status
Shell exiting non-zero. Takes the wait status; rendering lives here.
spawn_failed
Spawning a shell command failed. Takes the command (any Debug: std::process::Command) and the I/O failure; rendering lives here. The typed I/O error rides as the chained source.
spawn_interactive_window_failed
Interactive shell window launch failed. Takes the underlying failure; the flattened chain lives here so the call site stays format!-free. The chained spawn diagnostic rides inline; no source is attached.
spawn_pipe_half_missing
Spawned piped child missing a stdio half. Takes the command (any Debug: std::process::Command) and the stream name (stdin, stdout, or stderr); rendering lives here. Shared by the piped and piped-with-stderr paths: one key, one mode.
spawn_requires_path
Spawn without PATH in the script environment. Takes the program; the PATH spelling and the INHERIT_ENV fix derive from the declared env contract, never literals.
spawn_requires_system_root
Windows spawn without SystemRoot in the script environment. The name spelling and the INHERIT_ENV fix derive from the declared env contract, never literals.
undefined_env_var
Undefined env:KEY. Takes the key plus whether a same-named script variable exists; the hint shape lives here.
undefined_script_var
Undefined $var. Takes the name plus an optional suggestion scope; hinted and bare share one key and one mode.
wait_failed
Waiting on a spawned child failed. Takes the I/O failure; rendering lives here. Shared by the try_wait poll and the blocking wait: one key, one mode. The typed I/O error rides as the chained source.