def plan.at

ezx@1.11.0.0 · src/ws/up.bend:373

import ezx@1.11.0.0/src/ws/up.bend as Up
import 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
import ezx@1.11.0.0/src/ws/moved.bend as Mv

373# what `ez lock` runs at a workspace root, under `--upgrade` or not
374def plan.at(up: Bool, +back: Back, +world: LW.World) -> LP.Plan:
375  match up:
376    case True{}:
377      match back:
378        case Alone{}:
379          LP.plan(world)
380        case Back{+text, +spec, +fs, +lock}:
381          plan.up(up.of(text, fs, lock, world), Back{text, spec, fs, lock})
382    case False{}:
383      match back:
384        case Alone{}:
385          LP.plan(world)
386        case Back{_text, _spec, _fs, +lock}:
387          +why = Mv.stale.world(lock, world)
388          plan.plain(String.is_empty(why), why, world)

Uses (10)

Used by (1)