gleamunison/dependency_snapshot
One verified, branch-local view for a complete retraction decision. No persistent index or invalidation policy: read once, then query pure data.
Types
pub type ScanError {
StoreFailure(storage.StorageError)
NamespaceFailure(String)
CorruptDefinition(identity.DefinitionRef)
}
Constructors
-
StoreFailure(storage.StorageError) -
NamespaceFailure(String) -
CorruptDefinition(identity.DefinitionRef)
Values
pub fn current_namespace(
snapshot: Snapshot,
) -> namespace.Namespace
pub fn dependencies(
snapshot: Snapshot,
ref: identity.DefinitionRef,
) -> List(identity.DefinitionRef)
pub fn dependents(
snapshot: Snapshot,
ref: identity.DefinitionRef,
) -> List(identity.DefinitionRef)
pub fn describe_error(error: ScanError) -> String
The one place a ScanError becomes a user sentence. Rendering belongs here, with the type, rather than at each CLI call site — inspect output is a debug rendering and must never reach a user. Mirrors store_deps.describe_dependency_error without sharing the type: each error keeps its own owner.
pub fn exclusive_closure(
snapshot: Snapshot,
root: identity.DefinitionRef,
) -> List(identity.DefinitionRef)
pub fn names(
snapshot: Snapshot,
ref: identity.DefinitionRef,
) -> List(String)
pub fn read(
adapter: storage.StorageAdapter,
branch: String,
) -> Result(Snapshot, ScanError)