def nar.why

ezx@1.11.0.0 · src/fetch/plan.bend:416

import ezx@1.11.0.0/src/fetch/plan.bend as Plan
import Base

416# why a checkout may not be laid for the narHash it weighed to, "" when it
417# may: the lock records a narHash and the checkout weighed to it
418def nar.why(
419  none: Bool,
420  same: Bool,
421  +hash: String,
422  +want: String,
423  +got: String,
424  +url: String,
425  +rev: String
426) -> String:
427  match none:
428    case True{}:
429      "ez: " ++ hash ++ ": the lock records no narHash for " ++ url ++ " at " ++ rev ++
430        ", so its checkout cannot be checked; run `ez lock --upgrade` to pin it"
431    case False{}:
432      match same:
433        case True{}:
434          ""
435        case False{}:
436          "ez: " ++ hash ++ ": " ++ url ++ " at " ++ rev ++ " has narHash " ++ got ++
437            ", and the lock records " ++ want

Uses (3)

Used by (1)