pub struct CiDecomposeFailure {
pub nome: String,
pub source: DecomposeError,
}Expand description
Typed :ci-decompose-failure view: the canonical surface every
per-Acao consumer raises when canteiro_types::decompose refuses
the caixa’s declared :ci run (a duplicate node name, a dependency
on an undeclared node, a dependency cycle — every failure mode the
sibling canteiro_types::DecomposeError enumerates). Carries the
offending caixa’s :nome alongside the borrowed
canteiro_types::DecomposeError source so the diagnostic reads
caixa "<nome>": :ci decompose failed: <source> — naming which
caixa.lisp needs author attention, not just the axis the consumer
rejected.
Lifted from caixa-actions’ inline Error::Decompose { nome: String, #[source] source: DecomposeError } variant so a future per-Acao
consumer (the deferred sui-supercacheci::canteiro::emit_gha
workflow renderer named in the caixa-actions crate docs, the
future per-Acao CR materializer that mirrors the sibling
per-Servico / per-Aplicacao materializers the M4 roadmap
acknowledges) reaches for the same typed view via #[from] instead
of re-inlining the same nome: String, #[source] source: DecomposeError construction on its own call site — the second
typed named-caixa diagnostic axis on the per-Acao consumer surface
after the peer MissingCiSlot presence-gate axis.
Peer of MissingCiSlot on the per-Acao :ci-slot diagnostic
axis (the presence gate reaches for MissingCiSlot via
require_ci; the decompose gate reaches for CiDecomposeFailure
on the borrowed canteiro_types::CiRun the presence gate returns).
Peer of KindMismatch / ServicoCountMismatch on the sibling
per-renderer entry-gate diagnostic axes — extends the same “one
typed view per axis, carrying the offending caixa’s :nome +
axis-specific detail, wrapped by every consumer via #[from]”
discipline onto the canteiro_types::decompose axis on the
per-Acao consumer surface.
The source field carries the borrowed
canteiro_types::DecomposeError verbatim (rather than collapsing
to a single opaque axis) so a future consumer that wants to fan on
the specific decompose-failure arm — a feira lint sub-diagnostic
that offers a :deps-repair suggestion on the MissingDependency
arm but not the Cycle arm, a future per-Acao CR materializer’s
admission webhook that surfaces the cycle path on rejection —
reaches for err.source directly rather than re-parsing the Display
bytes.
Fields§
§nome: StringThe offending caixa’s :nome — names which caixa.lisp the
consumer was handed, so the diagnostic doesn’t require the user
to grep for it. Constructed via the lifted crate::Caixa::nome
accessor’s .to_string() extension, matching the peer
MissingCiSlot::nome / KindMismatch::nome /
ServicoCountMismatch::nome nome-carrying axes.
source: DecomposeErrorThe canteiro_types::decompose error the caixa’s :ci run
tripped on — carried verbatim so a consumer that fans on the
specific arm (Cycle / MissingDependency / DuplicateNode /
…) reaches for the typed source rather than re-parsing the
Display bytes.
Trait Implementations§
Source§impl Debug for CiDecomposeFailure
impl Debug for CiDecomposeFailure
Source§impl Display for CiDecomposeFailure
impl Display for CiDecomposeFailure
Source§impl Error for CiDecomposeFailure
impl Error for CiDecomposeFailure
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()