gleamunison/cli_purge
gleamunison purge <content-hash> [--yes] — remove a definition, and the
dependencies nothing else keeps alive.
Dry run by default: the command prints exactly what it would remove and
changes nothing until --yes. Two refusals come first and neither depends
on --yes, because both describe a store that would be broken by the
removal:
- something outside the removal set depends on it (unpublish or purge those first);
- the ref is not in the store at all (exit 2: nothing to remove).
Removing bytes also removes the names that pointed at them, in the index
and the namespace. A name left behind would resolve to a ref nobody can
load — the exact lie unpublish exists to prevent.
Values
pub fn purge(
adapter: storage.StorageAdapter,
manifest_path: String,
ref: identity.DefinitionRef,
branch: String,
confirmed: Bool,
) -> Result(String, #(Int, String))