def lock.note

ezx@1.11.0.0 · src/doctor/plan.bend:219

import ezx@1.11.0.0/src/doctor/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/doctor/world.bend as DW

219# what the lock amounts to. A lock that is there and does not parse is a
220# problem whatever the ledger holds, since `ez fetch` refuses it, as cargo
221# refuses a Cargo.lock it cannot read.
222def lock.note(+deps: Nat, lk: Locked) -> Note:
223  match lk:
224    case Locked{+hs}:
225      +wrong = lock.wrong(deps, hs)
226      Note{wrong,
227        DW.lockfile() ++ ": " ++ plural(List.length(&2, String, hs), "package", "packages") ++
228        Bool.pick(String, wrong, " (it names none; run ez lock)", "")}
229    case Unread{why}:
230      Note{True{}, DW.lockfile() ++ ": " ++ why}
231    case Unlocked{}:
232      +wrong = lock.needs(deps)
233      Note{wrong, DW.lockfile() ++ ": " ++
234        Bool.pick(String, wrong, "none; run ez lock", "none, and nothing to lock")}

Uses (12)

Used by (1)