def stale.moves

ezx@1.11.0.0 · src/ws/moved.bend:181

import ezx@1.11.0.0/src/ws/moved.bend as Moved
import Base
import ezx@1.11.0.0/src/ledger/upgrade.bend as U

181# why a file stops a plain lock: the first move one of its lines names
182def stale.moves(ms: List<&2, Shift>, +at: String, +text: String) -> String:
183  match ms:
184    case []:
185      ""
186    case Shift{+name, +old, +new} <> tl:
187      rest = stale.moves(tl, at, text)
188      Bool.pick(String, String.eq(U.reimport.many([U.Swap{old, new}], text), text), rest,
189        "ez: " ++ at ++ " imports workspace member " ++ name ++ " by " ++ old ++
190          ", the hash the lock records for it, and the member is " ++ new ++
191          " now; ez lock --upgrade --package " ++ name ++ " rewrites the import")

Uses (8)

Used by (1)