def ledger.put

ezx@1.11.0.0 · src/lock/lock.bend:253

import ezx@1.11.0.0/src/lock/lock.bend as Lock
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

253# a ledger's dependency as an origin: the repo and rev it names, or the hub.
254# A hub dependency is recorded too, so that a package the ledger names is told
255# apart from one it does not, which also resolves from the hub but is not
256# vouched for by anything a clone has.
257def ledger.put(git: Bool, +dep: M.Dep) -> List<&2, Origin>:
258  match git:
259    case True{}:
260      [Origin{M.dep.hash(dep), Git{M.source.url(M.source.dep(dep)),
261        M.source.rev(M.source.dep(dep)), M.dep.entry(dep),
262        M.source.root(M.source.dep(dep)), M.source.nar(M.source.dep(dep)),
263        M.source.tag(M.source.dep(dep))}}]
264    case False{}:
265      [Origin{M.dep.hash(dep), ledger.other(M.source.dep(dep), M.dep.entry(dep))}]

Uses (14)

Used by (1)