Expand description
Stable identifiers for every error and warning that aube emits.
The crate is dependency-free on purpose: every other aube crate may
depend on it. Codes are exposed as pub const &str so they can be
used unmodified in tracing::warn!(code = aube_codes::warnings::X, ...),
#[diagnostic(code = aube_codes::errors::Y)], and ndjson-emitting
reporters without needing to call .as_str() or do any conversion.
Naming convention:
ERR_AUBE_*for errors (anything that returnsErrto the caller or aborts with a non-zero exit).WARN_AUBE_*for warnings (tracing::warn!) and non-fataltracing::error!sites that don’t change exit status.
aube does not emit ERR_PNPM_* codes itself. Where a code maps
cleanly onto a pnpm concept (lockfile, peer-deps, tarball, etc.) we
reuse pnpm’s suffix under the ERR_AUBE_ prefix so the code reads
the same to anyone familiar with pnpm — but the published code is
always ERR_AUBE_*.
Codes are stable: once published, a code’s identifier and meaning must not change. Adding new codes is fine; removing or repurposing one is a breaking change.
Modules§
- errors
- Error codes (
ERR_AUBE_*). - exit
- Bespoke Unix exit codes per error code.
- warnings
- Warning codes (
WARN_AUBE_*).
Structs§
- Code
Meta - Metadata for a single error or warning code.