Expand description
The resolver: one function that builds a RepositoryEnvironment, and the only place
any surface gets one.
§The two resolutions
A full resolution has the index; a fast one does not, and may not build it. That is not
a preference. Building the index reads and validates every declared file of the layer,
which is measured in seconds even in a release build, and a fast resolution is what
runs when a person types cd.
Everything else is cheap enough for either: the project identity is compile-time
constants, the repository comes from one manifest, version control from one git
call, the toolchains from a handful of exists(), the provider projections from the
policy and its templates, the services from one small file and at most one bounded
connection attempt. The three answers that are not cheap — what the layer holds,
what the workflow runner says, and what versions are installed — come from
super::cache, each with its own fingerprint, and are reported as unavailable when
no cache can supply them.
Unavailable is a real answer here, and the discipline the whole module is built on: a count that was not counted is absent, never zero, because a person reads a zero as a broken repository and acts on it.
Structs§
- Environment
Query - What a caller wants resolved, and what it will pay for.
- Inputs
- What the resolver may read. A fast resolution carries no index and no registry; a full one carries both, and the presence of the index is what makes it full.
Functions§
- resolve
- Build a snapshot.