gleamunison/cli_unpublish

gleamunison unpublish <name> — retract a published name.

Admission is the evidence turnstile; retraction is the reverse. Removing a name removes three things together: the name → hash line in the published index, the namespace binding, and the definition’s bytes in the store. Left half-done, any one of them lies: an index line for absent bytes, a binding to a ref nobody can load, or bytes no name reaches.

Refusals are deliberate. A name that was never published has nothing to retract (exit 1). Content that another definition depends on, or another name still binds, is NOT deleted: retracting one name must not break a different one, and the message names what stands in the way.

Values

pub fn command(args: List(String)) -> Nil
pub fn resolve_target(
  adapter: storage.StorageAdapter,
  lines: List(publication_index.Line),
  name: String,
  branch: String,
) -> Result(#(String, identity.DefinitionRef), #(Int, String))

Which content this name means on this branch.

The published index is store-wide; a binding is per-branch. Retracting on one branch removes the index line, so a second branch holding the same name had no line left to find and could never be retracted. The index is tried first (it is what publish wrote), then the branch namespace, which is the authority for its own bindings.

pub fn retract(
  adapter: storage.StorageAdapter,
  manifest_path: String,
  name: String,
  hash: String,
  ref: identity.DefinitionRef,
  branch: String,
  lines: List(publication_index.Line),
) -> Result(String, #(Int, String))
✨ Search Document