def nar.why.go

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

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

349# why a fetched checkout is not the one the ledger pins, or "" when it is.
350# The NAR hash is over the whole checkout, so a rev that no longer holds what
351# it held when it was pinned is caught here, before anything is laid out. A
352# ledger with no NAR hash has nothing to check the checkout against, and an
353# unchecked tree is not one a lock may record.
354def nar.why.go(none: Bool, same: Bool, +want: String, +got: String, +url: String, +rev: String) -> String:
355  match none:
356    case True{}:
357      "ez: ez.toml records no narHash for " ++ url ++ " at " ++ rev ++
358        ", so its tree cannot be checked; run `ez lock --upgrade` to pin it"
359    case False{}:
360      match same:
361        case True{}:
362          ""
363        case False{}:
364          "ez: " ++ url ++ " at " ++ rev ++ " has narHash " ++ got ++
365            ", and ez.toml records " ++ want

Uses (3)

Used by (1)