def plan
import ezx@1.11.0.0/src/ws/up.bend as Upimport Base
import ezx@1.11.0.0/src/lock/world.bend as LW
import ezx@1.11.0.0/src/lock/plan.bend as LP
390# what `ez lock` runs: for a project of its own, the plan the lock planner
391# makes; at a workspace root, the plan it makes on the joint ledger, with,
392# under `--upgrade`, every moved member's import lines rewritten and every
393# ledger the upgrade changed written back in place of the joint one. A plain
394# lock writes no ledger, so its plan is as it was, unless a line names a
395# moved member's old hash, which it refuses.
396def plan(back: Back, +world: LW.World) -> LP.Plan:
397 match back:
398 case Alone{}:
399 LP.plan(world)
400 case Back{+text, +spec, +fs, +lock}:
401 plan.at(LW.args.upgrade(world), Back{text, spec, fs, lock}, world)