def sync.lock
import ezx@1.11.0.0/src/tool/plan.bend as Planimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
1144# a ledger with pins needs a lock that pins each at a commit
1145def sync.lock(got: Maybe<&2, String>, +ts: List<&2, M.Tool>) -> Sync:
1146 match got:
1147 case None{}:
1148 Bool.pick(Sync, List.is_empty(&2, M.Tool, ts), Sync{[]},
1149 SyncNo{"ez: ez.lock.toml is not there"})
1150 case Some{body}:
1151 +why = sync.check(ts, body)
1152 sync.why(String.is_empty(why), why, ts)