def dep.is.go

ezx@1.11.0.0 · src/pub/plan.bend:860

import ezx@1.11.0.0/src/pub/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M

860# whether the ledger's dependency is the one a probe is about: the same hash,
861# or for a name, the same `<name>@<version>` or the hash it resolved to
862def dep.is.go(one: Probe, +hash: String, src: M.Source) -> Bool:
863  match one:
864    case ProbeHash{ph}:
865      String.eq(hash, ph)
866    case ProbeName{nv, +ph}:
867      Bool.or(String.eq(M.source.nv(src), nv),
868        Bool.and(Bool.not(String.is_empty(ph)), String.eq(hash, ph)))

Uses (10)

Used by (1)