pub struct Dep {
pub nome: String,
pub versao: String,
pub fonte: Option<DepSource>,
pub opcional: bool,
pub caracteristicas: Vec<String>,
}Expand description
A single dependency declaration in a caixa.lisp manifest.
Store model = Git, like Zig. There is no central registry; a caixa is
just a Git repo with a caixa.lisp at its root. When :fonte is omitted,
the resolver falls back to github:<default-org>/<nome> (org defaults to
pleme-io, override via ~/.config/caixa/config.yaml).
;; Shorthand — resolves to github:pleme-io/caixa-teia (or your default org):
(:nome "caixa-teia" :versao "^0.1")
;; Explicit git source:
(:nome "caixa-teia"
:versao "^0.1"
:fonte (:tipo git :repo "github:pleme-io/caixa-teia" :tag "v0.1.0"))
;; Arbitrary git URL (not limited to GitHub):
(:nome "private-caixa"
:versao "*"
:fonte (:tipo git :repo "ssh://git@git.example/team/priv-caixa.git" :branch "main"))
;; Local path (dev only; not publishable):
(:nome "caixa-teia"
:versao "0.1.0"
:fonte (:tipo path :caminho "../caixa-teia"))Fields§
§nome: StringCaixa name — must match the target caixa’s :nome.
versao: StringSemver constraint string ("^0.1", "~0.1.2", "0.1.0", "*").
fonte: Option<DepSource>Where to fetch the caixa from. Defaults to the feira registry.
opcional: boolIf true, a missing :fonte is not a build failure.
caracteristicas: Vec<String>Feature flags to enable on the target caixa.
Implementations§
Source§impl Dep
impl Dep
Sourcepub fn nome(&self) -> &str
pub fn nome(&self) -> &str
Substrate-canonical per-:deps / :deps-dev entry :nome scalar
accessor every consumer of the dep-graph identity axis keys off —
returns the author-declared :nome byte-string verbatim as a
&str, borrowed from the typed slot’s own String storage.
The :deps :nome / :deps-dev :nome slot carries the DNS-1123
label that names the target caixa (validated by Self::validate
through the shared crate::render::is_dns_1123_label predicate,
same accept-set the peer caixa-identifier axes carry — top-level
crate::Caixa::nome, per-:membros crate::Membro::nome,
per-:children crate::supervisor::ChildSpec::nome). Every
downstream consumer that fans on the dep’s name-identity keys off
this scalar: the crate::Caixa::validate_deps per-list
crate::render::insert_first_seen dedup key + the paired
DepError::DuplicateNome carrier the walk raises on collision,
the cross-list validate_no_self_dep parent-name equality gate
on both :deps and :deps-dev traversals, the caixa-resolver
pipeline’s HashSet<String> seen-set the closure walker gates
requeueing off (caixa-resolver/src/resolve.rs:55), the resolver’s
per-transitive-target requeue path (resolve.rs:63,66), the
crate::DepSource::default_github-shaped resolver-side shorthand
fill-in that folds :nome into the fetched-git-URL (resolve.rs:147),
every caixa-resolver ResolveError::MissingPath /
ResolveError::MissingPin carrier that names the offending dep
(resolve.rs:177,206), each resolved
caixa-lacre::LacreEntry nome: field the closure hash keys off
(resolve.rs:108,113), and the peer feira lock stub-resolver’s
LacreEntry emitter (caixa-feira/src/cmd/lock.rs:59,61,64).
Prior to this lift the .nome byte-string was read inline at every
production site — the crate::Caixa::validate_deps paired
dep.nome.as_str() / dep.nome.clone() accesses on both :deps
and :deps-dev traversals, the validate_no_self_dep pair of
parent-equality checks, and every caixa-resolver / caixa-feira
site enumerated above — open-coded field-accesses that expressed
no compile-time link back to the typed slot. A future extension of
the :deps :nome axis to a richer author surface (a per-scope
alias table the resolver folds through the ~/.config/caixa/config.yaml
entry the crate::dep::Dep docstring already acknowledges, a
namespace-qualified rewrite the future M4 lacre-federation layer
applies per-cluster, a promotion of the plain String byte-string
to a richer scoped-identifier newtype once cross-registry federation
lands) would have had to be threaded through every open-coded copy
in lockstep or two consumers would silently disagree on which caixa
a given dep resolves to — the crate::Caixa::validate_deps dedup
set treating the name as "caixa-teia" while the caixa-resolver
closure walker treated it as "tenant-a/caixa-teia" would silently
split the DepError::DuplicateNome refusal from the resolver’s
requeue-suppression seen-set, one build-time diagnostic
disagreeing with the run-time closure the substrate’s lacre
pipeline actually materializes. Lifting the resolution rule to a
typed method on the substrate primitive means every downstream
consumer of the caixa’s per-:deps identity surface reaches for
exactly one typed dispatch — the resolver’s accept-set migrates as
a unit on any future axis addition.
First accessor on the outer Dep type — opens the outer-Dep
&str-return required-scalar projection pattern the sibling
per-Dep :versao future lift folds on. Peer of the sibling
per-:membros crate::Membro::nome (4a32abf) /
per-:children crate::supervisor::ChildSpec::nome (dfb4a81)
/ top-level crate::Caixa::nome (e6b7d97) caixa-identity scalar
accessors — same “one typed dispatch on the substrate primitive,
thin projections at each consumer” discipline extended onto the
third named-caixa-referencing axis (:deps / :deps-dev), the
remaining unlifted caixa-name-referencing accessor family in the
substrate. Named nome() to match the tatara-lisp author-surface
term the field’s docstring already reaches for (“Caixa name — must
match the target caixa’s :nome”) and the peer caixa-identity
accessor family the substrate already carries.
Sourcepub fn versao_requirement(&self) -> &str
pub fn versao_requirement(&self) -> &str
Substrate-canonical per-:deps / :deps-dev entry :versao
Cargo-shaped semver-requirement scalar accessor every consumer of
the dep-graph version-pin axis keys off — returns the author-
declared :versao requirement byte-string verbatim as a &str,
borrowed from the typed slot’s own String storage.
The :deps :versao / :deps-dev :versao slot carries the
Cargo-shaped semver requirement string ("^0.1", "~0.1.2",
"0.1.0", "*") the shared crate::version::parse_requirement
entry-point consumes — same accept-set the peer requirement-
carrying axes carry (per-:membros
crate::Membro::versao_requirement, per-:children
crate::supervisor::ChildSpec::versao_requirement), validated
through the shared
crate::render::require_valid_versao_requirement cascade in
Self::validate. Every downstream consumer that fans on the
dep’s version-pin keys off this scalar: the Self::validate
require_valid_versao_requirement gate + the paired
DepError::VersaoInvalid carrier the cascade raises on
requirement-shape rejection, the feira lock stub-resolver’s
format!("{}@{}", dep.nome(), dep.versao_requirement())
conteudo hash-input interpolation and the paired
LacreEntry.versao: String-carry fill (caixa-feira/src/cmd/lock.rs),
and the peer feira lock end-to-end fixture in caixa-feira/tests/feira_e2e.rs.
Prior to this lift the .versao byte-string was read inline at
every production site — the Self::validate paired
&self.versao requirement-gate reference and self.versao.clone()
error-body carrier, the caixa-feira/src/cmd/lock.rs paired
format!("{}@{}", dep.nome(), dep.versao) conteudo interpolation
and versao: dep.versao.clone() LacreEntry fill, and the
caixa-feira/tests/feira_e2e.rs end-to-end fixture’s pair of the
same shapes — open-coded field-accesses that expressed no
compile-time link back to the typed slot. A future extension of
the :deps :versao axis to a richer author surface (a per-scope
version-lock overlay the resolver folds through the
~/.config/caixa/config.yaml entry the crate::dep::Dep
docstring already acknowledges, a per-cluster canary-version
overlay per MESH-COMPOSITION §III.2, a promotion of the plain
String requirement to a richer parsed-VersionReq newtype
once cross-registry federation lands) would have had to be
threaded through every open-coded copy in lockstep or two
consumers would silently disagree on which release constraint a
given dep resolves to — the Self::validate requirement-gate
call reading "^0.1" while the feira lock stub-resolver’s
conteudo hash-input read "tenant-a-pin/^0.1" would silently
split the DepError::VersaoInvalid refusal from the lacre’s
content-addressed hash the substrate’s fetch pipeline actually
materializes, one build-time diagnostic disagreeing with the
run-time closure. Lifting the resolution rule to a typed method
on the substrate primitive means every downstream consumer of
the caixa’s per-:deps version-pin surface reaches for exactly
one typed dispatch — the resolver’s accept-set migrates as a
unit on any future axis addition.
Second accessor on the outer Dep type — folds on the outer-
Dep &str-return required-scalar projection pattern the
sibling per-Dep Self::nome (eba2cde) accessor opened. Peer
of the per-:membros crate::Membro::versao_requirement
(a40b0e3) / per-:children
crate::supervisor::ChildSpec::versao_requirement (7844f4e
family) member/child version-pin accessors — the three
requirement-carrying axes (Dep::versao_requirement on the
per-caixa dep-graph edge, Membro::versao_requirement on the M3
Aplicacao side, ChildSpec::versao_requirement on the M2
Supervisor side) now share one accessor discipline for the
shared substrate concept “another caixa referenced by a
Cargo-shaped semver requirement”. The pair
(nome(), versao_requirement()) jointly projects the
(nome, versao) field pair every dep-graph consumer that fans
on per-dep identity + version pin keys off. Named
versao_requirement() rather than versao() because the field’s
storage-side .versao label is already the author-surface term
(:versao); the accessor’s name carries the semantic role — the
semver requirement string the shared
crate::version::parse_requirement entry-point consumes — so a
raw field access and a typed dispatch read differently at every
consumer site. Matches the peer
crate::Membro::versao_requirement /
crate::supervisor::ChildSpec::versao_requirement naming
discipline verbatim.
Sourcepub fn fonte(&self) -> Option<&DepSource>
pub fn fonte(&self) -> Option<&DepSource>
Substrate-canonical per-:deps / :deps-dev entry :fonte
Zig-store-model per-dep source-tuple optional-composite-reference
accessor every consumer of the dep-graph fetch-source axis keys
off — returns the author-declared :fonte typed DepSource
verbatim as an Option<&DepSource> borrowed from the typed slot’s
own Option<DepSource> storage, with None naming the “author
omitted :fonte” shorthand every resolver-side default-fill
(caixa-feira/src/cmd/lock.rs’s stub, caixa-resolver/src/resolve.rs’s
canonical fetcher, per the DepSource::default_github fallback
the Dep::fonte field docstring already documents) treats as
the “resolve through the configured default host / org
(github:<default-org>/<nome>)” partition.
The :deps :fonte / :deps-dev :fonte slot carries the two-
arm typed DepSource the Zig-style git-only store model the
enclosing Dep docstring names — DepSource::Git { repo, tag, rev, branch } for the git-clone arm every published caixa
resolves through, DepSource::Path { caminho } for the dev-only
local-filesystem arm every unpublishable in-tree checkout
resolves through. Every downstream consumer that fans on the
dep’s fetch-source keys off this accessor: Self::validate’s
per-:fonte DepSource::validate delegation (which raises
the empty-:repo / missing-pin / multiple-pin / empty-:caminho
diagnostics through the [DepError::Fonte*] carrier family
naming the offending Dep::nome), the caixa-crd conversion
crate’s dep_into_ref two-arm projection into the CaixaSource
{repo, git_ref} pair the K8s-CR side consumes
(caixa-crd/src/conversion.rs), and — through the paired
resolver-side default-fill’s Option::unwrap_or_else — every
caixa-feira / caixa-resolver fetch site that requires a
concrete DepSource at run time.
Prior to this lift the .fonte typed slot was read inline at
every production site — the Self::validate
if let Some(ref fonte) = self.fonte bracket the per-:fonte
gate delegates through, the caixa-crd dep_into_ref
d.fonte.as_ref().and_then(...) two-arm CaixaSource projector,
the resolver-side caixa-feira/src/cmd/lock.rs / caixa-resolver/src/resolve.rs
dep.fonte.clone().unwrap_or_else(...) default-fill pair — open-
coded field-accesses that expressed no compile-time link back to
the typed slot. A future extension of the :deps :fonte axis
to a richer author surface (a per-scope source-override table
the resolver folds through the ~/.config/caixa/config.yaml
entry the Dep docstring already acknowledges, a per-org
mirror-fallback list the future M4 lacre-federation resolver
consults ahead of the default_github fallback, a promotion of
the plain Option<DepSource> to a richer
{primary, mirrors, integrity} triple once cross-registry
federation lands, a per-dep sri:sha256-… integrity slot the
M4 lacre gate binds against ahead of the git-fetch) would have
had to be threaded through every open-coded copy in lockstep or
two consumers would silently disagree on which fetch source a
given dep resolves to — the Self::validate per-:fonte
gate reading the author-declared source while the caixa-crd
projector read a per-scope-override-resolved source would
silently split the build-time refusal from the CR the
substrate’s admission pipeline actually materializes, one
build-time diagnostic disagreeing with the run-time closure.
Lifting the resolution rule to a typed method on the substrate
primitive means every downstream consumer of the caixa’s per-
:deps fetch-source surface reaches for exactly one typed
dispatch — the resolver’s accept-set migrates as a unit on any
future axis addition.
First outer-Dep Option<&Composite>-return composite-reference
accessor — opens the outer-Dep Option<&Composite> composite-
reference projection pattern the sibling per-Dep :opcional
(Option<Copy> — the plain-bool axis) / :caracteristicas
(&[String] — the feature-flag list) future outer scalar / slice
lifts fold on. Peer of the outer-top-level crate::Caixa
Option<&Composite> composite-reference sub-family the
crate::Caixa::limits (b2bd9d7) / crate::Caixa::behavior
(35d8b52) / crate::Caixa::politicas (5d23d29) /
crate::Caixa::placement (4fb8074) / crate::Caixa::entrada
(e4128e4) accessors already close on the outer crate::Caixa
altitude, and of the outer M3 mesh-slot crate::AplicacaoSpec
altitude the sibling crate::AplicacaoSpec::entrada (d32111c)
accessor already carries — extends that “one typed dispatch on
the substrate primitive, thin projections at each consumer”
discipline onto the third outer typed-slot altitude that carries
an Option<Composite> axis (Dep, the outer per-dep-list-entry
slot). Returns Option<&DepSource> (not the owning composite by
copy or clone) because every downstream consumer of the fonte
composite treats it as a read-only per-arm dispatch source — the
reference-view is the narrowest borrow that supports every
present + roadmapped consumer (per-arm match projection at the
caixa-crd CaixaSource two-arm emitter, presence-probe early
return on the “author-omitted :fonte ⇒ resolver-side
default_github fill applies” partition every resolver
consults, .cloned()-on-demand for the two resolver-side
default-fill call sites that require an owned DepSource for
Option::unwrap_or_else) without cloning the composite through
every consumer’s fast path. The Option half of the return-type
preserves the load-bearing “author-omitted :fonte ⇒ resolver-
side default applies” partition (not a default composite the
downstream must reject on emptiness) — the accessor projects the
raw Option<DepSource> slot’s presence bit through the
reference-return unchanged. Named fonte() to match the storage
field’s name verbatim and the tatara-lisp author-surface term
(:fonte) the field’s own docstring already carries.
Sourcepub fn caracteristicas(&self) -> &[String]
pub fn caracteristicas(&self) -> &[String]
Substrate-canonical per-:deps / :deps-dev entry
:caracteristicas Cargo-shaped feature-toggle-set slice accessor
every consumer of the dep-graph feature-flag axis keys off —
returns the author-declared :caracteristicas feature-name list
verbatim as a &[String] slice-view over the same backing buffer
the raw self.caracteristicas.as_slice() field access borrows
from. Empty-list-carrying (:caracteristicas is a default-empty
axis every Dep supplies with Vec::new() when the author omits
the slot; the crate::Caixa::from_lisp derive folds an omitted
:caracteristicas through #[serde(default)] to Vec::new(),
so a Dep past parse definitionally carries a Vec<String> slot
— possibly empty — and the returned &[String] degenerates to
an empty slice on that arm without any silent None collapse).
The :deps :caracteristicas / :deps-dev :caracteristicas slot
carries the set-shaped feature-toggle list the substrate walks
through the Self::validate_caracteristicas per-entry shape +
duplicate cascade — same Cargo [dependencies.<dep>.features]
accept-set (per-entry Cargo-feature-name grammar via the shared
crate::render::is_cargo_feature_name predicate, cross-entry
uniqueness via the shared crate::render::insert_first_seen
walk, empty-first / value-shape-second / duplicate-third
precedence via the peer per-axis two-arm cascade discipline every
substrate-blessed Vec-keyed-by-name slot already follows).
Every downstream consumer that fans on the dep’s feature-toggle
keys off this accessor: Self::validate_caracteristicas’s
per-entry linear walk that gates each feature-name byte-string
through the empty / value-shape / duplicate arms (raising the
DepError::CaracteristicaEmpty / DepError::CaracteristicaInvalid
/ DepError::CaracteristicaDuplicate carrier family naming the
offending Dep::nome), and every future
per-Caixa-manifest / caixa-resolver / caixa-crd feature-toggle-
facing consumer the CAIXA-SDLC §I roadmap acknowledges (the
future caixa-resolver per-dep feature-projection walk that folds
the toggle set into the resolved crate::Caixa’s activated
crate::render::CARGO_FEATURE_NAME_MAX_LEN-bounded feature
closure ahead of the lacre hash, the future caixa-crd per-spec.deps
features slice the K8s-CR admission gate consumes, the future
per-cluster feature-overlay the M4 lacre-federation resolver
composes ahead of the substrate-wide feature-name accept-set).
Prior to this lift the .caracteristicas byte-string list was
read inline at the Self::validate_caracteristicas for c in &self.caracteristicas walk — the only in-crate consumer of the
raw field beyond the per-Dep constructor pair
(Self::simple / Self::git) and the paired serde
round-trip / per-test fixture-mutation paths — an open-coded
field-access that expressed no compile-time link back to the
typed slot. A future extension of the :caracteristicas axis to
a richer author surface (a per-scope feature-overlay the resolver
folds through the ~/.config/caixa/config.yaml entry the
Dep docstring already acknowledges, a per-cluster feature-
activation overlay the future M4 lacre-federation layer applies
per-CR, a promotion of the plain Vec<String> byte-string list
to a richer parsed-feature-set newtype once the Cargo-shaped
namespaced-dep dep/feat syntax the value-shape gate’s
docstring anticipates lands) would have had to be threaded
through every open-coded copy in lockstep or two consumers
would silently disagree on which feature closure a given dep
activates — the Self::validate_caracteristicas gate walking
the author-declared list while a downstream caixa-resolver
consumer walked a per-scope-override-resolved list would
silently split the build-time refusal from the lacre closure
the substrate’s fetch pipeline actually materializes, one
build-time diagnostic disagreeing with the run-time closure.
Lifting the resolution rule to a typed method on the substrate
primitive means every downstream consumer of the caixa’s per-
:deps feature-toggle surface reaches for exactly one typed
dispatch — the resolver’s accept-set migrates as a unit on any
future axis addition.
First outer-Dep &[T]-return slice accessor — opens the
outer-Dep &[String] slice projection pattern the sibling
per-Dep :opcional (bool — the plain-Copy-scalar axis)
future outer scalar lift folds on and closes the outer-Dep
slot-family the sibling Self::nome (eba2cde) /
Self::versao_requirement (05529b1) / Self::fonte (d65d1bf)
accessors already open, leaving the :opcional Copy-scalar arm
as the sole remaining unlifted outer-Dep slot. Peer of the
outer top-level crate::Caixa &[String]-return foreign-code-
slot sub-family (crate::Caixa::bibliotecas 8a36c23,
crate::Caixa::exe 65d9527, crate::Caixa::servicos
611f78b) and the outer top-level crate::Caixa universal-axis
text-tag family (crate::Caixa::autores b5d813f,
crate::Caixa::etiquetas 78c7d3c) that already carry the
&[String] slice-projection discipline on the outer-Caixa
altitude — extends the “one typed dispatch on the substrate
primitive, thin projections at each consumer” discipline onto the
outer per-dep-list-entry Dep altitude’s set-shaped byte-
string list slot. Returns &[String] (not &Vec<String>)
because every downstream consumer of the feature-toggle list
treats it as a read-only sequence — the slice-view is the
narrowest borrow that supports every present + roadmapped
consumer (.iter(), .len(), .is_empty()) without leaking
the backing Vec’s grow/push/reserve surface no consumer of
the typed view reaches for (the storage-side Vec remains
reachable through the pub caracteristicas field for the
mutation-carrying serde round-trip and per-test fixture-mutation
paths). Named caracteristicas() to match the storage field’s
name verbatim and the tatara-lisp author-surface term
(:caracteristicas) the field’s own docstring already carries.
Sourcepub const fn opcional(&self) -> bool
pub const fn opcional(&self) -> bool
Substrate-canonical per-:deps / :deps-dev entry :opcional
missing-source-tolerance flag scalar accessor every consumer of
the dep-graph opt-in-fetch axis keys off — returns the author-
declared :opcional bool verbatim, Copy-projected from the
typed slot’s own bool storage (no borrow of &self past the
call; the Copy-return arm matches the peer
crate::Caixa::max_restarts (eba5211) Option<u32> Copy-
projected sibling discipline the outer flat-spread family
already carries). Default-false (#[serde(default, skip_serializing_if = "is_false")] on the storage slot, so a
Dep past parse definitionally carries a bool — false when
the author omits :opcional — and the returned value degenerates
to false on that arm without any silent None collapse).
The :deps :opcional / :deps-dev :opcional slot carries the
per-entry “if this dep’s :fonte cannot be resolved, treat the
missing-source arm as a soft-fail rather than a build refusal”
bit — the same Cargo-shaped [dependencies.<dep>.optional = true]
accept-set (an opcional dep whose :fonte fails to resolve is
dropped from the resolved dep-graph rather than tripping the
build-refusal edge that a mandatory :opcional false entry
would). Every downstream consumer that fans on the dep’s
missing-source-tolerance keys off this accessor: the future
caixa-resolver’s per-:fonte resolve-fail arm (drop-vs-error
dispatch on the opcional bit ahead of the lacre closure
materialization), the future caixa-crd per-spec.deps
optional boolean the K8s-CR admission gate consumes on the
per-dep partition, and the future feira / caixa-resolver /
caixa-crd feature-projection walk that folds the opcional bit
into the resolved feature-closure the future M4 lacre-federation
layer emits.
Prior to this lift the .opcional bool slot was read inline
at the sole in-crate consumer site — the tests-module
registry_dep_is_minimal fixture’s assert!(!d.opcional) gate
pinning the Self::simple constructor’s default-false fill
(the only in-crate read of the raw field beyond the per-Dep
constructor pair Self::simple / Self::git and the paired
serde round-trip / per-test fixture-mutation paths) — an open-
coded field-access that expressed no compile-time link back to
the typed slot. A future extension of the :opcional axis to a
richer author surface (a per-scope opcional-override the resolver
folds through the ~/.config/caixa/config.yaml entry the Dep
docstring already acknowledges, a per-cluster opcional-override
the future M4 lacre-federation layer applies per-CR, a promotion
of the plain bool to a richer OpcionalPolicy { drop, warn, error } tri-state once the CAIXA-SDLC §II opcional-policy
roadmap lands) would have had to be threaded through every open-
coded copy in lockstep or two consumers would silently disagree
on which missing-source arm a given dep resolves to — the
Self::simple constructor’s default-false fill reading
verbatim while a downstream caixa-resolver consumer read a per-
scope-override-resolved bit would silently split the build-time
arm from the lacre closure the substrate’s fetch pipeline
actually materializes, one build-time diagnostic disagreeing
with the run-time closure. Lifting the resolution rule to a
typed method on the substrate primitive means every downstream
consumer of the caixa’s per-:deps opcional-tolerance surface
reaches for exactly one typed dispatch — the resolver’s accept-
set migrates as a unit on any future axis addition.
Fifth and final outer-Dep accessor — closes the outer-Dep
slot-family the sibling per-Dep Self::nome (eba2cde) /
Self::versao_requirement (05529b1) / Self::fonte (d65d1bf)
/ Self::caracteristicas (9197944) accessors opened, so every
outer-Dep slot (:nome, :versao, :fonte, :opcional,
:caracteristicas) now routes through exactly one typed
dispatch on the substrate primitive. First outer-Dep
bool-return / plain-Copy-scalar accessor — opens the
outer-Dep Copy-scalar projection pattern that folds on the
peer outer-top-level crate::Caixa Option<Copy>
flat-spread sub-family (crate::Caixa::max_restarts eba5211,
crate::Caixa::estrategia ed04d3c) the outer-Caixa altitude
already carries — extends the “one typed dispatch on the
substrate primitive, thin projections at each consumer”
discipline onto the outer per-dep-list-entry Dep altitude’s
bool-shaped missing-source-tolerance slot. Returns bool by
Copy (not by &bool reference) because bool is Copy and
every downstream consumer treats it as a plain discriminant
value — the by-value return is the narrowest return-shape that
supports every present + roadmapped consumer (.then(…) early
return on the resolver-side drop-vs-error partition, direct
bool composition with a per-scope-override projector, plain
if dep.opcional() { … } early return at every future admission
gate) without leaking the storage field’s bool-in-&self
lifetime the by-value return elides. Marked pub const fn so
the accessor is const-callable — same discipline the peer
crate::Caixa::max_restarts Option<u32> Copy-return
accessor carries. Named opcional() to match the storage
field’s name verbatim and the tatara-lisp author-surface term
(:opcional) the field’s own docstring already carries.
Sourcepub fn simple(nome: impl Into<String>, versao: impl Into<String>) -> Self
pub fn simple(nome: impl Into<String>, versao: impl Into<String>) -> Self
Build a minimal registry-sourced dep.
Sourcepub fn git(
nome: impl Into<String>,
versao: impl Into<String>,
repo: impl Into<String>,
tag: impl Into<String>,
) -> Self
pub fn git( nome: impl Into<String>, versao: impl Into<String>, repo: impl Into<String>, tag: impl Into<String>, ) -> Self
Build a Git-sourced dep (tag-based).
Sourcepub fn validate(&self) -> Result<(), DepError>
pub fn validate(&self) -> Result<(), DepError>
Reject dependency entries whose :nome or :versao are empty,
whose :nome is non-empty but not a valid DNS-1123 label,
or whose :versao is non-empty but not a valid Cargo-shaped
semver requirement.
The author surface for :deps :versao (and :deps-dev :versao)
is the same Cargo-shaped requirement string :membros :versao
(validated at crate::AplicacaoSpec::validate since 9888b13)
and :children :versao (validated at
crate::SupervisorSpec::validate since b38ff3a) carry — and
the lacre pipeline resolves all three axes through the same
crate::parse_requirement entry-point. Until 2420c44 landed
:deps :versao was the last :versao axis untyped past
Caixa::from_lisp: a malformed-but-non-empty requirement
("^bad-version", "^^0.1", the canonical git-tag-shape-
leaking-into-:versao "v0.1" typo, the accidental
"not-a-req") silently passed parse and the semver::Error
surfaced at lacre-resolve time, far from the source
caixa.lisp, with no field naming which :deps entry carried
the typo. The diagnostic DepError::VersaoInvalid carries
the offending entry’s :nome + the offending :versao
verbatim + the parser’s own wording in reason, so the
author’s grep target is unambiguous.
The author surface for :deps :nome is the same DNS-1123 label
the peer caixa-identifier axes carry — top-level Caixa :nome
(validated at crate::Caixa::validate_nome since 6c992f8),
:membros :caixa (validated at
crate::AplicacaoSpec::validate_membros since 3f9d7a0),
:children :caixa (validated at
crate::SupervisorSpec::validate since 31bfa43). A :deps :nome value flows verbatim through the lacre pipeline as the
target caixa’s :nome (which the gate at the target side now
rejects if non-DNS-1123) and lands as the rendered caixa’s
lareira-<nome> Helm chart name segment, the per-dep
LABEL_PROGRAM label value, and the caixa-resolver’s
~/.cache/caixa/<org>/<nome> checkout-directory leaf. Until
this gate landed :deps :nome was the fourth and last
DNS-1123-shaped caixa-identifier axis still untyped past
Caixa::from_lisp: a syntactically wrong dep name ("Caixa- Teia" uppercase — the canonical “I copied the README header”
typo; "caixa_teia" underscore — the Go module / Python
identifier leak; "caixa-teia." trailing dot — the FQDN
confusion; "-caixa-teia" leading hyphen; a 64-byte slug)
silently passed parse and surfaced at lacre-resolve time when
the resolved target caixa’s :nome failed its DNS-1123 gate
— far from the source :deps entry, with a diagnostic naming
the target’s :nome rather than the dep entry that referenced
it. Mirroring the 3f9d7a0 / 31bfa43 / 6c992f8 trajectory through
the lifted crate::render::is_dns_1123_label predicate (the
“before its third occurrence” PRIME DIRECTIVE boundary, THEORY.md
§I.3.5): every Dep::nome past validate is DNS-1123-label-shaped,
so every downstream consumer (caixa-resolver’s lacre fetch,
caixa-helm’s lareira-<nome> chart name, the future M4 per-dep
fan-out emitter) reaches for the name knowing the value is
apiserver-valid without re-validating.
Empty checks fire first (narrower diagnostic), parse last —
same ordering discipline as
crate::AplicacaoSpec::validate_membros and
crate::SupervisorSpec::validate. parse_requirement("")
returns Ok(VersionReq::STAR), so the empty-:versao arm is
structurally necessary even with the parse arm in place. The
:nome shape gate runs after the :nome empty gate and before
the :versao checks so a one-entry caixa.lisp with both wrong
sees the name-side diagnostic first (the name is the
self-locating axis — without it, the parse diagnostic can’t
quote :nome "<bad>").