def dep.moved

ezx@1.11.0.0 · src/lock/up.bend:614

import ezx@1.11.0.0/src/lock/up.bend as Up
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ledger/upgrade.bend as U

614# a moved pin, once the hub has not objected to its new hash: the ledger's
615# entry retargeted, the committed tree it replaces, the hash imports stop
616# naming, and what a person is told
617def dep.moved(
618  +dep: M.Dep,
619  +hash: String,
620  +rev: String,
621  +root: String,
622  +nar: String,
623  manifest: String,
624  srcs: List<&2, String>,
625  +branch: String
626) -> Fate:
627  +src = M.source.dep(dep)
628  +name = M.dep.name(dep)
629  +old = M.dep.hash(dep)
630  +drop = swap.of(M.source.vendor(src), old, hash)
631  +prev = swap.hash(String.eq(old, hash), old)
632  Became{U.retarget(dep, rev, hash, root, nar), drop, hash, prev, True{},
633    say.move(name, M.source.rev(src), rev, branch) <>
634      List.append(&2, String,
635        line.if(Bool.not(String.is_empty(prev)), name ++ ": imports " ++ old ++ " -> " ++ hash),
636        line.if(Bool.not(String.is_empty(drop)), name ++ ": vendored .ez/lib/" ++ hash)),
637    [Laid{hash, nar, manifest, srcs}]}

Uses (21)

Used by (1)